Skip to content

Commit

Permalink
Add All Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sinalalebakhsh committed Jul 10, 2024
1 parent 3c2bccd commit bbb8338
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
13 changes: 12 additions & 1 deletion Steps /steps to create Django WebApp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,18 @@ python manage.py collectstatic
root /home/sina/01-Repo/onlineShope/static;



## write in terminal
docker-compose exec web python manage.py startapp pages
## ADD in config/setting.py -> INSTALLED_APPS = [ ... 'accounts', 'pages',]


## Add in pages/views.py ->
from django.views.generic import TemplateView
class HomePageView(TemplateView):
template_name = 'home.html'
class AboutUsPageView(TemplateView):
template_name = 'pages/aboutus.html'




10 changes: 9 additions & 1 deletion pages/views.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
from django.shortcuts import render

# Create your views here.
from django.views.generic import TemplateView
class HomePageView(TemplateView):
template_name = 'home.html'


class AboutUsPageView(TemplateView):
template_name = 'pages/aboutus.html'


0 comments on commit bbb8338

Please sign in to comment.