Mercurial > agora
annotate urls.py @ 209:4033ebe1867f
Add ability to download files
This makes use of a new model (BundleVersion) to keep track of the
locations on disk of the original uploads for each version. This will
require some manual processing to get it working for existing bundles,
since the information needed isn't being stored at the moment.
author | dellsystem <ilostwaldo@gmail.com> |
---|---|
date | Sun, 17 Feb 2013 14:57:39 -0500 |
parents | 8da14d503af8 |
children | 7ec7f6a30592 |
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 * |
106 | 2 from django.views.generic import ListView |
0
448f907a9d7e
Initial Agora Octave commit
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
3 |
448f907a9d7e
Initial Agora Octave commit
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
4 # Uncomment the next two lines to enable the admin: |
448f907a9d7e
Initial Agora Octave commit
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
5 from django.contrib import admin |
448f907a9d7e
Initial Agora Octave commit
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
6 admin.autodiscover() |
448f907a9d7e
Initial Agora Octave commit
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
7 |
448f907a9d7e
Initial Agora Octave commit
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
8 urlpatterns = patterns('', |
78
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
9 url(r'^$', |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
10 '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
|
11 {'template': 'index.djhtml'}, |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
12 name='home'), |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
13 url(r'^about$', |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
14 '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
|
15 {'template': 'about.djhtml'}, |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
16 name='about'), |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
17 url(r'^help$', |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
18 '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
|
19 {'template': 'help.djhtml'}, |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
20 name='help'), |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
21 url(r'^discuss$', |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
22 '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
|
23 {'template': 'discuss.djhtml'}, |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
24 name='discuss'), |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
25 url(r'^code$', |
106 | 26 'views.code', |
78
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
27 name='code'), |
107 | 28 url(r'^login', |
29 'views.login_register', | |
30 name='login'), | |
78
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
31 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
|
32 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
|
33 url(r'^accounts/logout/', 'django.contrib.auth.views.logout', |
107 | 34 {'template_name' : 'index.djhtml', 'next_page' : '/'} |
35 ), | |
78
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
36 url(r'^accounts/', include('registration.urls')), |
d416b8198889
Use named URLs and the url function where applicable
dellsystem <ilostwaldo@gmail.com>
parents:
63
diff
changeset
|
37 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
|
38 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
|
39 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
|
40 url(r'^bundles/', include('agora.apps.bundle.urls')), |
0
448f907a9d7e
Initial Agora Octave commit
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
41 ) |
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
|
42 |
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
|
43 #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
|
44 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
|
45 |
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
|
46 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
|
47 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
|
48 (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
|
49 {'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
|
50 ) |