Skip to content

Cozerr/Django

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Django

Learning Django

pip install virtualenv --> to setup virtual environment

virtualenv env--> create virtual env

..\env\Scripts\activate --> to activate env

Virtual Environment: The files related to project stays in project. They are not part of the computer from now on.

pip install django--> Django setup

django-admin--> Django commands checkc/compilemessages/createcachetable dbshell diffsettings dumpdata flush inspectdb loaddata makemessages makemigrations migrate optimizemigration runserver sendtestemail shell showmigrations sqlflush sqlmigrate sqlsequencereset squashmigrations startapp startproject test testserver

django-admin startproject projectname -->starting project

py manage.py runserver--> Starts server

env\Scripts\Activate

py manage.py startapp Base-->Starts app We can add multiple apps to our project




MYSITE/Views.py
#writing home tab method
def home(request):

MODEL--VIEW--TEMPLATE

Model(database) and template relation created via views.py


for tabs and webistes create urls.py under base

URLs.py 
from django.urls import path

urlpatterns[]--> dizin liste

from . --> projenin içerisindeki doyaya erişime yarıyor

About

Learning Django

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published