('-. .-. ('-. _ .-') ( OO ) / _( OO) ( '.( OO )_ ,--. ,--.(,------.,--. ,-.-') ,--. ,--. ,--. ,--.) | | | | | .---'| |.-') | |OO)| | | | | `.' | | .| | | | | | OO ) | | \| | | .-') | | | |(| '--. | |`-' | | |(_/| |_|( OO )| |'.'| | | .-. | | .--'(| '---.',| |_.'| | | `-' /| | | | | | | | | `---.| |(_| | (' '-'(_.-' | | | | `--' `--' `------'`------' `--' `-----' `--' `--'
A manual for users is available in /helium/static/helium-manual/. Also most of the code is more or less commented thoroughly. Have fun!
See LICENSE.txt for license details (MIT license). Note in particular that
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
If you are using Helium outside of an HMMT context, you should do the following to get it set up with Django.
Create a Django application, as usual:
django-admin startproject example
Clone the Helium repository into a directory "/helium".
git clone https://github.com/vEnhance/helium
In example/urls.py
, add url(r'^helium/', include('helium.urls'))
into urlpatterns.
Thus the file should look something like:
from django.conf.urls import url, include
from django.contrib import admin
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^helium/', include("helium.urls")),
]
In example/settings.py
, add helium
to installed applications:
INSTALLED_APPS = [
'django.contrib.admin',
#...
'django.contrib.staticfiles',
'helium',
]
Configure STATIC and MEDIA settings. This is done in example/settings.py
.
An example of such a setup might be:
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static/')
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media/')
Create a base.html
template, probably for use site-wide.
A working example of such a template is given as helium/templates/base.html.EXAMPLE
.
The template needs, regardless, to have the following blocks, used by Helium.
- In the head of the document, a
helium-stylesheets
block where Helium stylesheets will be loaded - In the body of the document, a
content
block where Helium will insert the page content. If you have a wrapperdiv
of some sort place it around the content block. - A
helium-scripts
block to load Helium-specific Javascript.
If not already included, you should also add JQuery in:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
The Helium models need to be migrated into the application:
python manage.py migrate