2011-05-30 09:03:04 +10:00
|
|
|
from django.conf.urls.defaults import *
|
|
|
|
from django.conf import settings
|
|
|
|
from django.contrib import admin
|
|
|
|
from piston.resource import Resource
|
|
|
|
from pastebin.apps.api.handlers import SnippetHandler
|
|
|
|
|
|
|
|
admin.autodiscover()
|
|
|
|
snippet_resource = Resource(handler=SnippetHandler)
|
|
|
|
|
|
|
|
urlpatterns = patterns('',
|
|
|
|
url(r'^about/$', 'django.views.generic.simple.direct_to_template', {'template': 'about.html'}, name='about'),
|
2011-06-08 19:23:39 +10:00
|
|
|
url(r'^admin/', include(admin.site.urls)),
|
2011-06-08 20:23:08 +10:00
|
|
|
|
2011-05-30 09:03:04 +10:00
|
|
|
url(r'^api/(?P<secret_id>[^/]+)/$', snippet_resource),
|
2011-06-09 01:13:52 +10:00
|
|
|
url(r'^api/$', snippet_resource),
|
|
|
|
(r'^', include('pastebin.apps.dpaste.urls')),
|
2011-05-30 09:03:04 +10:00
|
|
|
)
|