Quick InstallΒΆ
Template3d can run from the python installation directory while allowing the developer to manipulate its functionality in individual projects. There are no required project settings other than the ones listed below.
Note
If you do not define STANDARD_TEMPLATE_DIRS in the projects settings.py file, templates will be
used from the global installation directory. You can retrieve this setting with a python manage.py template3d -l
and put your original templates there. These will be availible to all projects.
- Quick Install:
hg clone https://surgemcgee@bitbucket.org/surgemcgee/django_template3dcd django_template3d/python setup.py installcd /var/wwwdjango-admin.py startproject new_projectcd new_project/Copy the
servedirectory from template3d package to the new_project base directory.- Add the necessary settings to new_project settings.py
- import os
- PROJECT_DIR = os.path.dirname(__file__)
- TEMPLATE_DIRS = (os.path.join(PROJECT_DIR, ‘serve/templates/’) )
- STATICFILES_DIRS = (os.path.join(PROJECT_DIR, ‘serve/’),)
- Add “template3d” to INSTALLED_APPS
Add:
url(r'^template3d/', include('template3d.urls')),to new_project urls.pypython manage.py template3dpython manage.py runserverNavagate to http://localhost:8000/template3d