Procházet zdrojové kódy

django hello world

subDesTagesMitExtraKaese před 1 rokem
rodič
revize
0b5cc7f9a8

+ 1 - 0
.gitignore

@@ -58,3 +58,4 @@ docs/_build/
 # PyBuilder
 target/
 
+*.sqlite3

+ 1 - 0
app/settings.py

@@ -31,6 +31,7 @@ ALLOWED_HOSTS = []
 # Application definition
 
 INSTALLED_APPS = [
+    'zitap.apps.ZitapConfig',
     'django.contrib.admin',
     'django.contrib.auth',
     'django.contrib.contenttypes',

+ 3 - 1
app/urls.py

@@ -14,8 +14,10 @@ Including another URLconf
     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
+from zitap import views
 
 urlpatterns = [
     path('admin/', admin.site.urls),
+    path('', include('zitap.urls')),
 ]

+ 0 - 3
app/zitap/views.py

@@ -1,3 +0,0 @@
-from django.shortcuts import render
-
-# Create your views here.

+ 0 - 0
app/zitap/__init__.py → zitap/__init__.py


+ 0 - 0
app/zitap/admin.py → zitap/admin.py


+ 0 - 0
app/zitap/apps.py → zitap/apps.py


+ 0 - 0
app/zitap/migrations/__init__.py → zitap/migrations/__init__.py


+ 0 - 0
app/zitap/models.py → zitap/models.py


+ 0 - 0
zitap/static/zitap/main.js


+ 0 - 0
zitap/static/zitap/stylesheet.css


+ 0 - 0
zitap/templates/zitap/edit.html


+ 0 - 0
zitap/templates/zitap/event.html


+ 1 - 0
zitap/templates/zitap/index.html

@@ -0,0 +1 @@
+Hello World!

+ 0 - 0
app/zitap/tests.py → zitap/tests.py


+ 7 - 0
zitap/urls.py

@@ -0,0 +1,7 @@
+from django.urls import path, include
+
+from . import views
+
+urlpatterns = [
+  path('', views.index, name='index'),
+]

+ 4 - 0
zitap/views.py

@@ -0,0 +1,4 @@
+from django.shortcuts import render
+
+def index(request):
+  return render(request, 'zitap/index.html')