testappproj/urls.py~
changeset 0 0b061d58aea3
equal deleted inserted replaced
-1:000000000000 0:0b061d58aea3
       
     1 # Copyright 2008 Google Inc.
       
     2 #
       
     3 # Licensed under the Apache License, Version 2.0 (the "License");
       
     4 # you may not use this file except in compliance with the License.
       
     5 # You may obtain a copy of the License at
       
     6 #
       
     7 #     http://www.apache.org/licenses/LICENSE-2.0
       
     8 #
       
     9 # Unless required by applicable law or agreed to in writing, software
       
    10 # distributed under the License is distributed on an "AS IS" BASIS,
       
    11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       
    12 # See the License for the specific language governing permissions and
       
    13 # limitations under the License.
       
    14 
       
    15 """Top-level URL mappings for Rietveld."""
       
    16 
       
    17 # NOTE: Must import *, since Django looks for things here, e.g. handler500.
       
    18 import os
       
    19 import sys
       
    20 from django.conf.urls.defaults import *
       
    21 from registration.views import register
       
    22 from testappproj.testapp.forms import Tets_UserForm
       
    23 from django.contrib import admin
       
    24 admin.autodiscover()
       
    25 
       
    26 
       
    27 
       
    28 urlpatterns = patterns('',
       
    29                        (r'^$', 'testappproj.testapp.views.index'),
       
    30                        url(r'^accounts/register/$',register,{'form_class' : Test_UserForm},name='registration_register'),
       
    31     		       (r'^accounts/', include('registration.urls')),
       
    32                        (r'^code/(\d+)/$', 'testappproj.testapp.views.code'),
       
    33                        (r'^admin/(.*)', admin.site.root),
       
    34                        (r'^new/$', 'testappproj.testapp.views.new_edit'),
       
    35                        (r'^problems/$', 'testappproj.testapp.views.problems'),
       
    36                        (r'^run/$', 'testappproj.testapp.views.run'),
       
    37                        (r'^upload/$', 'testappproj.testapp.views.upload'),
       
    38                        (r'^static/(?P<path>.*)$', 'django.views.static.serve',
       
    39      		      {'document_root': os.path.realpath(os.path.dirname(
       
    40         		sys.modules[__name__].__file__) + '/static/')}),
       
    41                        (r'^shell/$', 'testappproj.testapp.views.shell')
       
    42 
       
    43 )
       
    44