This commit is contained in:
rolux 2011-11-02 17:26:38 +00:00
commit 634eedeab7
3 changed files with 16 additions and 3 deletions

View file

@ -38,7 +38,7 @@ def _order_query(qs, sort, prefix='sort__'):
sort.append({'operator': '+', 'key': 'director'})
elif sort[0]['key'] == 'director':
sort.append({'operator': '-', 'key': 'year'})
sort.append({'operator': '-', 'key': 'title'})
sort.append({'operator': '+', 'key': 'title'})
elif sort[0]['key'] == 'year':
sort.append({'operator': '+', 'key': 'director'})
sort.append({'operator': '+', 'key': 'title'})
@ -46,7 +46,6 @@ def _order_query(qs, sort, prefix='sort__'):
sort.append({'operator': '+', 'key': 'director'})
sort.append({'operator': '-', 'key': 'year'})
sort.append({'operator': '+', 'key': 'title'})
for e in sort:
operator = e['operator']
if operator != '-':

View file

@ -0,0 +1,7 @@
{{name}},
thanks for your message, we will get back to you shortly.
here your message for forther reference
{{message}}
--
{{sitename}}

View file

@ -561,7 +561,14 @@ def contact(request):
if request.user.is_authenticated() \
and 'receipt' in data \
and data['receipt']:
message = data['message'].strip()
template = loader.get_template('contact_receipt.txt')
context = RequestContext(request, {
'email': email,
'message': data['message'].strip(),
'name': name,
'sitename': settings.SITENAME,
})
message = template.render(context)
try:
send_mail(subject.strip(), message, email_from, [email])
except: