Skip to content

sambitr/Django

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 

Repository files navigation

Django

Create Django project.

django-admin startproject mysite

This will create the small directory names mysite.
Now let's start the development server(web server) and see how it goes

python manage.py runserver
(venv) C:\Users\kumar\PycharmProjects\Django\mysite>python manage.py runserver
Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).

You have 17 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
Run 'python manage.py migrate' to apply them.
June 20, 2020 - 23:24:45
Django version 3.0.7, using settings 'mysite.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
[20/Jun/2020 23:25:42] "GET / HTTP/1.1" 200 16351
[20/Jun/2020 23:25:42] "GET /static/admin/css/fonts.css HTTP/1.1" 200 423
[20/Jun/2020 23:25:43] "GET /static/admin/fonts/Roboto-Bold-webfont.woff HTTP/1.1" 200 86184
[20/Jun/2020 23:25:43] "GET /static/admin/fonts/Roboto-Regular-webfont.woff HTTP/1.1" 200 85876
[20/Jun/2020 23:25:43] "GET /static/admin/fonts/Roboto-Light-webfont.woff HTTP/1.1" 200 85692
Not Found: /favicon.ico
[20/Jun/2020 23:25:43] "GET /favicon.ico HTTP/1.1" 404 1972

Try accessing it by: http://127.0.0.1:8000/ and you see a success message

image

python startapp <app_name>
STATICFILES_URL = [
    os.path.join(BASE_DIR, 'static')
]
STATIC_ROOT = os.path.join(BASE_DIR, 'assets')
python manage.py collectstatic

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published