Skip to content

Commit 56a9678

Browse files
committed
Basic_Django_setup
1 parent 9f60e73 commit 56a9678

16 files changed

Lines changed: 168 additions & 3 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Generated by Django 5.1.3 on 2025-01-06 22:56
2+
3+
from django.db import migrations
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('backendapi', '0001_initial'),
10+
]
11+
12+
operations = [
13+
migrations.DeleteModel(
14+
name='Attendant',
15+
),
16+
]

backendapi/urls.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from django.urls import path, register_converter
2-
32
from . import views, converters
43

54
register_converter(converters.BinaryHexConverter, "hex")

backendapi/views.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,9 @@ def api_get(request):
103103
return Response({"message": "GET request received"}, status=202)
104104
elif request.method == "POST":
105105
return Response({"message": "POST request received"}, status=405) """
106+
107+
def base_view(request): #basic frontend registration view.
108+
return render(request, "base.html")
109+
110+
def registration_view(request):
111+
return render(request, "registration.html")

config/settings.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import os
1414
from pathlib import Path
1515

16+
1617
# Build paths inside the project like this: BASE_DIR / 'subdir'.
1718
BASE_DIR = Path(__file__).resolve().parent.parent
1819

@@ -45,6 +46,8 @@
4546
"database",
4647
"backendapi",
4748
"rest_framework",
49+
"tailwind",
50+
"theme",
4851
]
4952

5053
MIDDLEWARE = [
@@ -130,8 +133,16 @@
130133

131134
STATIC_URL = "static/"
132135
STATIC_ROOT = os.getenv("DJANGO_STATIC_ROOT")
136+
TAILWIND_APP_NAME = 'theme'
133137

134138
# Default primary key field type
135139
# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field
136140

137141
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
142+
143+
INTERNAL_IPS = [
144+
"127.0.0.1",
145+
]
146+
147+
148+
NPM_BIN_PATH = os.getenv("NPM_BIN_PATH", "/default/path/to/npm")

config/urls.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@
1717

1818
from django.contrib import admin
1919
from django.urls import include, path
20-
2120
import backendapi.urls
21+
from backendapi import views
2222

2323
urlpatterns = [
2424
path("admin/", admin.site.urls),
2525
path("api/", include(backendapi.urls)),
26+
path("",views.base_view, name="base"),
27+
path("Registration",views.registration_view, name="registration")
2628
]

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ django-urlconfchecks==0.11.0 # TODO: Add to CI
33
daphne==4.1.2
44
psycopg2-binary==2.9.10
55
djangorestframework==3.15.2
6+
django-tailwind>=3.6.0
67

theme/__init__.py

Whitespace-only changes.

theme/apps.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from django.apps import AppConfig
2+
3+
4+
class ThemeConfig(AppConfig):
5+
name = 'theme'

theme/static_src/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

0 commit comments

Comments
 (0)