This is the online event registration web application for ISP project.
More information, visit our Homepage!
- Python3.6 or Python3.7
- pip
- pipenv
- postgreSQL 9.6.2 or newer [optional]
Note:
-
If you use Python3.8, it'll occur the error.
Read here how to fix: issues #84. -
Download PostgreSQL Database (Recommend: Postgre12)
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
.
-
Check python version (it should be 3.6 or 3.7).
python --version
-
Install
pipenv
pip install pipenv
-
Install all required packages.
pipenv install -r requirements.txt
-
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. -
-
Activate
pipenv
pipenv shell
-
Initialize database:
python manage.py makemigrations python manage.py makemigrations eve_holder python manage.py migrate
-
Import data
python manage.py group python manage.py loaddata auth_users
-
Exit the
pipenv
exit
-
Start the server int the
pipenv
pipenv shell python manage.py runserver
This starts the web server at port 8000.
-
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
-
In web browser, paste the link: http://127.0.0.1:8000/
-
You can stop the python server by press CTRL-C in terminal that you run server. Then exit the
pipenv
exit
- Problem with pipenv when using Python3.8 or/and macOS
Follow this instruction: issues #84
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
.
Name | Lastname | Github |
---|---|---|
Kongtapp | Veerawattananun | KongtappV |
Metaras | Charoenseang | metaras |
Pattarin | Wongwaipanich | pattarinn |
Vichisorn | Wejsupakul | james31366 |