Project LEO
Project LEO is a very serious survey of the most important constellation.
Next steps
Other Resources
{% recent_comments %}
{% recent_targets %}
{% endblock %}
Look for the block of HTML we changed between the and comments. Everything else is
the same as the base template.
We’ve just changed a few lines of HTML, but basically left the template
alone. Reload your homepage, and you should see something like this:
|image1|
Thats it! You’ve just customized your TOM homepage.
Using static files
~~~~~~~~~~~~~~~~~~
Instead of linking to an image hosted online already, we can display
static files in our project directly. For this we will use `Django’s
static
files
`__
capabilities.
If you ran the tom_setup script, you should have a directory ``static``
at the top level of your project. Within this folder, make a directory
``img``. In this folder, place an image you’d like to display on your
homepage. For example, ``mytom.jpg``.
::
cp mytom.jpg static/img/
Now let’s edit our template to use Django’s ``static`` template tag to
display the image:
.. code:: html
{% raw %}
{% endraw %}
After reloading the page, you should now see ``mytom.jpg`` displayed
instead of the remote cat image.
Further Reading
~~~~~~~~~~~~~~~
Any template included in the TOM Toolkit (or any other Django app) can
be customized. Please see the `official Django
docs
`__
for more details.
.. |image0| image:: /_static/customize_templates_doc/tomhomepagenew.png
.. |image1| image:: /_static/customize_templates_doc/tomhomepagemod.png