/EveHolder

This is the online event registration web application for the ISP project

Primary LanguagePython

EveHolder

EveGroup codecov

This is the online event registration web application for ISP project.
More information, visit our Homepage!

Requirements

  • Python3.6 or Python3.7
  • pip
  • pipenv
  • postgreSQL 9.6.2 or newer [optional]

Note:

Setup for EveHolder Web application

Download the code from git using git clone. Do the following step to use this application.

python3 refers to the Python 3 command using in Linux and Mac system. For window use python or py.

  1. Check python version (it should be 3.6 or 3.7).

    python --version
  2. Install pipenv

    pip install pipenv
  3. Install all required packages.

    pipenv install -r requirements.txt
  4. In the project root directory/mysite, copy sample.env and change to .env(file name begin with "."). Then edit .env and set values of these variables as desired.

    SECRET_KEY=any-random-string-will-work
    # set DEBUG to True for testing and local development
    DEBUG=False
    
    # If you use postgreSQL you need the DATABASE_URL in .env
    DATABASE_URL=psql://postgres:postgrespassword@127.0.0.1:port/database_name
    
    TIME_ZONE=Asia/Bangkok

    Not use postgreSQL:

    You don't have to use DATABASE_URL and use the default setting instead,
    which means you will use sqlite3 database instead of PostgreSQL.

    Use postgreSQL:

    • At DATABASE_URL

      • postgrespassword is a password of your postgreSQL that you created when you install the postgreSQL program.

      • port is a port of your postgreSQL database port.

      • database_name is the name of your database that you created.

    For more information about .env, see more at Django-environ.

  5. Activate pipenv

    pipenv shell
  6. Initialize database:

    python manage.py makemigrations
    python manage.py makemigrations eve_holder
    python manage.py migrate
  7. Import data

    python manage.py group
    python manage.py loaddata auth_users
  8. Exit the pipenv

    exit

Running the application

  1. Start the server int the pipenv

    pipenv shell
    python manage.py runserver

    This starts the web server at port 8000.

  2. You should see this messages printed from the terminal.

    System check identified no issues (0 silenced).
    November 20, 2020 - 03:03:29
    Django version 3.1.3, using settings 'mysite.settings'
    Starting development server at http://127.0.0.1:8000/
    Quit the server with CTRL-BREAK.

    If you get a message about the port is busy, you can change port by specify a port after run command.

    python manage.py 8080
  3. In web browser, paste the link: http://127.0.0.1:8000/

  4. You can stop the python server by press CTRL-C in terminal that you run server. Then exit the pipenv

    exit

Installation Problem

  • Problem with pipenv when using Python3.8 or/and macOS
    Follow this instruction: issues #84

Username and password of initial user

This is the sample accounts for the login to the application.

  • For the login as visitor: Username: visitor1 password: Hackpass.
  • For the login as host: Username: Host1 password: Hackpass.

Team Members

Name Lastname Github
Kongtapp Veerawattananun KongtappV
Metaras Charoenseang metaras
Pattarin Wongwaipanich pattarinn
Vichisorn Wejsupakul james31366

Links to docs