Skip to content

A sample app for playing around with Django Framework

Notifications You must be signed in to change notification settings

leanerr/django-project

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django-project

Setup

Install Django:

pip install Django

Perform database migration:

python manage.py check
python manage.py migrate

Run Development Server

python manage.py runserver

Public endpoint is at http://localhost:8000/polls/

Admin endpoint is at http://127.0.0.1:8000/admin/, user: admin, password: qazwsxedc

Testing

Run tests:

python manage.py test
Creating test database for alias 'default'...
System check identified no issues (0 silenced).
..........
----------------------------------------------------------------------
Ran 10 tests in 0.025s

OK
Destroying test database for alias 'default'...

Run tests with coverage:

pip install coverage
coverage run --source='.' manage.py test

Check coverage report:

coverage report
Name                                Stmts   Miss  Cover
-------------------------------------------------------
manage.py                              13      6    54%
mysite/__init__.py                      0      0   100%
mysite/settings.py                     18      0   100%
mysite/urls.py                          3      0   100%
mysite/wsgi.py                          4      4     0%
polls/__init__.py                       0      0   100%
polls/admin.py                          4      0   100%
polls/apps.py                           4      0   100%
polls/migrations/0001_initial.py        7      0   100%
polls/migrations/__init__.py            0      0   100%
polls/models.py                        20      1    95%
polls/templates/__init__.py             0      0   100%
polls/templates/polls/__init__.py       0      0   100%
polls/tests.py                         57      0   100%
polls/urls.py                           4      0   100%
polls/views.py                         28      8    71%
-------------------------------------------------------
TOTAL                                 162     19    88%

About

A sample app for playing around with Django Framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 90.9%
  • HTML 8.4%
  • CSS 0.7%