diff --git a/django_lottopy/lib/python3.10/site-packages/django/contrib/admin/__pycache__/forms.cpython-310.pyc b/django_lottopy/lib/python3.10/site-packages/django/contrib/admin/__pycache__/forms.cpython-310.pyc index 0b246d01..6e5cfb42 100644 Binary files a/django_lottopy/lib/python3.10/site-packages/django/contrib/admin/__pycache__/forms.cpython-310.pyc and b/django_lottopy/lib/python3.10/site-packages/django/contrib/admin/__pycache__/forms.cpython-310.pyc differ diff --git a/django_lottopy/lib/python3.10/site-packages/django/contrib/auth/__pycache__/decorators.cpython-310.pyc b/django_lottopy/lib/python3.10/site-packages/django/contrib/auth/__pycache__/decorators.cpython-310.pyc index 9c721d55..ef1bc2fb 100644 Binary files a/django_lottopy/lib/python3.10/site-packages/django/contrib/auth/__pycache__/decorators.cpython-310.pyc and b/django_lottopy/lib/python3.10/site-packages/django/contrib/auth/__pycache__/decorators.cpython-310.pyc differ diff --git a/django_lottopy/lib/python3.10/site-packages/django/contrib/auth/__pycache__/views.cpython-310.pyc b/django_lottopy/lib/python3.10/site-packages/django/contrib/auth/__pycache__/views.cpython-310.pyc index 9af6280a..d5d60632 100644 Binary files a/django_lottopy/lib/python3.10/site-packages/django/contrib/auth/__pycache__/views.cpython-310.pyc and b/django_lottopy/lib/python3.10/site-packages/django/contrib/auth/__pycache__/views.cpython-310.pyc differ diff --git a/django_lottopy/lib/python3.10/site-packages/django/core/mail/backends/__pycache__/__init__.cpython-310.pyc b/django_lottopy/lib/python3.10/site-packages/django/core/mail/backends/__pycache__/__init__.cpython-310.pyc index aed079af..8d9332c2 100644 Binary files a/django_lottopy/lib/python3.10/site-packages/django/core/mail/backends/__pycache__/__init__.cpython-310.pyc and b/django_lottopy/lib/python3.10/site-packages/django/core/mail/backends/__pycache__/__init__.cpython-310.pyc differ diff --git a/django_lottopy/lib/python3.10/site-packages/django/core/mail/backends/__pycache__/base.cpython-310.pyc b/django_lottopy/lib/python3.10/site-packages/django/core/mail/backends/__pycache__/base.cpython-310.pyc index 14c91f08..b36fb3d7 100644 Binary files a/django_lottopy/lib/python3.10/site-packages/django/core/mail/backends/__pycache__/base.cpython-310.pyc and b/django_lottopy/lib/python3.10/site-packages/django/core/mail/backends/__pycache__/base.cpython-310.pyc differ diff --git a/django_lottopy/lib/python3.10/site-packages/django/core/mail/backends/__pycache__/smtp.cpython-310.pyc b/django_lottopy/lib/python3.10/site-packages/django/core/mail/backends/__pycache__/smtp.cpython-310.pyc index 22162ab0..216eb75e 100644 Binary files a/django_lottopy/lib/python3.10/site-packages/django/core/mail/backends/__pycache__/smtp.cpython-310.pyc and b/django_lottopy/lib/python3.10/site-packages/django/core/mail/backends/__pycache__/smtp.cpython-310.pyc differ diff --git a/django_lottopy/lib/python3.10/site-packages/django/core/management/commands/__pycache__/test.cpython-310.pyc b/django_lottopy/lib/python3.10/site-packages/django/core/management/commands/__pycache__/test.cpython-310.pyc index 04379b82..938dce5d 100644 Binary files a/django_lottopy/lib/python3.10/site-packages/django/core/management/commands/__pycache__/test.cpython-310.pyc and b/django_lottopy/lib/python3.10/site-packages/django/core/management/commands/__pycache__/test.cpython-310.pyc differ diff --git a/django_lottopy/lib/python3.10/site-packages/django/template/loaders/__pycache__/cached.cpython-310.pyc b/django_lottopy/lib/python3.10/site-packages/django/template/loaders/__pycache__/cached.cpython-310.pyc index 9f686a1f..bf3b32ae 100644 Binary files a/django_lottopy/lib/python3.10/site-packages/django/template/loaders/__pycache__/cached.cpython-310.pyc and b/django_lottopy/lib/python3.10/site-packages/django/template/loaders/__pycache__/cached.cpython-310.pyc differ diff --git a/django_lottopy/lib/python3.10/site-packages/django/test/__pycache__/__init__.cpython-310.pyc b/django_lottopy/lib/python3.10/site-packages/django/test/__pycache__/__init__.cpython-310.pyc index af2d1a5e..5ec737ba 100644 Binary files a/django_lottopy/lib/python3.10/site-packages/django/test/__pycache__/__init__.cpython-310.pyc and b/django_lottopy/lib/python3.10/site-packages/django/test/__pycache__/__init__.cpython-310.pyc differ diff --git a/django_lottopy/lib/python3.10/site-packages/django/test/__pycache__/client.cpython-310.pyc b/django_lottopy/lib/python3.10/site-packages/django/test/__pycache__/client.cpython-310.pyc index b7a44277..04a0d2d1 100644 Binary files a/django_lottopy/lib/python3.10/site-packages/django/test/__pycache__/client.cpython-310.pyc and b/django_lottopy/lib/python3.10/site-packages/django/test/__pycache__/client.cpython-310.pyc differ diff --git a/django_lottopy/lib/python3.10/site-packages/django/test/__pycache__/html.cpython-310.pyc b/django_lottopy/lib/python3.10/site-packages/django/test/__pycache__/html.cpython-310.pyc index fceed0a0..ee005cc5 100644 Binary files a/django_lottopy/lib/python3.10/site-packages/django/test/__pycache__/html.cpython-310.pyc and b/django_lottopy/lib/python3.10/site-packages/django/test/__pycache__/html.cpython-310.pyc differ diff --git a/django_lottopy/lib/python3.10/site-packages/django/test/__pycache__/runner.cpython-310.pyc b/django_lottopy/lib/python3.10/site-packages/django/test/__pycache__/runner.cpython-310.pyc index 43a8bcaa..0d2e4bb4 100644 Binary files a/django_lottopy/lib/python3.10/site-packages/django/test/__pycache__/runner.cpython-310.pyc and b/django_lottopy/lib/python3.10/site-packages/django/test/__pycache__/runner.cpython-310.pyc differ diff --git a/django_lottopy/lib/python3.10/site-packages/django/test/__pycache__/signals.cpython-310.pyc b/django_lottopy/lib/python3.10/site-packages/django/test/__pycache__/signals.cpython-310.pyc index 40517965..8f8f385a 100644 Binary files a/django_lottopy/lib/python3.10/site-packages/django/test/__pycache__/signals.cpython-310.pyc and b/django_lottopy/lib/python3.10/site-packages/django/test/__pycache__/signals.cpython-310.pyc differ diff --git a/django_lottopy/lib/python3.10/site-packages/django/test/__pycache__/testcases.cpython-310.pyc b/django_lottopy/lib/python3.10/site-packages/django/test/__pycache__/testcases.cpython-310.pyc index 90e92583..2a4c33e2 100644 Binary files a/django_lottopy/lib/python3.10/site-packages/django/test/__pycache__/testcases.cpython-310.pyc and b/django_lottopy/lib/python3.10/site-packages/django/test/__pycache__/testcases.cpython-310.pyc differ diff --git a/django_lottopy/lib/python3.10/site-packages/django/test/__pycache__/utils.cpython-310.pyc b/django_lottopy/lib/python3.10/site-packages/django/test/__pycache__/utils.cpython-310.pyc index 99a93e1e..2b7cd639 100644 Binary files a/django_lottopy/lib/python3.10/site-packages/django/test/__pycache__/utils.cpython-310.pyc and b/django_lottopy/lib/python3.10/site-packages/django/test/__pycache__/utils.cpython-310.pyc differ diff --git a/django_lottopy/lib/python3.10/site-packages/setuptools/__pycache__/archive_util.cpython-310.pyc b/django_lottopy/lib/python3.10/site-packages/setuptools/__pycache__/archive_util.cpython-310.pyc index ed393416..99316396 100644 Binary files a/django_lottopy/lib/python3.10/site-packages/setuptools/__pycache__/archive_util.cpython-310.pyc and b/django_lottopy/lib/python3.10/site-packages/setuptools/__pycache__/archive_util.cpython-310.pyc differ diff --git a/django_lottopy/lib/python3.10/site-packages/setuptools/__pycache__/namespaces.cpython-310.pyc b/django_lottopy/lib/python3.10/site-packages/setuptools/__pycache__/namespaces.cpython-310.pyc index 17d4a9ef..fab209c0 100644 Binary files a/django_lottopy/lib/python3.10/site-packages/setuptools/__pycache__/namespaces.cpython-310.pyc and b/django_lottopy/lib/python3.10/site-packages/setuptools/__pycache__/namespaces.cpython-310.pyc differ diff --git a/django_lottopy/lib/python3.10/site-packages/setuptools/__pycache__/package_index.cpython-310.pyc b/django_lottopy/lib/python3.10/site-packages/setuptools/__pycache__/package_index.cpython-310.pyc index 277799b9..756e91db 100644 Binary files a/django_lottopy/lib/python3.10/site-packages/setuptools/__pycache__/package_index.cpython-310.pyc and b/django_lottopy/lib/python3.10/site-packages/setuptools/__pycache__/package_index.cpython-310.pyc differ diff --git a/django_lottopy/lib/python3.10/site-packages/setuptools/__pycache__/sandbox.cpython-310.pyc b/django_lottopy/lib/python3.10/site-packages/setuptools/__pycache__/sandbox.cpython-310.pyc index 535ce4b1..4af69c44 100644 Binary files a/django_lottopy/lib/python3.10/site-packages/setuptools/__pycache__/sandbox.cpython-310.pyc and b/django_lottopy/lib/python3.10/site-packages/setuptools/__pycache__/sandbox.cpython-310.pyc differ diff --git a/django_lottopy/lib/python3.10/site-packages/setuptools/__pycache__/wheel.cpython-310.pyc b/django_lottopy/lib/python3.10/site-packages/setuptools/__pycache__/wheel.cpython-310.pyc index 36c68541..67fe4ac5 100644 Binary files a/django_lottopy/lib/python3.10/site-packages/setuptools/__pycache__/wheel.cpython-310.pyc and b/django_lottopy/lib/python3.10/site-packages/setuptools/__pycache__/wheel.cpython-310.pyc differ diff --git a/django_lottopy/lib/python3.10/site-packages/setuptools/_vendor/packaging/__pycache__/tags.cpython-310.pyc b/django_lottopy/lib/python3.10/site-packages/setuptools/_vendor/packaging/__pycache__/tags.cpython-310.pyc index f224add2..d557e500 100644 Binary files a/django_lottopy/lib/python3.10/site-packages/setuptools/_vendor/packaging/__pycache__/tags.cpython-310.pyc and b/django_lottopy/lib/python3.10/site-packages/setuptools/_vendor/packaging/__pycache__/tags.cpython-310.pyc differ diff --git a/django_lottopy/lib/python3.10/site-packages/setuptools/command/__pycache__/build_ext.cpython-310.pyc b/django_lottopy/lib/python3.10/site-packages/setuptools/command/__pycache__/build_ext.cpython-310.pyc index 131751f2..6e0ae1fc 100644 Binary files a/django_lottopy/lib/python3.10/site-packages/setuptools/command/__pycache__/build_ext.cpython-310.pyc and b/django_lottopy/lib/python3.10/site-packages/setuptools/command/__pycache__/build_ext.cpython-310.pyc differ diff --git a/django_lottopy/lib/python3.10/site-packages/setuptools/command/__pycache__/easy_install.cpython-310.pyc b/django_lottopy/lib/python3.10/site-packages/setuptools/command/__pycache__/easy_install.cpython-310.pyc index 0e4d932e..a4cf8fdb 100644 Binary files a/django_lottopy/lib/python3.10/site-packages/setuptools/command/__pycache__/easy_install.cpython-310.pyc and b/django_lottopy/lib/python3.10/site-packages/setuptools/command/__pycache__/easy_install.cpython-310.pyc differ diff --git a/django_lottopy/lib/python3.10/site-packages/setuptools/command/__pycache__/install.cpython-310.pyc b/django_lottopy/lib/python3.10/site-packages/setuptools/command/__pycache__/install.cpython-310.pyc index 039d79e2..1634da8b 100644 Binary files a/django_lottopy/lib/python3.10/site-packages/setuptools/command/__pycache__/install.cpython-310.pyc and b/django_lottopy/lib/python3.10/site-packages/setuptools/command/__pycache__/install.cpython-310.pyc differ diff --git a/django_lottopy/lib/python3.10/site-packages/setuptools/command/__pycache__/install_egg_info.cpython-310.pyc b/django_lottopy/lib/python3.10/site-packages/setuptools/command/__pycache__/install_egg_info.cpython-310.pyc index 4ed930ca..7efc3567 100644 Binary files a/django_lottopy/lib/python3.10/site-packages/setuptools/command/__pycache__/install_egg_info.cpython-310.pyc and b/django_lottopy/lib/python3.10/site-packages/setuptools/command/__pycache__/install_egg_info.cpython-310.pyc differ diff --git a/django_lottopy/lib/python3.10/site-packages/setuptools/command/__pycache__/install_lib.cpython-310.pyc b/django_lottopy/lib/python3.10/site-packages/setuptools/command/__pycache__/install_lib.cpython-310.pyc index e325c828..f8286fec 100644 Binary files a/django_lottopy/lib/python3.10/site-packages/setuptools/command/__pycache__/install_lib.cpython-310.pyc and b/django_lottopy/lib/python3.10/site-packages/setuptools/command/__pycache__/install_lib.cpython-310.pyc differ diff --git a/django_lottopy/lib/python3.10/site-packages/setuptools/command/__pycache__/install_scripts.cpython-310.pyc b/django_lottopy/lib/python3.10/site-packages/setuptools/command/__pycache__/install_scripts.cpython-310.pyc index 099c1b97..20247a09 100644 Binary files a/django_lottopy/lib/python3.10/site-packages/setuptools/command/__pycache__/install_scripts.cpython-310.pyc and b/django_lottopy/lib/python3.10/site-packages/setuptools/command/__pycache__/install_scripts.cpython-310.pyc differ diff --git a/lottopy_site/lottopy/__init__.py b/lottopy_site/lottopy/__init__.py index d128d39c..77c1dfb7 100644 --- a/lottopy_site/lottopy/__init__.py +++ b/lottopy_site/lottopy/__init__.py @@ -2,6 +2,6 @@ from __future__ import absolute_import, unicode_literals # This will make sure the app is always imported when # Django starts so that shared_task will use this app. -from .celery import app as celery_app +from celery import app as celery_app __all__ = ('celery_app',) \ No newline at end of file diff --git a/lottopy_site/lottopy/__pycache__/__init__.cpython-310.pyc b/lottopy_site/lottopy/__pycache__/__init__.cpython-310.pyc index 16780e17..a5b1f6d7 100644 Binary files a/lottopy_site/lottopy/__pycache__/__init__.cpython-310.pyc and b/lottopy_site/lottopy/__pycache__/__init__.cpython-310.pyc differ diff --git a/lottopy_site/lottopy/__pycache__/urls.cpython-310.pyc b/lottopy_site/lottopy/__pycache__/urls.cpython-310.pyc index eb0510c1..1062502f 100644 Binary files a/lottopy_site/lottopy/__pycache__/urls.cpython-310.pyc and b/lottopy_site/lottopy/__pycache__/urls.cpython-310.pyc differ diff --git a/lottopy_site/lottopy/__pycache__/views.cpython-310.pyc b/lottopy_site/lottopy/__pycache__/views.cpython-310.pyc index 2f2a72a5..cc470c6e 100644 Binary files a/lottopy_site/lottopy/__pycache__/views.cpython-310.pyc and b/lottopy_site/lottopy/__pycache__/views.cpython-310.pyc differ diff --git a/lottopy_site/lottopy/celery.py b/lottopy_site/lottopy/celery.py index 0752be0e..929d9ab4 100644 --- a/lottopy_site/lottopy/celery.py +++ b/lottopy_site/lottopy/celery.py @@ -2,7 +2,7 @@ import os from celery import Celery # Set the default Django settings module for the 'celery' program. -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'lottopy.settings') +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'LottopyConfig.settings') app = Celery('lottopy') diff --git a/lottopy_site/lottopy/sitemaps.py b/lottopy_site/lottopy/sitemaps.py index 8a769d73..3f047662 100644 --- a/lottopy_site/lottopy/sitemaps.py +++ b/lottopy_site/lottopy/sitemaps.py @@ -1,6 +1,6 @@ from django.contrib import sitemaps -from django.urls import reverse, path -from .views import home, about, robots_txt +from django.urls import reverse +#from .views import home, about, robots_txt class StaticViewSitemap(sitemaps.Sitemap): protocol = 'http' @@ -8,7 +8,7 @@ class StaticViewSitemap(sitemaps.Sitemap): changefreq='weekly' def items(self): - return ['home', 'about', 'robots_txt'] + return ['home', 'about'] def location(self, item): return reverse(item) \ No newline at end of file diff --git a/lottopy_site/lottopy/views.py b/lottopy_site/lottopy/views.py index ea75391c..69fc1a04 100644 --- a/lottopy_site/lottopy/views.py +++ b/lottopy_site/lottopy/views.py @@ -6,20 +6,22 @@ from django.conf import settings from django.core.cache.backends.base import DEFAULT_TIMEOUT from django.views.decorators.cache import cache_page from .models import Lotto +import logging #f = "~/projects/django_lottopy/lottopy_site/lottopy/lottopy_web_edititon/pb_ans.csv" # MAKE SURE TO START REDIS BEFORE SITE LOADS CACHE_TTL = getattr(settings, 'CACHE_TTL', DEFAULT_TIMEOUT) -@cache_page(CACHE_TTL) -def base(request): - return render(request, 'lottopy/base.html', - {'nbar': 'home'}) +#@cache_page(CACHE_TTL) +#def base(request): +# return render(request, 'base.html', +# {'nbar': 'home'}) +logger = logging.getLogger(__file__) + @cache_page(CACHE_TTL) def home(request): - context = { 'nbar': 'home', 'pbnumbers': Lotto.get_ans(Lotto.files[0]), @@ -30,11 +32,11 @@ def home(request): 'c25numbers': Lotto.get_ans(Lotto.files[5]), } - return render(request, 'lottopy/home.html', context) + return render(request, 'home.html', context) @cache_page(CACHE_TTL) def about(request): - return render(request, 'lottopy/about.html', + return render(request, 'about.html', {'nbar': 'about', 'title': 'About'}) @cache_page(CACHE_TTL) @@ -48,5 +50,5 @@ def robots_txt(require_GET): return HttpResponse("\n".join(lines), content_type="text/plain") def sitemap(request): - return render(request,sitemaps,section=None,template_name='sitemap.xml',content_type='application/xml',) + return render(request,sitemap,section=None,template_name='sitemap.xml',content_type='application/xml',) \ No newline at end of file diff --git a/lottopy_site/lottopy_site/__pycache__/__init__.cpython-310.pyc b/lottopy_site/lottopy_site/__pycache__/__init__.cpython-310.pyc deleted file mode 100644 index 747cd419..00000000 Binary files a/lottopy_site/lottopy_site/__pycache__/__init__.cpython-310.pyc and /dev/null differ diff --git a/lottopy_site/lottopy_site/__pycache__/settings.cpython-310.pyc b/lottopy_site/lottopy_site/__pycache__/settings.cpython-310.pyc index ba82e716..112554ee 100644 Binary files a/lottopy_site/lottopy_site/__pycache__/settings.cpython-310.pyc and b/lottopy_site/lottopy_site/__pycache__/settings.cpython-310.pyc differ diff --git a/lottopy_site/lottopy_site/__pycache__/urls.cpython-310.pyc b/lottopy_site/lottopy_site/__pycache__/urls.cpython-310.pyc index dbc22695..a75021ec 100644 Binary files a/lottopy_site/lottopy_site/__pycache__/urls.cpython-310.pyc and b/lottopy_site/lottopy_site/__pycache__/urls.cpython-310.pyc differ diff --git a/lottopy_site/lottopy_site/__pycache__/wsgi.cpython-310.pyc b/lottopy_site/lottopy_site/__pycache__/wsgi.cpython-310.pyc index 1ee8176e..ef895f75 100644 Binary files a/lottopy_site/lottopy_site/__pycache__/wsgi.cpython-310.pyc and b/lottopy_site/lottopy_site/__pycache__/wsgi.cpython-310.pyc differ diff --git a/lottopy_site/lottopy_site/settings.py b/lottopy_site/lottopy_site/settings.py index dfa79ba6..df8f18f0 100644 --- a/lottopy_site/lottopy_site/settings.py +++ b/lottopy_site/lottopy_site/settings.py @@ -20,12 +20,15 @@ BASE_DIR = Path(__file__).resolve().parent.parent # See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = 'w=76&jm5z(xwiz#pk%%7^9e8-@tcwugm*5t#9w#7$ym^3nq%3a' +#SECRET_KEY = 'EAT A DICK MY SITE IS SECURE' +SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY') # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True +DEBUG = False +#DEBUG = os.environ.get('DJANGO_DEBUG', '') != 'True' +ADMINS = [('Matteo', 'clichemail1@gmail.com')] -ALLOWED_HOSTS = ['*'] +ALLOWED_HOSTS = ['localhost', '127.0.0.1', '[::1]'] # Application definition @@ -36,16 +39,19 @@ INSTALLED_APPS = [ 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', - 'django.contrib.staticfiles', + "whitenoise.runserver_nostatic", + "django.contrib.staticfiles", 'fontawesomefree', - 'django.contrib.sites', + #'django.contrib.sites', 'django.contrib.sitemaps', + #'django_cleanup.apps.CleanupConfig', ] SITE_ID = 1 MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', + "kolo.middleware.KoloMiddleware", 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', @@ -65,7 +71,7 @@ TEMPLATE_DIR = os.path.join(BASE_DIR,"templates") TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [TEMPLATE_DIR], + 'DIRS': [TEMPLATE_DIR,os.path.join(TEMPLATE_DIR,'lottopy')], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ @@ -127,13 +133,13 @@ USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/4.0/howto/static-files/ -STATIC_URL = 'static/' -#STATIC_ROOT = os.path.join(BASE_DIR, 'static') -STATIC_ROOT = '/static/' +STATIC_URL = '/static/' +STATIC_ROOT = os.path.join(BASE_DIR, "staticfiles") STATICFILES_DIRS = [ - os.path.join(BASE_DIR, "static"), - '/home/williedynamite/projects/django_lottopy/lottopy_site/', + #os.path.join(BASE_DIR, "static"), + '/home/williedynamite/projects/django_lottopy/lottopy_site/static', + '/home/williedynamite/projects/django_lottopy/lottopy_site/lottopy/static', ] STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage' @@ -158,4 +164,33 @@ CELERY_BROKER_URL = 'redis://localhost:6379/0' CELERY_RESULT_BACKEND = "redis://localhost:6379/1" CELERY_TIMEZONE = "America/Eastern" CELERY_TASK_TRACK_STARTED = True -#CELERY_TASK_TIME_LIMIT = 30 * 60 \ No newline at end of file +#CELERY_TASK_TIME_LIMIT = 30 * 60 + +# DataFlair #Logging Information +LOGGING = { + 'version': 1, + # Version of logging + 'disable_existing_loggers': False, + #disable logging +## Handlers ############################################################# + 'handlers': { + 'file': { + 'level': 'DEBUG', + 'class': 'logging.FileHandler', + 'filename': 'dataflair-debug.log', + }, +######################################################################## + 'console': { + 'class': 'logging.StreamHandler', + }, + }, +## Loggers #################################################################### + 'loggers': { + 'django': { + 'handlers': ['file', 'console'], + 'level': 'DEBUG', + 'propagate': True, + 'level': os.getenv('DJANGO_LOG_LEVEL', 'DEBUG') + }, + }, +} \ No newline at end of file diff --git a/lottopy_site/lottopy_site/urls.py b/lottopy_site/lottopy_site/urls.py index 7c4aa337..4eeebe01 100644 --- a/lottopy_site/lottopy_site/urls.py +++ b/lottopy_site/lottopy_site/urls.py @@ -16,15 +16,16 @@ Including another URLconf from django.contrib import admin from django.urls import include, path from django.contrib.sitemaps.views import sitemap +from django.contrib.sitemaps import views from lottopy.sitemaps import StaticViewSitemap -from lottopy import views +from lottopy import urls sitemaps = { - 'static': StaticViewSitemap, + 'static': StaticViewSitemap(), } urlpatterns = [ - path('', include('lottopy.urls')), + path('', include(urls.urlpatterns)), path('admin/', admin.site.urls), - path('sitemap.xml', sitemap, {'sitemaps': sitemaps}, name='django.contrib.sitemaps.views.sitemap'), + path('sitemap.xml', views.sitemap, {'sitemaps': sitemaps}, name='django.contrib.sitemaps.views.sitemap'), ] diff --git a/lottopy_site/lottopy_site/wsgi.py b/lottopy_site/lottopy_site/wsgi.py index b53776b1..25180e56 100644 --- a/lottopy_site/lottopy_site/wsgi.py +++ b/lottopy_site/lottopy_site/wsgi.py @@ -8,9 +8,11 @@ https://docs.djangoproject.com/en/4.0/howto/deployment/wsgi/ """ import os - from django.core.wsgi import get_wsgi_application +from django.conf import settings -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'lottopy_site.settings') - +os.environ['DJANGO_SETTINGS_MODULE']='lottopy_site.settings' +#os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'lottopy_site.settings') application = get_wsgi_application() + +virtualenv = "/home/williedynamite/projects/django_lottopy/django_lottopy/bin/activate" \ No newline at end of file diff --git a/lottopy_site/manage.py b/lottopy_site/manage.py index 7cb4719e..83d2d4dc 100755 --- a/lottopy_site/manage.py +++ b/lottopy_site/manage.py @@ -6,7 +6,8 @@ import sys def main(): """Run administrative tasks.""" - os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'lottopy_site.settings') + #os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'lottopy_site.settings') + os.environ['DJANGO_SETTINGS_MODULE' ]='lottopy_site.settings' try: from django.core.management import execute_from_command_line except ImportError as exc: diff --git a/lottopy_site/static/assets/favicon.ico b/lottopy_site/static/assets/favicon.ico index 9356735c..78d5cb5a 100644 Binary files a/lottopy_site/static/assets/favicon.ico and b/lottopy_site/static/assets/favicon.ico differ diff --git a/lottopy_site/static/assets/nrepeating.jpg b/lottopy_site/static/assets/nrepeating.jpg deleted file mode 100644 index ad4941c1..00000000 Binary files a/lottopy_site/static/assets/nrepeating.jpg and /dev/null differ diff --git a/lottopy_site/templates/lottopy/base.html b/lottopy_site/templates/lottopy/base.html index 1484d0ad..7866a190 100644 --- a/lottopy_site/templates/lottopy/base.html +++ b/lottopy_site/templates/lottopy/base.html @@ -3,8 +3,7 @@
- - + @@ -17,7 +16,7 @@ - + + --> diff --git a/startup.sh b/startup.sh deleted file mode 100755 index 29fe33dd..00000000 --- a/startup.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -source ~/projects/django_lottopy/django_lottopy/bin/activate -redis-server & -python ~/projects/django_lottopy/lottopy_site/manage.py runserver