Installation/Setup (Devel system)
- Prepare your local system:
$ sudo zypper in python3-pip python3-virtualenv python3-devel libopenssl-devel openldap2-devel
- Check out the sources:
$ git clone git@github.com:openSUSE/orthos2.git $ cd orthos2/
- Create the virtual Python environment (virtualenv), activate it and update pip
$ virtualenv .env Using base prefix '/usr' New python executable in .env/bin/python3 Also creating executable in .env/bin/python Installing setuptools, pip, wheel...done. $ . .env/bin/activate $ pip install --upgrade pip Collecting pip ...
- Install the required Python modules for development:
$ pip install -r requirements-devel.txt Collecting django ... $ cd orthos2/
- Dump Database Model:
cd /usr/lib/orthos2 sudo -u orthos ./manage.py makemigrations data frontend taskmanager api
- Migrate (create) the database:
$ python manage.py migrate Operations to perform: Apply all migrations: admin, auth, authtoken, contenttypes, data, sessions, taskmanager Running migrations: Applying ...
- Load initial data:
$ python manage.py loaddata data/fixtures/*.json Installed 94 object(s) from 7 fixture(s) $ python manage.py loaddata taskmanager/fixtures/*.json Installed 2 object(s) from 1 fixture(s)
- Create a superuser (administrator) account:
$ python manage.py createsuperuser Username (leave blank to use '<your_login>'): admin Email address: <your_login>@domain.de Password: ******** Password (again): ******** Superuser created successfully.
- Run the test server:
$ python manage.py runserver localhost:8000 Performing system checks... System check identified no issues (0 silenced). November 23, 2017 - 16:25:35 Django version 1.11.7, using settings 'orthos2.settings' Starting development server at http://localhost:8000/ Quit the server with CONTROL-C.
Open your browser and go to http://localhost:8000 or
http://localhost:8000/admin (use the superuser login here).