freieit / freieit /

from django.conf import settings
from django.conf.urls import patterns, include, url
from invitation.views import register
from django.contrib.auth.views import login, logout
from registration.forms import RegistrationFormTermsOfService
from django.views.generic.simple import direct_to_template
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.http import HttpResponse
from views.home import IndexSearchView
# from haystack.forms import SearchForm
from import ExpertSearchForm

# Uncomment the next two lines to enable the admin:
from django.contrib import admin

if getattr(settings, 'INVITE_MODE', False):
    urlpatterns = patterns('',
        url(r'^accounts/register/$',    register,
                                                'form_class': RegistrationFormTermsOfService,
                                                'backend': 'invitation.backends.InvitationBackend',
    urlpatterns = patterns('',
        url(r'^accounts/register/$',    register,
                                                'form_class': RegistrationFormTermsOfService,
                                                'backend': 'registration.backends.default.DefaultBackend',

urlpatterns += patterns('',
    url(r'^accounts/',              include('invitation.urls')),
    url(r'^accounts/',              include('registration.urls')),
    url(r'^admin/',                 include(,
    # Uncomment the admin/doc line below to enable admin documentation:
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
    (r'^robots\.txt$', lambda r: HttpResponse("User-agent: *\nDisallow: /", mimetype="text/plain"))

urlpatterns += patterns('',
  url(r'^$', IndexSearchView(form_class=ExpertSearchForm, template="home.html"), name='haystack_search'),
  url(r'^newexpert$',                    ''),
  # url(r'^$', ''),
#  url(r'^login$',                       ''),
#  url(r'^login$',                       login, name='login'),
#  url(r'^accounts/login/$',             login),
#  url(r'^logout$',                      logout),
#  url(r'^accounts/logout/$',            logout, name='logout'),
  #url(r'^register$',                    ''),
#  url(r'^profile$',                     ''),
#  url(r'^expert/(?P<expert>[\w_\-]+)$', ''),
#  url(r'^experts/(?P<page_num>\d+)?$',  ''),
#  url(r'^map$',                         ''),
#  url(r'^map/rss.xml$',                 ''),
#  url(r'^tag/(?P<tag>[\w_\-]+)/(?P<page_num>\d+)?', ''),

# static templates
urlpatterns += patterns('',
  url(r'^about/$', direct_to_template, {'template': 'about.htm'}),
  url(r'^dienste/$', direct_to_template, {'template': 'dienste.htm'}),
  url(r'^tipps/$', direct_to_template, {'template': 'tipps.htm'}),
  url(r'^statuten/$', direct_to_template, {'template': 'statuten.htm'}),
  url(r'^impressum/$', direct_to_template, {'template': 'impressum.htm'})

if settings.DEBUG:
  urlpatterns += patterns('',
    url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
      'document_root': settings.MEDIA_ROOT,

urlpatterns += staticfiles_urlpatterns()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.