I also noticed one more thing, in general, all html functions stopped working with render_to_response i think. Like i have a function that gets the current path ({% request.path == ".." %}). That also isn't working. And even when I hard-code it, it doesn't make a difference. any suggestions?
On Jun 11, 12:17 am, raj <nano.ri...@gmail.com> wrote: > Another thing i just noticed, When i view the source of my contact > form, all the css/javascript includes are missing part of the path > where i placed a {{ STATIC_URL }} tag. Why isn't this tag being > rendered? Thank you. > > On Jun 11, 12:14 am, raj <nano.ri...@gmail.com> wrote: > > > > > > > > > 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', 'nore...@example.com'), > > ['siteow...@example.com'], > > ) > > 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 django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.