Skip to content
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

Fix local dependencies and update documentation #136

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
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
30 changes: 21 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,60 +42,72 @@ The project is currently running on the following versions:

To run the project locally first you need to clone the repository:

```
```bash
git clone https://github.com/vitorfs/parsifal.git
```

Create a virtualenv:

```bash
python3 -m venv venv
```
virtualenv venv -p python3

Active virtualenv:

```bash
source venv/bin/activate
```

Install the development requirements:

```
```bash
pip install -r requirements/local.txt
```

Now you should either setup a local PostgreSQL database or use SQLite.

Create a `.env` file in the project root (you can create one by making a copy of the `.env.example`):

```
```bash
cp .env.example .env
```

Now add the `DATABASE_URL` with the connection string pointing to your local database:

```
```bash
DATABASE_URL=postgres://richardwagner:holygrail@localhost:5432/parsifal
```

Or for SQLite:

```
```bash
DATABASE_URL=sqlite:////tmp/parsifal.sqlite3
```

Or if you want to place it elsewhere:

```
```bash
DATABASE_URL=sqlite:////Users/vitor/dev/parsifal/parsifal.sqlite3
```

Now run the migrations:

```
```bbash
python manage.py migrate
```

Run the local server:

```
```bash
python manage.py runserver
```

Create super user:

```bash
python manage.py createsuperuser
```

## License

The source code is released under the [MIT License](https://github.com/vitorfs/parsifal/blob/master/LICENSE).
4 changes: 2 additions & 2 deletions manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'parsifal.settings.local')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "parsifal.settings.local")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
Expand All @@ -18,5 +18,5 @@ def main():
execute_from_command_line(sys.argv)


if __name__ == '__main__':
if __name__ == "__main__":
main()
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.black]
line-length = 119
target-version = ['py36', 'py37', 'py38']
target-version = ['py36', 'py37', 'py38', 'py39']
include = '\.pyi?$'
exclude = '''
/(
Expand Down
2 changes: 1 addition & 1 deletion requirements/local.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-r tests.txt

django-debug-toolbar==3.5.0
git+git://github.com/jazzband/django-silk.git#egg=django-silk
django-silk==4.4.1
ipython==8.4.0
towncrier==21.9.0