On Dec 8, 10:33 am, Alan <[EMAIL PROTECTED]> wrote:
> Hi There,
> So, I am trying 
> "http://docs.djangoproject.com/en/dev/topics/http/file-uploads/";, but can't
> see the results.
>
> I mean, I am confused because I don't know where to place the template
> (which I believe has to be "contact.html"). I have a folder
> "/mysite/templates/" and the tutorial "mysite/polls" works fine. Thus I have
> "/mysite/templates/polls" and "/mysite/templates/admin".
>
> So I am trying to place "/mysite/templates/contact.html" and when trying 
> "http://localhost:8000/contact/"; I got:
>
> Exception Type: TypeError at /contact/ Exception Value: 'str' object is not
> callable
>
> I still have no idea about how to follow this debugging message.
>
> Should I have to have "/mysite/templates/contact/contact.html"?
>
> Besides, what to put in urls.py ("/mysite/urls.py")?
>
> I am trying:
>
> from django.conf.urls.defaults import patterns, include
>
> # Uncomment the next two lines to enable the admin:
>
> from django.contrib import admin
>
> admin.autodiscover()
>
> urlpatterns = patterns('',
>
>     (r'^admin/(.*)', admin.site.root),
>
>     (r'^contact/', 'contact'),
>
>     (r'^jobs/', include('mysite.jobs.urls')),
>
> )
>
> "http://localhost:8000/jobs/"; and "http://localhost:8000/admin/"; work fines.
>
> Needless to say I am a naive novice to Django.
>
> If someone can point out what I am missing in 
> "http://docs.djangoproject.com/en/dev/topics/http/file-uploads/"; I would
> deeply grateful.
>
> Many thanks in advance.
>
> Alan

Your problem is not with the file uploads stuff, it is in your URL
configuration file (urls.py). I suggest reading this before you do
anything else:
http://docs.djangoproject.com/en/dev/topics/http/urls

Briefly, you have the URL /contact/ in your urls.py but the only thing
you are relating it to is a string, 'contact'. You haven't told Django
where to go when it sees that URL - you need to give it the path of
your view, or (as you have done with /jobs/) the path of another
urls.py to include.
--
DR.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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