Hey guys, Whenever i try and add a contact form (from the django book)
into my current website, all my css/javascripts stop working. What is
the issue? Here are my codes:
#views.py
def contact(request):
if request.method == 'POST':
form = ContactForm(request.POST)
if form.is_valid():
cd = form.cleaned_data
send_mail(
cd['subject'],
cd['message'],
cd.get('email', '[email protected]'),
['[email protected]'],
)
return HttpResponseRedirect('/contact/thanks/')
else:
form = ContactForm()
return render_to_response('/var/djcode/oneadmin/templates/
oneadmissions/contact.html', {'form': form})
#forms.py
from django import forms
class ContactForm(forms.Form):
subject = forms.CharField()
email = forms.EmailField()
message = forms.CharField()
name = forms.CharField()
#urls.py
urlpatterns = patterns('',
...
(r'^contact-form/', views.contact),
...
)
I have my static folder and everything created properly, its working
perfectly fine until i input the chapter on forms. Help please!
--
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.