annotate apps/bundle/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 c7be7def8b57
children 4033ebe1867f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
6c2d400091fd Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff changeset
1 from django.conf.urls.defaults import *
6c2d400091fd Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff changeset
2
151
c7be7def8b57 Bundles! (basic functionality)
dellsystem <ilostwaldo@gmail.com>
parents: 63
diff changeset
3
177
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents: 151
diff changeset
4 BUNDLE_PATTERN = r'^(?P<user>[^/]*)/(?P<bundle>[^/]+)'
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents: 151
diff changeset
5 VERSION_PATTERN = '(?P<version>\d+)'
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents: 151
diff changeset
6
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents: 151
diff changeset
7
151
c7be7def8b57 Bundles! (basic functionality)
dellsystem <ilostwaldo@gmail.com>
parents: 63
diff changeset
8 urlpatterns = patterns('apps.bundle.views',
177
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents: 151
diff changeset
9 url(BUNDLE_PATTERN + '/?$', 'detail', name='bundle_details'),
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents: 151
diff changeset
10 url(BUNDLE_PATTERN + '/' + VERSION_PATTERN + '/?$', 'detail',
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents: 151
diff changeset
11 name='bundle_version'),
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents: 151
diff changeset
12 url(BUNDLE_PATTERN + '/edit', 'edit', name='bundle_edit'),
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents: 151
diff changeset
13 url(BUNDLE_PATTERN + '/' + VERSION_PATTERN + '/(?P<path>.+)/?$',
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents: 151
diff changeset
14 'file_detail', name='bundlefile_details'),
151
c7be7def8b57 Bundles! (basic functionality)
dellsystem <ilostwaldo@gmail.com>
parents: 63
diff changeset
15 url(r'^$', 'index', name='bundle_new'),
c7be7def8b57 Bundles! (basic functionality)
dellsystem <ilostwaldo@gmail.com>
parents: 63
diff changeset
16 url(r'^explore$', 'explore', name='bundle_explore'),
7
6c2d400091fd Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff changeset
17 )