Skip to content

An application using Django Web Framework and DRF to pin content

Notifications You must be signed in to change notification settings

fandredev/django-recipes

Repository files navigation

Stack used

Tests: Pytest, Unittest
Lint: Black

Authors

@fandredev

Installation:

First, clone this repository.

git clone [email protected]:fandredev/django-recipes.git

Create virtual environment with Python

python -m venv venv

OR

python3 -m venv venv

Activate the virtual environment

source venv/bin/activate

Install dependencies using pip

pip install -r requirements.txt

Run migrations to database

python manage.py migrate

Create a superuser

python manage.py createsuperuser

Clone the .env.example to .env before run server

cp .env.example .env

Run development server

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

python manage.py test

Run ALL tests with pytest

pytest

Run tests functionals with Selenium

pytest -m 'functional'

Run coverage with pytest

coverage run -m pytest

Open coverage cover in HTML file

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

image


Feedback

If you have any feedback, please let us know via [email protected]

Referencies

About

An application using Django Web Framework and DRF to pin content

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published