coding utf-8 from django conf urls defaults import from django contrib

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# -*- coding: utf-8 -*-
from django.conf.urls.defaults import *
from django.contrib import admin
from apps.accounts.views import auth, logout
from apps.gallery.views import upload_image, add_catalog, add_album, show_category, index, show_normal_image
admin.autodiscover()
urlpatterns = patterns('',
(r'^get_session/$', auth),
(r'^logout/$', logout),
(r'^upload_image/$', upload_image),
(r'^add_catalog/$', add_catalog),
(r'^add_album/$', add_album),
(r'^admin(.*)', admin.site.root),
(r'^catalog/(\d{1,2})/$', show_category),
(r'^(\d{1,2})/(\d{1,2})/(\d{1,2})/$', show_normal_image),
(r'^$', index),
)
#http://localhost/media/images/1/3/16