blob: 77f26281f37c72bb7cddf8a943d6bab65ef8880f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import sys, os
sys.path.append('/home/luxagraf/webapps/django1_1')
sys.path.append('/home/luxagraf/webapps/django1_1/luxagraf')
sys.path.append('/home/luxagraf/webapps/django1_1/luxagraf/apps')
sys.path.append('/home/luxagraf/webapps/django1_1/luxagraf/lib')
sys.path.append('/home/luxagraf/webapps/django1_1/lib/python2.5/')
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
from django.template import Context,loader
from django.conf import settings
from locations.models import Region
c = Context({'region_list': Region.objects.all(),})
t = loader.render_to_string('includes/regions_sidebar_template.html',c)
fpath = '%s%s' %(settings.PROJ_ROOT,'templates/includes/regions_sidebar.html')
file = open(fpath, 'w')
file.write(t)
file.close()
|