Skip to content

Commit

Permalink
Fix admin login form enforcing 30 char username limit. Closes #931.
Browse files Browse the repository at this point in the history
  • Loading branch information
onyxfish committed Nov 30, 2013
1 parent 9f4614d commit 17cb1a2
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions config/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,32 @@
from django.conf.urls.defaults import include, patterns
from django.contrib import admin

from longerusername.forms import AuthenticationForm

# Jumpstart mode
if settings.SETTINGS == 'jumpstart':
urlpatterns = patterns('',
(r'', include('jumpstart.urls')),
(r'^site_media/(?P<path>.*)$', 'django.views.static.serve',
{ 'document_root': settings.STATIC_ROOT,
'show_indexes': True }),
(r'^site_media/(?P<path>.*)$', 'django.views.static.serve', {
'document_root': settings.STATIC_ROOT,
'show_indexes': True
}),
)
# Normal mode
else:
admin.autodiscover()
admin.site.index_template = 'admin/panda_index.html'
admin.site.login_form = AuthenticationForm

urlpatterns = patterns('',
(r'', include('panda.urls')),
(r'', include('client.urls')),
(r'^admin/login/$', 'django.contrib.auth.views.login', {'template_name': 'admin/login.html'}),
(r'^admin/logout/$', 'django.contrib.auth.views.logout'),

(r'^admin/settings/', include('livesettings.urls')),
(r'^admin/', include(admin.site.urls)),

# Should never be used in production, as nginx will server these paths
(r'^site_media/(?P<path>.*)$', 'django.views.static.serve',
{ 'document_root': settings.STATIC_ROOT,
'show_indexes': True }),
# Should never be used in production, as nginx will serve these paths
(r'^site_media/(?P<path>.*)$', 'django.views.static.serve', {
'document_root': settings.STATIC_ROOT,
'show_indexes': True
}),
)

0 comments on commit 17cb1a2

Please sign in to comment.