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', |
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
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
# 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
<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
# Django settings for testsite project. | |
import os | |
ProjectDir = os.getcwd() | |
print 'ProjectDir', ProjectDir | |
DEBUG = True | |
TEMPLATE_DEBUG = DEBUG | |
ADMINS = ( |
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
#!/usr/bin/env python | |
from django.core.management import execute_manager | |
import imp | |
try: | |
imp.find_module('settings') # Assumed to be in the same directory. | |
except ImportError: | |
import sys | |
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n" % __file__) | |
sys.exit(1) |
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
google.maps.event.addListener(marker, 'click', function() { | |
alert('bubba'); | |
}); |
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
events { | |
worker_connections 1024; | |
use epoll; | |
} | |
http { | |
server { | |
listen 80; | |
server_name 127.0.0.1; | |
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 base import Language, StaffMember, Faq, FaqTranslation, Testimonial, TestimonialTranslation, Address, Branch, CityPart, District | |
from cms import Page, ContentName, OneColumnRow, TwoColumnRow, ThreeColumnRow, EmptyRow, ThreePictureRow, FourPictureRow, RealMedia, TabbedMedia | |
from news import NewsLetterSubscription, NewsLetter, EmailAlert | |
from property import PropertyDescription, PropertyThumbnail, PropertyCoordinate, Property | |
from static_translation import TextElement, TextElementTranslation |
OlderNewer