-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ahtisham.shahid
authored and
Ahtisham.shahid
committed
Aug 6, 2019
1 parent
23fa62a
commit b0ec38d
Showing
9 changed files
with
125 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
#language: python | ||
#python: | ||
# - "3.6" | ||
## - "3.7" | ||
#services: | ||
# - mysql | ||
#env: | ||
# -DJANGO=2.2 DB=mysql | ||
#install: # => 5 | ||
# - pip install -r requirements.txt | ||
#before_script: # => 6 | ||
# - mysql -e 'create database test;' -u root | ||
#script: # => 7 | ||
# - python manage.py test | ||
# - pylint --load-plugins pylint_django polls/ | ||
# - pylint --load-plugins pylint_django posts/ | ||
|
||
|
||
language: python | ||
python: | ||
- "3.6" | ||
# - "3.7" | ||
services: | ||
- docker | ||
before_install: | ||
- docker-compose up | ||
#before_script: # => 6 | ||
# - mysql -e 'create database test;' -u root | ||
- mysql | ||
env: | ||
-DJANGO=2.2 DB=mysql | ||
install: # => 5 | ||
- pip install -r requirements.txt | ||
before_script: # => 6 | ||
- mysql -e 'create database test;' -u root | ||
script: # => 7 | ||
- docker exec dockerdajango_web_1 python manage.py test | ||
- docker exec dockerdajango_web_1 pylint --load-plugins pylint_django polls/ | ||
- docker exec dockerdajango_web_1 pylint --load-plugins pylint_django posts/ | ||
- python manage.py test | ||
- pylint --load-plugins pylint_django polls/ | ||
- pylint --load-plugins pylint_django posts/ | ||
|
||
|
||
#services: | ||
# - docker | ||
#before_install: | ||
# - docker-compose up | ||
##before_script: # => 6 | ||
## - mysql -e 'create database test;' -u root | ||
#script: # => 7 | ||
# - docker exec dockerdajango_web_1 python manage.py test | ||
# - docker exec dockerdajango_web_1 pylint --load-plugins pylint_django polls/ | ||
# - docker exec dockerdajango_web_1 pylint --load-plugins pylint_django posts/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
""" | ||
This is App config | ||
""" | ||
from django.apps import AppConfig | ||
|
||
|
||
class PollsConfig(AppConfig): | ||
""" | ||
Polls config class | ||
""" | ||
name = 'polls' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,27 @@ | ||
"""Polls URL Configuration | ||
The `urlpatterns` list routes URLs to views. For more information please see: | ||
https://docs.djangoproject.com/en/2.2/topics/http/urls/ | ||
Examples: | ||
Function views | ||
1. Add an import: from my_app import views | ||
2. Add a URL to urlpatterns: path('', views.home, name='home') | ||
Class-based views | ||
1. Add an import: from other_app.views import Home | ||
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') | ||
Including another URLconf | ||
1. Import the include() function: from django.urls import include, path | ||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) | ||
""" | ||
from django.urls import path | ||
|
||
from . import views | ||
|
||
app_name='polls' | ||
app_name = 'polls' | ||
|
||
urlpatterns = [ | ||
path('', views.IndexView.as_view(), name='index'), | ||
path('<int:pk>/', views.DetailView.as_view(), name='detail'), | ||
path('<int:pk>/results/', views.ResultsView.as_view(), name='results'), | ||
path('<int:question_id>/vote/', views.vote, name='vote'), | ||
] | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters