diff options
author | luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f <luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f> | 2010-01-30 19:19:30 +0000 |
---|---|---|
committer | luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f <luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f> | 2010-01-30 19:19:30 +0000 |
commit | 0882d73ca1ba4c84ce24c946548c80d9e4d1c04e (patch) | |
tree | 605e2284e175e80477fd7b6a6e9e2a2fcae94236 /lib | |
parent | 7300519c054838511ba2584394620d0841b88e5f (diff) |
added topics to posts
Diffstat (limited to 'lib')
-rw-r--r-- | lib/contact_form/forms.py | 6 | ||||
-rw-r--r-- | lib/view_wrapper.py | 10 |
2 files changed, 13 insertions, 3 deletions
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 |