Переглянути джерело

Merge branch 'master' of ssh://192.168.1.24:10022/MrDuhaz/Core

Mr Duhaz 10 місяців тому
батько
коміт
373f063c5f
4 змінених файлів з 99 додано та 5 видалено
  1. 21 0
      .gitignore
  2. 29 0
      Installation.md sur docker
  3. 17 5
      README.md
  4. 32 0
      URL.md

+ 21 - 0
.gitignore

@@ -0,0 +1,21 @@
+__pycache__/__init__.cpython-312.pyc
+__pycache__/admin.cpython-312.pyc
+__pycache__/apps.cpython-312.pyc
+__pycache__/models.cpython-312.pyc
+__pycache__/views.cpython-312.pyc
+__pycache__/__init__.cpython-312.pyc
+__pycache__/admin.cpython-312.pyc
+__pycache__/apps.cpython-312.pyc
+__pycache__/models.cpython-312.pyc
+__pycache__/views.cpython-312.pyc
+migrations/__pycache__/__init__.cpython-312.pyc
+migrations/__pycache__/0001_initial.cpython-312.pyc
+migrations/__pycache__/0002_auto_20220422_0914.cpython-312.pyc
+migrations/__pycache__/0003_data.cpython-312.pyc
+migrations/__pycache__/0004_auto_20221121_1234.cpython-312.pyc
+migrations/__pycache__/0005_page_p_menu_stack.cpython-312.pyc
+migrations/__pycache__/0006_speed_dial.cpython-312.pyc
+migrations/__pycache__/0007_auto_20231201_1455.cpython-312.pyc
+migrations/__pycache__/0008_speed_dial_sd_icone.cpython-312.pyc
+migrations/__pycache__/0009_speed_dial_sd_color.cpython-312.pyc
+migrations/__pycache__/0010_auto_20231222_1114.cpython-312.pyc

+ 29 - 0
Installation.md sur docker

@@ -0,0 +1,29 @@
+# Commande à exécuté dans votre environnement docker.
+# Avec Django 3.2.23 & django-crispy-forms==1.12.0 & django-trumbowyg
+
+apk add git nano
+
+django-admin startproject dev_core
+cd dev_core
+
+python manage.py migrate
+python manage.py createsuperuser
+
+nano dev_core/settings.py
+-->	ALLOWED_HOSTS = [*]
+
+python manage.py runserver 0.0.0.0:8080
+
+git clone https://dev.duhaz.fr/MrDuhaz/core.git
+
+nano dev_core/settings.py
+-->	INSTALLED_APPS = [
++	'trumbowyg',
++	'crispy_forms',
++	'core',
+
+rm dev_core/urls.py
+nano dev_core/urls.py > voir fichier url.md
+
+python manage.py migrate
+python manage.py runserver 0.0.0.0:8080

+ 17 - 5
README.md

@@ -1,9 +1,21 @@
-Presrequi :
+**Presrequi :**
 
-pip install django==4.2.8 pip install django-crispy-forms
+pip install django==4.2.8
 
-Install :
+pip install django-crispy-forms
 
-python manage.py migrate python manage.py runserver
+**Install :**
 
-Changlog : Jan 2024 - Mise a jour gestion menu et amélioration mise en page 2023 - Version Initial
+python manage.py migrate
+
+python manage.py runserver
+
+**Installation sur un envoronement Docker :** 
+
+voir "Installation.md sur docker"
+
+**Changlog :**
+
+* Jan 2024 - Mise a jour gestion menu et amélioration mise en page 
+
+* 2023 - Version Initial

+ 32 - 0
URL.md

@@ -0,0 +1,32 @@
+from django.conf import settings
+from django.contrib.staticfiles import views
+
+from django.contrib import admin
+from django.urls import path, re_path, include
+from django.views.generic.base import RedirectView
+
+from core import views as core
+
+urlpatterns = [
+
+	path('trumbowyg/', include('trumbowyg.urls')),
+	path('admin/', admin.site.urls),
+	
+	path('account/login', core.p_login, name='core_login'),
+	path('account/logout', core.p_logout, name='core_logout'),
+	path('account/registration', core.p_registration , name='core_registration'),
+
+	path('favicon.ico', RedirectView.as_view(url = '/static/favicon.ico')),
+
+	path('' , core.index, name='core_index'),
+	# url generique
+	re_path(r'page/(?P<p_url>[a-zA-Z0-9_,-/]+)', core.page, name='core_page'),
+	# last chance 
+	re_path(r'(?P<p_url>[a-zA-Z0-9_.,-]+)', core.page, name='core_page'),
+
+]
+
+if settings.DEBUG:
+	urlpatterns += [
+		re_path(r'^static/(?P<path>.*)$', views.serve),
+	]