Mercurial > agora
annotate urls.py @ 97:bf731c77ddf9
Change URL mapping from user/ to users/ for profile app
The built-in auth module expects the user profiles to be located at
/users/username by default.
author | dellsystem <ilostwaldo@gmail.com> |
---|---|
date | Fri, 31 Aug 2012 02:24:30 -0400 |
parents | d416b8198889 |
children | 17bc502c65a4 |
rev | line source |
---|---|
0
448f907a9d7e
Initial Agora Octave commit
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
1 from django.conf.urls.defaults import * |
448f907a9d7e
Initial Agora Octave commit
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
2 |
448f907a9d7e
Initial Agora Octave commit
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
3 # Uncomment the next two lines to enable the admin: |
448f907a9d7e
Initial Agora Octave commit
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
4 from django.contrib import admin |
448f907a9d7e
Initial Agora Octave commit
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
5 admin.autodiscover() |
448f907a9d7e
Initial Agora Octave commit
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
6 |
448f907a9d7e
Initial Agora Octave commit
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
7 urlpatterns = patterns('', |
78
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
8 url(r'^$', |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
9 'django.views.generic.simple.direct_to_template', |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
10 {'template': 'index.djhtml'}, |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
11 name='home'), |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
12 url(r'^about$', |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
13 'django.views.generic.simple.direct_to_template', |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
14 {'template': 'about.djhtml'}, |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
15 name='about'), |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
16 url(r'^help$', |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
17 'django.views.generic.simple.direct_to_template', |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
18 {'template': 'help.djhtml'}, |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
19 name='help'), |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
20 url(r'^discuss$', |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
21 'django.views.generic.simple.direct_to_template', |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
22 {'template': 'discuss.djhtml'}, |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
23 name='discuss'), |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
24 url(r'^code$', |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
25 'django.views.generic.simple.direct_to_template', |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
26 {'template': 'code.djhtml'}, |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
27 name='code'), |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
28 url(r'^admin/doc/', include('django.contrib.admindocs.urls')), |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
29 url(r'^admin/', include(admin.site.urls)), |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
30 url(r'^accounts/logout/', 'django.contrib.auth.views.logout', |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
31 {'template_name' : 'index.djhtml', 'next_page' : '/'}), |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
32 url(r'^accounts/', include('registration.urls')), |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
33 url(r'^licenses/', include('agora.apps.free_license.urls')), |
97
bf731c77ddf9
Change URL mapping from user/ to users/ for profile app
dellsystem <ilostwaldo@gmail.com>
parents:
78
diff
changeset
|
34 url(r'^users/', include('agora.apps.profile.urls')), |
78
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
35 url(r'^snippet/', include('agora.apps.snippet.urls')), |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
36 url(r'^bundles/', include('agora.apps.bundle.urls')), |
0
448f907a9d7e
Initial Agora Octave commit
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
37 ) |
7
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
4
diff
changeset
|
38 |
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
4
diff
changeset
|
39 #Let Django itself serve static data during debugging |
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
4
diff
changeset
|
40 from django.conf import settings |
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
4
diff
changeset
|
41 |
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
4
diff
changeset
|
42 if settings.DEBUG: |
8
8be7bdae8fb6
Fix some bugs on how static data was served during debug
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
7
diff
changeset
|
43 urlpatterns += patterns('', |
8be7bdae8fb6
Fix some bugs on how static data was served during debug
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
7
diff
changeset
|
44 (r'^static/(?P<path>.*)$', 'django.views.static.serve', |
11
71024a491161
Rename media/ dir to static/, update the settings-example.py file
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
8
diff
changeset
|
45 {'document_root': 'static/', 'show_indexes': True}), |
8
8be7bdae8fb6
Fix some bugs on how static data was served during debug
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
7
diff
changeset
|
46 ) |
8be7bdae8fb6
Fix some bugs on how static data was served during debug
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
7
diff
changeset
|
47 |