from django.conf.urls.defaults import *
from os import sep
from os.path import dirname, abspath
from sys import path

approot = 'pycon.apps.survey'
#if __file__ is not None:
#    relfile = abspath(__file__)[len([ dir for dir in path if dir and '.' not in dir and dir in abspath(__file__) ][0]):]
#    approot = dirname(dirname(relfile)).replace(sep, '.')
#    approot = approot[0] == '.' and approot[1:] or approot

urlpatterns = patterns(approot,

    (r'^$',
     'views.index'),

    (r'^(?P<survey>[\w-]+)/?$',
     'views.survey'),

    (r'^(?P<survey>[\w-]+)/thankyou/?$',
     'views.thankyou'),

)
