rebase-initial

This commit is contained in:
2024-11-20 11:11:31 +07:00
parent 45e3c1f698
commit 1ead9da097
4 changed files with 5 additions and 52 deletions

49
.gitignore vendored
View File

@@ -4,47 +4,16 @@
*.pyc *.pyc
__pycache__ __pycache__
db.sqlite3* db.sqlite3*
media
# Backup files # # Backup files #
*.bak *.bak
# If you are using PyCharm #
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# AWS User-specific
.idea/**/aws.xml
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# File-based project format # File-based project format
*.iws *.iws
# IntelliJ # IntelliJ
out/ out/
# JIRA plugin
atlassian-ide-plugin.xml
# Python # # Python #
*.py[cod] *.py[cod]
*$py.class *$py.class
@@ -98,13 +67,6 @@ celerybeat-schedule.*
# Environments # Environments
.env .env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
lokal/
/lokal /lokal
# mkdocs documentation # mkdocs documentation
@@ -138,14 +100,5 @@ GitHub.sublime-settings
!.vscode/extensions.json !.vscode/extensions.json
.history .history
# Static
/static
# Media
/media
# Assets downloads # Assets downloads
/assets_download /assets
# Assets watermark
/assets_watermark

View File

@@ -19,7 +19,8 @@ load_env()
SECRET_KEY = 'django-insecure-x=qe5@^3%@t1fk)pk@uyv&r!z^#9==^*-&aiqfau3@9x@+j%nm' SECRET_KEY = 'django-insecure-x=qe5@^3%@t1fk)pk@uyv&r!z^#9==^*-&aiqfau3@9x@+j%nm'
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True if os.getenv('DEBUG') == 'True' else False DEBUG = False
#True if os.getenv('DEBUG') == 'True' else False
ALLOWED_HOSTS = os.getenv('ALLOWED_HOSTS').split(',') ALLOWED_HOSTS = os.getenv('ALLOWED_HOSTS').split(',')

View File

@@ -7,7 +7,6 @@ from django.urls import re_path
from django.views.static import serve from django.views.static import serve
urlpatterns = [ urlpatterns = [
path('oldadmin/', admin.site.urls),
path('admin/' , RedirectView.as_view(pattern_name="adminHome"), name='adminRedirect'), path('admin/' , RedirectView.as_view(pattern_name="adminHome"), name='adminRedirect'),
path('dashboard/' , RedirectView.as_view(pattern_name="adminHome"), name='adminRedirect2'), path('dashboard/' , RedirectView.as_view(pattern_name="adminHome"), name='adminRedirect2'),
path('', include('adminapp.urls')), path('', include('adminapp.urls')),

View File

@@ -1,4 +1,4 @@
from django.shortcuts import render from django.shortcuts import render, get_object_or_404
from home.models import * from home.models import *
# ===============> Front Home Page View <=============== # ===============> Front Home Page View <===============
@@ -24,4 +24,4 @@ def homePageFront(request):
return render(request, 'front/main/index.html', context) return render(request, 'front/main/index.html', context)
def error_404(request, exception): def error_404(request, exception):
return render(request, 'error/404.html', status=404) return render(request, 'front/main/index.html', context)