https://github.com/fandredev/django-recipes
An application using Django Web Framework and DRF to pin content
https://github.com/fandredev/django-recipes
django django-rest-framework pytest python selenium unittest
Last synced: about 2 months ago
JSON representation
An application using Django Web Framework and DRF to pin content
- Host: GitHub
- URL: https://github.com/fandredev/django-recipes
- Owner: fandredev
- Created: 2024-01-27T18:55:32.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-12T21:33:46.000Z (over 1 year ago)
- Last Synced: 2025-02-12T22:30:28.316Z (over 1 year ago)
- Topics: django, django-rest-framework, pytest, python, selenium, unittest
- Language: Python
- Homepage:
- Size: 212 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- Authors: authors/__init__.py
Awesome Lists containing this project
README
## Stack used

**Tests:** Pytest, Unittest
**Lint:** Ruff
## Authors
[@fandredev](https://www.linkedin.com/in/devfandre/)
## Installation with uv:
### First, clone this repository.
```bash
git clone git@github.com:fandredev/django-recipes.git
```
## Install dependencies and create environment
```bash
uv sync
```
## Run migrations to database
```bash
uv run python manage.py migrate
```
## Create a superuser
```bash
uv run python manage.py createsuperuser
```
## Clone the .env.example to .env before run server
```bash
cp .env.example .env
```
## Run development server
```bash
uv run python manage.py runserver
```
## Open development server
Open browser and put http://127.0.0.1:8000/ in URL browser.
## Open Django Admin
In another tab, open browser and put http://127.0.0.1:8000/admin in URL browser. Log in with your superuser
## Run tests with unittest
```bash
uv run python manage.py test
```
## Run ALL tests with pytest
```bash
uv run pytest
```
## Run functional tests with Selenium
```bash
uv run pytest -m 'functional'
```
## Run coverage with pytest
```bash
uv run coverage run -m pytest
```
## Open coverage report
```bash
uv run coverage html
```
After that, open the htmlcov folder and look for the index.html file.
Open it in your browser and the project coverage will be there
## Use collection
Use DRF.postman_collection.json file to use Django Rest Framework routes

## Feedback
If you have any feedback, please let us know via profissionalf.andre@gmail.com
## Referencies
- [Django documentation](https://docs.djangoproject.com/en/5.0/)
- [Python](https://www.python.org/)
- [Django course by Otávio Miranda](https://www.udemy.com/course/curso-de-django-web-framework-com-python-html-e-css/)
- [Pytest](https://docs.pytest.org/)
- [Unittest](https://docs.python.org/3/library/unittest.html)
- [Ruff](https://docs.astral.sh/ruff/)
- [Selenium](https://selenium.dev/)