diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a295864 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.pyc +__pycache__ diff --git a/CryptoCurrencyApp/__pycache__/__init__.cpython-36.pyc b/CryptoCurrencyApp/__pycache__/__init__.cpython-36.pyc deleted file mode 100644 index f68982a..0000000 Binary files a/CryptoCurrencyApp/__pycache__/__init__.cpython-36.pyc and /dev/null differ diff --git a/CryptoCurrencyApp/__pycache__/settings.cpython-36.pyc b/CryptoCurrencyApp/__pycache__/settings.cpython-36.pyc deleted file mode 100644 index 7be4e66..0000000 Binary files a/CryptoCurrencyApp/__pycache__/settings.cpython-36.pyc and /dev/null differ diff --git a/CryptoCurrencyApp/__pycache__/urls.cpython-36.pyc b/CryptoCurrencyApp/__pycache__/urls.cpython-36.pyc deleted file mode 100644 index 3d5c876..0000000 Binary files a/CryptoCurrencyApp/__pycache__/urls.cpython-36.pyc and /dev/null differ diff --git a/CryptoCurrencyApp/__pycache__/wsgi.cpython-36.pyc b/CryptoCurrencyApp/__pycache__/wsgi.cpython-36.pyc deleted file mode 100644 index 03f96bf..0000000 Binary files a/CryptoCurrencyApp/__pycache__/wsgi.cpython-36.pyc and /dev/null differ diff --git a/CryptoCurrencyApp/urls.py b/CryptoCurrencyApp/urls.py index 260e042..2f3457d 100644 --- a/CryptoCurrencyApp/urls.py +++ b/CryptoCurrencyApp/urls.py @@ -14,8 +14,10 @@ 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.contrib import admin -from django.urls import path +from django.urls import include, path urlpatterns = [ + path('helloworld/', include('helloworld.urls')), + path('polls/', include('polls.urls')), path('admin/', admin.site.urls), ] diff --git a/README.md b/README.md index c4290ec..edbaca1 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,7 @@ ``` python3.6 manage.py runserver +python3.6 manage.py migrate ``` + +http://127.0.0.1:8000/helloworld/ diff --git a/db.sqlite3 b/db.sqlite3 index e69de29..30ba585 100644 Binary files a/db.sqlite3 and b/db.sqlite3 differ diff --git a/helloworld/__init__.py b/helloworld/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/helloworld/admin.py b/helloworld/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/helloworld/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/helloworld/apps.py b/helloworld/apps.py new file mode 100644 index 0000000..cc31575 --- /dev/null +++ b/helloworld/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class HelloworldConfig(AppConfig): + name = 'helloworld' diff --git a/helloworld/migrations/__init__.py b/helloworld/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/helloworld/models.py b/helloworld/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/helloworld/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/helloworld/tests.py b/helloworld/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/helloworld/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/helloworld/urls.py b/helloworld/urls.py new file mode 100644 index 0000000..88a9cac --- /dev/null +++ b/helloworld/urls.py @@ -0,0 +1,7 @@ +from django.urls import path + +from . import views + +urlpatterns = [ + path('', views.index, name='index'), +] diff --git a/helloworld/views.py b/helloworld/views.py new file mode 100644 index 0000000..1775f62 --- /dev/null +++ b/helloworld/views.py @@ -0,0 +1,5 @@ +from django.http import HttpResponse + + +def index(request): + return HttpResponse("helloworld") diff --git a/polls/__init__.py b/polls/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/polls/admin.py b/polls/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/polls/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/polls/apps.py b/polls/apps.py new file mode 100644 index 0000000..d0f109e --- /dev/null +++ b/polls/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class PollsConfig(AppConfig): + name = 'polls' diff --git a/polls/migrations/__init__.py b/polls/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/polls/models.py b/polls/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/polls/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/polls/tests.py b/polls/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/polls/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/polls/urls.py b/polls/urls.py new file mode 100644 index 0000000..88a9cac --- /dev/null +++ b/polls/urls.py @@ -0,0 +1,7 @@ +from django.urls import path + +from . import views + +urlpatterns = [ + path('', views.index, name='index'), +] diff --git a/polls/views.py b/polls/views.py new file mode 100644 index 0000000..963b6f7 --- /dev/null +++ b/polls/views.py @@ -0,0 +1,5 @@ +from django.http import HttpResponse + + +def index(request): + return HttpResponse("Hello, world. You're at the polls index.")