From 0882d73ca1ba4c84ce24c946548c80d9e4d1c04e Mon Sep 17 00:00:00 2001 From: "luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f" <luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f> Date: Sat, 30 Jan 2010 19:19:30 +0000 Subject: added topics to posts --- lib/contact_form/forms.py | 6 +++--- lib/view_wrapper.py | 10 ++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 lib/view_wrapper.py (limited to 'lib') diff --git a/lib/contact_form/forms.py b/lib/contact_form/forms.py index 921d8ee..830db75 100644 --- a/lib/contact_form/forms.py +++ b/lib/contact_form/forms.py @@ -139,12 +139,12 @@ class ContactForm(forms.Form): name = forms.CharField(max_length=100, widget=forms.TextInput(attrs=attrs_dict), - label=u'Your name') + label=u'Name:') email = forms.EmailField(widget=forms.TextInput(attrs=dict(attrs_dict, maxlength=200)), - label=u'Your email address') + label=u'E-mail:') body = forms.CharField(widget=forms.Textarea(attrs=attrs_dict), - label=u'Your message') + label=u'Message:') #from_email = settings.DEFAULT_FROM_EMAIL diff --git a/lib/view_wrapper.py b/lib/view_wrapper.py new file mode 100644 index 0000000..0e1e492 --- /dev/null +++ b/lib/view_wrapper.py @@ -0,0 +1,10 @@ +from django.shortcuts import render_to_response +from django.template.context import RequestContext + +def luxagraf_render(request, *args, **kwargs): + """ + Replacement for render_to_response that uses RequestContext and sets an + extra template variable, TEMPLATE_NAME. + """ + kwargs['context_instance'] = RequestContext(request) + return render_to_response(*args, **kwargs) \ No newline at end of file -- cgit v1.2.3-70-g09d2