Skip to content

Commit

Permalink
fix: delete compressor and logging
Browse files Browse the repository at this point in the history
  • Loading branch information
RustamovAkrom committed Oct 7, 2024
1 parent 847c63c commit bf5f32c
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 60 deletions.
6 changes: 0 additions & 6 deletions compressor/CACHE/css/output.41f0d9374cbd.css

This file was deleted.

5 changes: 0 additions & 5 deletions compressor/CACHE/js/output.c150b42af4da.js

This file was deleted.

4 changes: 0 additions & 4 deletions compressor/CACHE/manifest.json

This file was deleted.

40 changes: 1 addition & 39 deletions config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
# "django.contrib.postgres",
# default apps
"apps.blog.apps.BlogConfig",
# thirtd party apps
"compressor",
]

ROOT_URLCONF = "config.urls"
Expand All @@ -46,12 +44,6 @@
"DIRS": [BASE_DIR / "templates"],
"APP_DIRS": True,
"OPTIONS": {
# "loaders": [
# ("django.template.loaders.cached.Loader", [
# 'django.template.loaders.filesystem.Loader',
# 'django.template.loaders.app_directories.Loader',
# ])
# ],
"context_processors": [
"django.template.context_processors.debug",
"django.template.context_processors.request",
Expand Down Expand Up @@ -100,41 +92,11 @@
STATIC_ROOT = BASE_DIR / "staticfiles"
STATICFILES_DIRS = [BASE_DIR / "static"]

COMPRESS_ROOT = "compressor/"
COMPRESS_ENABLED = True
COMPRESS_OFFLINE = True

MEDIA_URL = "media/"
MEDIA_ROOT = BASE_DIR / "media/"

DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"

AUTH_USER_MODEL = "blog.User"

SITE_ID = 1

STATICFILES_FINDERS = (
"django.contrib.staticfiles.finders.FileSystemFinder",
"django.contrib.staticfiles.finders.AppDirectoriesFinder",
"compressor.finders.CompressorFinder",
)


LOGGING = {
"version": 1,
"disable_existing_loggers": False,
"handlers": {
"file": {
"level": "DEBUG",
"class": "logging.FileHandler",
"filename": BASE_DIR / "debug.log",
},
},
"loggers": {
"django": {
"handlers": ["file"],
"level": "DEBUG",
"propagate": True,
},
},
}
SITE_ID = 1
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Django
django-appconf==1.0.6
django-compressor
django_sitemaps==2.0.1
gunicorn==23.0.0
pillow
5 changes: 0 additions & 5 deletions templates/blog/base.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{% load static %}
{% load compress %}
<!DOCTYPE html>
<html>
<head>
Expand All @@ -11,10 +10,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<!-- Bootstrap CSS -->
{% compress css %}
<link rel="stylesheet" href="{% static 'bootstrap/css/bootstrap.min.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'blog/main.css' %}">
{% endcompress %}

{% block head %} {% endblock %}
<title>{% block title %} Base html {% endblock %}</title>
Expand Down Expand Up @@ -122,12 +119,10 @@ <h5 style="background-color: whitesmoke">{{ request.user }}</h5>
{% endblock %}
</div>

{% compress js %}
<script src="{% static 'htmx/htmx.min.js' %}"></script>

<script src="{% static 'jquery/js/jquery-3.2.1.slim.min.js' %}"></script>
<script src="{% static 'cloudflare/js/popper.min.js' %}"></script>
<script src="{% static 'bootstrap/js/bootstrap.min.js' %}"></script>
{% endcompress %}
</body>
</html>

0 comments on commit bf5f32c

Please sign in to comment.