diff --git a/config/settings.py b/config/settings.py index 2921767..624e8b9 100644 --- a/config/settings.py +++ b/config/settings.py @@ -37,6 +37,7 @@ INSTALLED_APPS = [ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'gallery' ] MIDDLEWARE = [ diff --git a/config/urls.py b/config/urls.py index 10a0e72..df178d9 100644 --- a/config/urls.py +++ b/config/urls.py @@ -15,8 +15,9 @@ 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 urlpatterns = [ + path("gallery/", include("gallery.urls")), path('admin/', admin.site.urls), ] diff --git a/gallery/__init__.py b/gallery/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/gallery/admin.py b/gallery/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/gallery/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/gallery/apps.py b/gallery/apps.py new file mode 100644 index 0000000..97a664a --- /dev/null +++ b/gallery/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class GalleryConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'gallery' diff --git a/gallery/migrations/__init__.py b/gallery/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/gallery/models.py b/gallery/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/gallery/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/gallery/tests.py b/gallery/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/gallery/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/gallery/urls.py b/gallery/urls.py new file mode 100644 index 0000000..2336905 --- /dev/null +++ b/gallery/urls.py @@ -0,0 +1,9 @@ +from django.urls import path + +from . import views + +app_name = 'gallery' + +urlpatterns = [ + path("", views.index, name="index"), +] \ No newline at end of file diff --git a/gallery/views.py b/gallery/views.py new file mode 100644 index 0000000..072c89b --- /dev/null +++ b/gallery/views.py @@ -0,0 +1,9 @@ +from django.http import HttpResponse +from django.shortcuts import render + +# Create your views here. + + + +def index(request): + return HttpResponse("Hello, world.") \ No newline at end of file