This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" charset="utf-8"> | |
var min_trans = '{% gettext searchboxes-form-min %}'; | |
var max_trans = '{% gettext searchboxes-form-max %}'; | |
var sale_type = 'R'; | |
var sales_min_prices = [{% for num in sales_min_prices %}{{ num }}{% if not forloop.last %},{% endif %}{% endfor %}]; | |
var sales_max_prices = [{% for num in sales_max_prices %}{{ num }}{% if not forloop.last %},{% endif %}{% endfor %}]; | |
var rentals_min_prices = [{% for num in rentals_min_prices %}{{ num }}{% if not forloop.last %},{% endif %}{% endfor %}]; | |
var rentals_max_prices = [{% for num in rentals_max_prices %}{{ num }}{% if not forloop.last %},{% endif %}{% endfor %}]; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# views.py | |
def landlords(request, lang_code): | |
template_dict = generate_base_dict(lang_code, '/landlords/') | |
template_dict['previous_developments'] = [TestimonialDummy('/static/images/prev_dev_thumb1.jpg', 'Cadwell House, London SW13') for i in range(3)] | |
template_dict['three_element'] = [i for i in range(1,4)] | |
return render_to_response('pages/landlords.html', template_dict, context_instance = RequestContext(request)) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server.document-root = "/var/www/sites/test_project/" | |
server.modules = ("mod_rewrite", "mod_access", "mod_fastcgi", "mod_accesslog", "mod_alias") | |
accesslog.filename = "/var/log/lighttpd.log" | |
fastcgi.server = ( | |
"testsite.fcgi" => ( | |
"main" => ( | |
"host" => "127.0.0.1", | |
"port" => 8080, | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django import template | |
from life.models import * | |
register = template.Library() | |
def get_text(parser, token): | |
print 'token:', token.contents | |
tag_name, element_id = token.split_contents() | |
return TranslatedTextNode(element_id, True) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Environment: | |
Request Method: GET | |
Request URL: http://192.168.44.128:8000/uk/ | |
Django Version: 1.3 | |
Python Version: 2.6.5 | |
Installed Applications: | |
['django.contrib.auth', |
NewerOlder