Where to put project files¶
Relative to the project root:
- Put your template files in
- Put your static files (js/css/static images) in
- Put your layout template files in
Anything you put in the
templates directories will override the
default ICEkit static files and templates.
ICEkit projects use pip-tools to keep requirements fresh, even when the versions are pinned.
Add project-specific requirements to
requirements.in and compile into
requirements.txt by running
You can specify additional Bower components in
bower.json and Node modules
How do I add project-specific URLs?¶
urls.py file in a project folder of your choice, such as
myproject. It can contain something like:
from django.conf.urls import include, patterns, url urlpatterns = patterns( 'myproject.views', ... your URLs here ... # finally, fall back to ICEkit/GLAMkit URLs. url('', include('icekit.project.urls')), # use `icekit.project.glamkit_urls` if this is a GLAMkit project ]
project_settings.py, override the default URL path:
ROOT_URLCONF = 'myproject.urls'
How do I override ICEkit’s base template?¶
All ICEkit templates extend a template named
base.html which is automatically
provided by ICEkit. To change the base template, you can add a file named
base.html into your root
templates directory. This ensures that all
ICEkit templates will now default to using your template as a base.
To ensure maximum compatibility with ICEkit’s conventions for block names, we recommend referring to the names in ICEkit’s base template.
Where’s my virtualenv? How do I modify a source package?¶
If you’re running in Docker, the requirements are installed in the Docker image and aren’t on your local machine.
After opening a shell, you can see what those requirements are with:
$ pip freeze
Or install packages (into
$ pip install django-debug-toolbar
Or install editable packages (into
$ pip install -e 'git+https://github.com/ic-labs/django-icekit.git#egg=django-icekit'
Or list just the additional packages that you have already installed:
$ pip freeze --user
You can also create a
requirements-local.txt file (ignored by Git) that will
be installed automatically when the project is started.