Browse Source

Template Loading doesn't use settings_local anymore

Roland Haroutiounian 8 years ago
parent
commit
5acf09a1ee
2 changed files with 4 additions and 2 deletions
  1. 2
    2
      Template/Loader.py
  2. 2
    0
      settings.py

+ 2
- 2
Template/Loader.py View File

1
 #-*- coding: utf-8 -*-
1
 #-*- coding: utf-8 -*-
2
 
2
 
3
 import jinja2
3
 import jinja2
4
-import settings_local
4
+import settings
5
 
5
 
6
 
6
 
7
 class TemplateLoader(object):
7
 class TemplateLoader(object):
12
     #                          it to the root "/". By default, it will be the root of the project, defined in the
12
     #                          it to the root "/". By default, it will be the root of the project, defined in the
13
     #                          settings of the application
13
     #                          settings of the application
14
     # @param follow_links bool : indicates whether or not to follow the symbolic links (default: True)
14
     # @param follow_links bool : indicates whether or not to follow the symbolic links (default: True)
15
-    def __init__(self, search_path=settings_local.base_path, follow_links=True):
15
+    def __init__(self, search_path=settings.base_path, follow_links=True):
16
         self.search_path = search_path
16
         self.search_path = search_path
17
         self.follow_links = follow_links
17
         self.follow_links = follow_links
18
 
18
 

+ 2
- 0
settings.py View File

2
 ## @package settings Configuration file
2
 ## @package settings Configuration file
3
 
3
 
4
 import pymysql
4
 import pymysql
5
+import os
5
 
6
 
7
+base_path = os.path.dirname(os.path.abspath(__file__))
6
 debug = False
8
 debug = False
7
 debug_sql = False
9
 debug_sql = False
8
 
10
 

Loading…
Cancel
Save