I created a view and template dummy / dummy.html to use in new urls
for testing.

Despite the fact that both are defined, I get NameError:

The other urls defined work fine, if I take the refs to dummy out of
urls.py.  As is, nothing works.
+++++++++++++++++++++++++++++++++++++===
Here's urls.py:

from django.conf.urls.defaults import *
from django.conf import settings
import os
from frodo.views import welcome
from frodo.views import outside_home

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
        # Example:
    # (r'^frodo/', include('frodo.foo.urls')),
    # Outside homepage
    (r'^$', outside_home),
    # Welcome page (after login)
    (r'^welcome/$', welcome),
    (r'^login/$', dummy),
         (r'^upload/$', dummy),
    (r'^download/$', dummy),

    # Uncomment the admin/doc line below and add
'django.contrib.admindocs'
    # to INSTALLED_APPS to enable admin documentation:
    (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
     (r'^admin/(.*)', admin.site.root),

)
    # serve static in debug
if settings.DEBUG:
    urlpatterns += patterns('',
        (r'^static_media/(?P<path>.*)$', 'django.views.static.serve',
        {'document_root': '/home/les/django/frodo/static_media'}),
    )
+++++++++++++++++++++++++++++++++++++++++++
Here's views.py:
from django.shortcuts import render_to_response
from django.http import HttpResponse

# Outside home page (before login)
def outside_home(request):
        return render_to_response('outside_home.html', {"MEDIA_URL" : '/
static_media/'})

# Home page after login
def welcome(request):
        userName = "George"
        return render_to_response('welcome.html',{"userName" : userName})

# Place holder
def dummy(request):
        return render_to_response('dummy.html')
++++++++++++++++++==
Here's dummy.html:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/
TR/html4/strict.dtd">
<html>
<head>
<title>Dummy page</title>
</head>
<body>
<h1>Dummy page</h1>
</body>
</html>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to