Installation
Note
If your instance runs on the hosted Juntagrico PaaS this installation is done for you. Continue with the basic setup.
Manual Installation
Juntagrico is an reusable django app. You should create your own django app and install juntagrico as an app (see below).
See the demo app for reference.
Juntagrico can be installed via pip:
$ pip install juntagrico
Django Settings
If you used the cookiecutter template, above this settings will already be set. Otherwise refer to the demo application settings.
Hook URLs in URLconf
Add the juntagrico urls to you urls.py e.g.:
# urls.py
from django.urls import path, include
from django.contrib import admin
urlpatterns = [
path('admin/', admin.site.urls),
path('impersonate/', include('impersonate.urls')),
path('', include('juntagrico.urls')),
]
Initial Django setup
Use the django commands to set up the database e.g.:
$ python -m manage migrate
In production (DEBUG=False
) the static files must be collected e.g.:
$ python -m manage collectstatic
Create a superuser to login into your instance. e.g.:
$ python -m manage createsuperuser
For juntagrico a member needs to be created for the super user using
$ python -m manage create_member_for_superusers
Create Test Data (optional)
If you want to test juntagrico, these commands will populate your new instance with some example data. Do not do this in production!
Simple example data
$ python -m manage generate_testdata
More complex example data
$ python -m manage generate_testdata_advanced
Run the Server
You should now be able to start the django server and open the instance in the browser e.g.:
$ python -m manage runserver