diff --git a/nuitdelinfo_2021/models/Rescue.py b/nuitdelinfo_2021/models/Rescue.py new file mode 100644 index 0000000..0200447 --- /dev/null +++ b/nuitdelinfo_2021/models/Rescue.py @@ -0,0 +1,6 @@ +from django.db.models import Model, CharField, TextField + + +class Rescue(Model): + name = CharField(max_length="256") + text = TextField() diff --git a/nuitdelinfo_2021/models/__init__.py b/nuitdelinfo_2021/models/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/nuitdelinfo_2021/settings.py b/nuitdelinfo_2021/settings.py index 6f41771..99314c7 100644 --- a/nuitdelinfo_2021/settings.py +++ b/nuitdelinfo_2021/settings.py @@ -9,7 +9,7 @@ https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.2/ref/settings/ """ - +from os import path from pathlib import Path # Build paths inside the project like this: BASE_DIR / 'subdir'. @@ -25,7 +25,7 @@ SECRET_KEY = 'django-insecure-85h5=0vw&7e)%9+^n69y!b1ti@7gij_ic3u+66eln838s=!n+l # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = [] +ALLOWED_HOSTS = ["3cab-134-214-214-199.ngrok.io", "localhost"] # Application definition @@ -120,6 +120,10 @@ USE_TZ = True STATIC_URL = '/static/' +STATIC_ROOT = '' + +STATICFILES_DIRS = (path.join('static'),) + # Default primary key field type # https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field diff --git a/nuitdelinfo_2021/urls.py b/nuitdelinfo_2021/urls.py index faf9c64..eec4ad8 100644 --- a/nuitdelinfo_2021/urls.py +++ b/nuitdelinfo_2021/urls.py @@ -16,6 +16,9 @@ Including another URLconf from django.contrib import admin from django.urls import path +from nuitdelinfo_2021 import views + urlpatterns = [ + path('', views.index, name="index"), path('admin/', admin.site.urls), ] diff --git a/nuitdelinfo_2021/views/__init__.py b/nuitdelinfo_2021/views/__init__.py new file mode 100644 index 0000000..2079d08 --- /dev/null +++ b/nuitdelinfo_2021/views/__init__.py @@ -0,0 +1 @@ +from .index import index diff --git a/nuitdelinfo_2021/views/index.py b/nuitdelinfo_2021/views/index.py new file mode 100644 index 0000000..b49be7a --- /dev/null +++ b/nuitdelinfo_2021/views/index.py @@ -0,0 +1,6 @@ +from django.shortcuts import render + + +def index(request): + context = {} + return render(request, "index.html", context) diff --git a/static/css/style.css b/static/css/style.css new file mode 100644 index 0000000..d224431 --- /dev/null +++ b/static/css/style.css @@ -0,0 +1,3 @@ +h1 { + color: red; +} diff --git a/static/js/script.js b/static/js/script.js new file mode 100644 index 0000000..8f19b91 --- /dev/null +++ b/static/js/script.js @@ -0,0 +1 @@ +console.log("Hewo :3"); diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..9ab041c --- /dev/null +++ b/templates/index.html @@ -0,0 +1,5 @@ +{% load static %} + + + +