Mercurial > agora-palash
view urls.py @ 177:86129d185ddb
Add versioning to bundles
Some other bundle-related changes were made, including:
* Editing the snippetform CSS and HTML to allow bundle/form.djhtml to
be reused for editing
* Changing {% block title %} to {% block section %} in the base
template for bundles to allow for more flexibility when creating
breadcrumbs
* Saved common URL patterns in variables in bundle/urls.py
* Renamed explore.html to explore.djhtml for consistency
You should now be able to upload new versions as well as view the files
(or a particular file) for a bundle at a specific version.
Coming soon: the ability to add a timestamp and a comment for each new
uploaded version (if this feature is desirable).
author | dellsystem <ilostwaldo@gmail.com> |
---|---|
date | Sat, 20 Oct 2012 23:28:50 -0400 |
parents | 8da14d503af8 |
children | 7ec7f6a30592 |
line wrap: on
line source
from django.conf.urls.defaults import * from django.views.generic import ListView # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'index.djhtml'}, name='home'), url(r'^about$', 'django.views.generic.simple.direct_to_template', {'template': 'about.djhtml'}, name='about'), url(r'^help$', 'django.views.generic.simple.direct_to_template', {'template': 'help.djhtml'}, name='help'), url(r'^discuss$', 'django.views.generic.simple.direct_to_template', {'template': 'discuss.djhtml'}, name='discuss'), url(r'^code$', 'views.code', name='code'), url(r'^login', 'views.login_register', name='login'), url(r'^admin/doc/', include('django.contrib.admindocs.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^accounts/logout/', 'django.contrib.auth.views.logout', {'template_name' : 'index.djhtml', 'next_page' : '/'} ), url(r'^accounts/', include('registration.urls')), url(r'^licenses/', include('agora.apps.free_license.urls')), url(r'^users/', include('agora.apps.profile.urls')), url(r'^snippet/', include('agora.apps.snippet.urls')), url(r'^bundles/', include('agora.apps.bundle.urls')), ) #Let Django itself serve static data during debugging from django.conf import settings if settings.DEBUG: urlpatterns += patterns('', (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': 'static/', 'show_indexes': True}), )