Skip to content

Update README.md #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 2, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 25 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# [pyGhana](http://pythonghana.org/)
# [PyGhana](http://pythonghana.org/)

This is the source code for the http://pythonghana.org/ website.

# Running the site locally

## Requirments

* [Python 3.5](https://python.org)
* [Django - python web framework](https://www.djangoproject.com/)
* [Virtualenvwrapper](https://virtualenvwrapper.readthedocs.io)
* [Python 3.6.3](https://python.org)
* [Django ](https://www.djangoproject.com/)
* [virtualenv](https://virtualenv.pypa.io/en/stable/) or [Virtualenvwrapper](https://virtualenvwrapper.readthedocs.io)

## Installation on Linux

Expand All @@ -20,7 +20,7 @@
```
sudo apt-get install python-virtualenv

virtualenv --python=python3.5 myvenv
virtualenv --python=python3.6.3 myvenv

source myvenv/bin/activate

Expand All @@ -32,41 +32,48 @@

(myvenv) $ python manage.py runserver
```

## Installation on Windows
* Copy the IP address provided once your server has completed building the site. (It will say something like >> Serving at 127.0.0.1....).
* Open the address in the browser
* Don't forget to Change ALLOWED_HOSTS = ['127.0.0.1'] in settings.py
* `Note`: It is important that when you create your virtualenv, do not create it in the same folder as the code you downloaded.


## Installation on Windows

* [Follow the guide here](https://help.github.com/articles/fork-a-repo) on how to clone or fork a repo
* [Follow the guide here](http://pymote.readthedocs.io/en/latest/install/windows_virtualenv.html) on how to create virtualenv

* To create a normal virtualenv (example _myvenv_) and activate it (see Code below).

```
1. Create main project folder with name of your choice (eg. PythonGhana)
1. Create main project folder with name of your choice (eg. Python Ghana)

2. Create second folder in the root or main folder called PythonGhana and clone #(git clone url) the project into that folder.

2. Open the command prompt and navigate the project folder

3. virtualenv PythonGhana-env # Create a virtual environment for the project with it's own packages.

4. cd PythonGhana-env # Move into the virtual environment folder.
4. PythonGhana-env\Scripts\activate # Move into the virtual environment folder and activate the environment.

5. cd Scripts/ activate # Activate the virtual environment.

6. cd .. # move back into main project folder.
5. cd .. # move back into main project folder.

7. cd PythonGhana # Move into main project folder.

8. python manage.py makemigrations # Prepare database migrations.
6. cd TodoList # Move into second (PythonGhana) folder.
7. pip install -r requirements.txt # install the requirements.

9. python manage.py migrate # Migrate the data into the database.
8. python manage.py migrate # Migrate the data into the database.

10. python manage.py runserver # Run the server.
9. python manage.py runserver # Run the server.

NOTE: You can use any text editor or IDE of your choice.
NOTE: You can use any text editor or IDE of your choice.
```
* Copy the IP address provided once your server has completed building the site. (It will say something like >> Serving at 127.0.0.1....).
* Open the address in the browser
* Don't forget to Change ALLOWED_HOSTS = ['127.0.0.1'] in settings.py
* `Note`: It is important that when you create your virtualenv, do not create it in the same folder as the code you downloaded.


# Contributing

Read our [Contributing Guide](./CONTRIBUTING.md) on how to contribute to the project.