Skip to content
Snippets Groups Projects
Commit 239b5a98 authored by dominip89's avatar dominip89
Browse files

Added documentation to start the project properly

parent eef3f9c6
No related branches found
No related tags found
No related merge requests found
# First steps to UniSport-O-Mat
## Some notes
To ensure a clean development and production environment, we will use `virtualenv`. If you have not installed or used it yet, please reffer to the [official documentation](https://pypi.org/project/virtualenv/).
## Starting `virtualenv`
First create a new folder, in which you want to give this project a new home. Then, create a new `virtualenv` via this command in your terminal
```
virtualenv -p python3 .
```
You'll see a few new folders and a config file for your `virtualenv`. You can start the new environment via this command in your terminal, depending on your OS.
Linux/MacOS:
```
source bin/activate
```
Windows
```
Scripts/activate
```
If done correctly, you'll see the name of the virtual environment printed at the beginning of your command promt, eg. in bash:
```
(unisport-o-mat) 18:57:55 [foo@bar unisport-o-mat]$
```
## Cloning the project
To clone the project via `git`, please enter one of these commands via your terminal, depending on your preferred way to authenticate.
Via HTTPS:
```
git clone https://git.imp.fu-berlin.de/swp-unisport/team-warumkeinrust/unisport-o-mat.git
```
Via ssh:
```
git clone git@git.imp.fu-berlin.de:swp-unisport/team-warumkeinrust/unisport-o-mat.git
```
## Installing dependencies
You can verify that no python libraries are installed in your `virtualenv`, if you enter the following command via terminal. It should not return any modules right now.
```
python -m pip freeze
```
All required dependency, such as Django, will be installed via `pip` and a text file, such as `requirements.txt`. First, switch the current directory via `cd` into the cloned folder. Then, install the dependencies all at once via this command in your terminal.
```
python -m pip install -r requirements.txt
```
## Starting the django web server
To start the web server, change the directory via `cd` in the project folder. Here you will find the `manage.py` script, which will be used to start commands depending on the Django framework. Start the web server via this command in your terminal.
```
python manage.py runserver
```
If successful, you can now see the running server in your browser at `http://127.0.0.1:8000`.
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment