Django project for web experiences

Jérôme BUISINE c7c75c7a3e Merge tag 'v0.2.6' into develop 4 anni fa
ThesisWebExpeDjango 42ffcdd4bd Automatically create super user on django 5 anni fa
expe 68c39d09d7 Fix template issue 4 anni fa
static c0d4fef5fe Merge pull request #5 from prise-3d/dev/experiment 4 anni fa
.dockerignore 8f18f9fa38 Add of dockerignore file 5 anni fa
.gitignore 42ffcdd4bd Automatically create super user on django 5 anni fa
DOCUMENTATION.md a0c9c29235 Update of project use 5 anni fa
Dockerfile a03d878162 Add static python docker image version 5 anni fa
Makefile af1948331d Update clean make commands 5 anni fa
README.md 63a3926918 Update of documentation 5 anni fa
__init__.py 1ffcef1620 Update whole application 5 anni fa
create_admin.sh 42ffcdd4bd Automatically create super user on django 5 anni fa
credentials.example.json d36257af09 Rename of credentials file 5 anni fa
docker-compose.yml 1ffcef1620 Update whole application 5 anni fa
manage.py 58e57f85d6 First project version 5 anni fa
requirements.txt a0c9c29235 Update of project use 5 anni fa

README.md

Django Web expe

Description

Web site which contains experimentss on synthesis images (perception of noise).

Installation

1. Manually

Requirements

You need to have python, pip

pip install -r requirements.txt

Initialize the database with the following command :

python manage.py migrate

Add your own super user admin credentials:

cp credentials.example.json credentials.json
{
    "username":"username",
    "email":"",
    "password":"pass"
}

Run server

Run the server :

python manage.py runserver

or if you want to make it listen on a specific port number :

python manage.py runserver 8080

2. Using docker (recommended)

First, you need to add your own user admin credentials if you wished:

cp credentials.example.json credentials.json

You can use make commands:

make build
make run

Or simply:

make deploy

Will run build and run commands at once.

You also have stop, remove, clean commands:

  • stop: stop current container instance if exists
  • remove: stop and remove container instance if exists
  • clean: remove docker image if exists

Configuration

Create your own admin user:

python manage.py createsuperuser

You can now access /admin/results route with your credentials in order to download experiments results.


Configure your own URL prefix using WEBEXPE_PREFIX_URL:

WEBEXPE_PREFIX_URL=experiments python manage.py runserver

or using docker:

WEBEXPE_PREFIX_URL=experiments make deploy

Using custom API base URL using WEB_API_PREFIX_URL:

WEBEXPE_PREFIX_URL=experiments/ WEB_API_PREFIX_URL=expe/api python manage.py runserver

or using docker:

WEBEXPE_PREFIX_URL=experiments/ WEB_API_PREFIX_URL=expe/api make deploy

Create your experimentss

See DOCUMENTATION.md. This documentation explains how to create your own experiments.

How to contribute ?

This project uses git-flow to improve cooperation during the development.

For each feature, you have to create a new git flow feature branch.

Licence

MIT