Skip to content

Commit 79459e9

Browse files
feat: Create a core app for basic functions.
1 parent 874d072 commit 79459e9

File tree

7 files changed

+30
-0
lines changed

7 files changed

+30
-0
lines changed

promo_code/core/__init__.py

Whitespace-only changes.

promo_code/core/apps.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import django.apps
2+
3+
4+
class CoreConfig(django.apps.AppConfig):
5+
default_auto_field = 'django.db.models.BigAutoField'
6+
name = 'core'

promo_code/core/migrations/__init__.py

Whitespace-only changes.

promo_code/core/urls.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import django.urls
2+
3+
import core.views
4+
5+
6+
app_name = 'core'
7+
8+
9+
urlpatterns = [
10+
django.urls.path(
11+
'',
12+
core.views.PingView.as_view(),
13+
name='ping',
14+
),
15+
]

promo_code/core/views.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import django.views
2+
import django.http
3+
4+
5+
class PingView(django.views.View):
6+
def get(self, request, *args, **kwargs):
7+
return django.http.HttpResponse('PROOOOOOOOOOOOOOOOOD', status=200)

promo_code/promo_code/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def load_bool(name, default):
3030

3131

3232
INSTALLED_APPS = [
33+
'core.apps.CoreConfig',
3334
'django.contrib.admin',
3435
'django.contrib.auth',
3536
'django.contrib.contenttypes',

promo_code/promo_code/urls.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
import django.urls
33

44
urlpatterns = [
5+
django.urls.path('api/ping/', django.urls.include('core.urls')),
56
django.urls.path('admin/', django.contrib.admin.site.urls),
67
]

0 commit comments

Comments
 (0)