Commits

Sergey Astanin committed a7500df

Fixed ImportError on Python 2.6 (__import__ theme's module by path rather than by name).

Comments (0)

Files changed (2)

 	return "<html><head><meta http-equiv=\"refresh\" content=\"0;url=%s\"></head><body></body></html>"%unicode(url,'utf-8')
 
 default_max_pages=12
-template_dir=os.path.join('themes','simple')
+default_theme = 'simple'
 
-TMPL=__import__(template_dir)
+template_dir=os.path.join('themes',default_theme)
+TMPL=__import__('themes.'+default_theme, fromlist='themes')
 service_pages=['sitemap\.xml','robots\.txt',]
 
 class UserEditsData(db.Model):

themes/__init__.py

Empty file added.