Installation
Note
If your instance runs on the hosted Juntagrico PaaS this installation is done for you. Continue with the basic setup.
Prerequisites
Make sure python is installed on your system.
Alternative: Install in an existing Django app
If instead you already have a django project you can add juntagrico as an app to it.
Install juntagrico, e.g. via pip:
$ pip install juntagrico
Update Django Settings
Update your projects settings.py.
Refer to settings/minimal.py for the minimal settings required to run Juntagrico.
For sending out emails, the corresponding django settings need to be configured properly. Read the django documentation for more details.
In the demo app you can find a more complete set of settings, suitable for the production environment.
Additional settings will be explained in the basic setup section.
Hook URLs in URLconf
Include these urls to your urls.py:
# 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:
$ python -m manage migrate
In production (DEBUG=False) the static files must be collected:
$ python -m manage collectstatic
Create a superuser with member to login into your instance:
$ python -m manage createadmin
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