Skip to content

Commit

Permalink
fix(static): replace staticfiles => static
Browse files Browse the repository at this point in the history
  • Loading branch information
delitamakanda committed May 11, 2024
1 parent 5f53bce commit 72e6acb
Show file tree
Hide file tree
Showing 19 changed files with 24 additions and 18 deletions.
2 changes: 1 addition & 1 deletion courses/templates/404.html
@@ -1,5 +1,5 @@
{% extends "base2.html" %}
{% load staticfiles %}
{% load static %}
{% load i18n %}
{% block title %}
{% trans '404 - Page Not Found' %}
Expand Down
2 changes: 1 addition & 1 deletion courses/templates/about.html
@@ -1,7 +1,7 @@
{% extends "base.html" %}
{% load i18n %}
{% load widget_tweaks %}
{% load staticfiles %}
{% load static %}
{% block title %}
{% trans 'About us' %}
{% endblock %}
Expand Down
2 changes: 1 addition & 1 deletion courses/templates/base.html
@@ -1,4 +1,4 @@
{% load staticfiles %}
{% load static %}
{% load flatpages %}
{% load i18n %}
{% load gravatar %}
Expand Down
2 changes: 1 addition & 1 deletion courses/templates/base2.html
@@ -1,4 +1,4 @@
{% load staticfiles %}
{% load static %}
{% load flatpages %}
{% load i18n %}
{% load gravatar %}
Expand Down
2 changes: 1 addition & 1 deletion courses/templates/courses/course/detail.html
@@ -1,6 +1,6 @@
{% extends "base.html" %}
{% load i18n %}
{% load staticfiles %}
{% load static %}
{% load gravatar %}
{% block title %}
{{ object.title }}
Expand Down
2 changes: 1 addition & 1 deletion courses/templates/courses/course/list.html
@@ -1,6 +1,6 @@
{% extends "base.html" %}
{% load i18n %}
{% load staticfiles %}
{% load static %}
{% block title %}
{% if subject %}
{{ subject.title }} {% trans 'courses' %}
Expand Down
2 changes: 1 addition & 1 deletion courses/templates/courses/manage/course/list.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
{% load staticfiles %}
{% load static %}
{% load i18n %}
{% block title %}{% trans "My courses"%}{% endblock %}
{% block content %}
Expand Down
2 changes: 1 addition & 1 deletion courses/templates/registration/edit.html
@@ -1,5 +1,5 @@
{% extends 'base.html' %}
{% load staticfiles %}
{% load static %}
{% load i18n %}
{% load widget_tweaks %}
{% block title %}{% trans 'Edit your account' %}{% endblock %}
Expand Down
2 changes: 1 addition & 1 deletion courses/templates/registration/login.html
@@ -1,7 +1,7 @@
{% extends "base2.html" %}
{% load i18n %}
{% load widget_tweaks %}
{% load staticfiles %}
{% load static %}
{% block title %}{% trans 'Log In' %}{% endblock %}
{% block content %}
<div class="h-screen w-screen">
Expand Down
2 changes: 1 addition & 1 deletion courses/templates/registration/password_change_form.html
@@ -1,6 +1,6 @@
{% extends 'base.html' %}
{% load i18n %}
{% load staticfiles %}
{% load static %}
{% load widget_tweaks %}
{% block title %}{% trans 'Change your password' %}{% endblock %}

Expand Down
2 changes: 1 addition & 1 deletion courses/templates/registration/password_reset_confirm.html
@@ -1,6 +1,6 @@
{% extends 'base.html' %}
{% load i18n %}
{% load staticfiles %}
{% load static %}
{% load widget_tweaks %}
{% block title %}{% trans 'Reset your password' %}{% endblock %}

Expand Down
2 changes: 1 addition & 1 deletion courses/templates/registration/password_reset_form.html
@@ -1,5 +1,5 @@
{% extends 'base2.html' %}
{% load staticfiles %}
{% load static %}
{% load i18n %}
{% load widget_tweaks %}
{% block title %}{% trans 'Reset your password' %}{% endblock %}
Expand Down
2 changes: 1 addition & 1 deletion courses/templates/registration/signup.html
@@ -1,6 +1,6 @@
{% extends "base2.html" %}
{% load i18n %}
{% load staticfiles %}
{% load static %}
{% block title %}{% trans 'Sign up' %}{% endblock %}
{% block content %}
<div class="w-full">
Expand Down
2 changes: 1 addition & 1 deletion courses/templates/registration/signup_form.html
@@ -1,6 +1,6 @@
{% extends "base2.html" %}
{% load widget_tweaks %}
{% load staticfiles %}
{% load static %}
{% load i18n %}
{% block title %}
{% trans 'Sign up as' %} {{ user_type }}
Expand Down
2 changes: 1 addition & 1 deletion myelearning/settings.py
Expand Up @@ -26,7 +26,7 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = config('DEBUG', 'True', cast=bool)

ALLOWED_HOSTS = []
ALLOWED_HOSTS = ['*']


# Application definition
Expand Down
8 changes: 7 additions & 1 deletion myelearning/settings_production.py
Expand Up @@ -33,14 +33,20 @@
# SECURE_SSL_REDIRECT = True
# CSRF_COOKIE_SECURE = True

SESSION_EXPIRE_SECONDS = 18000 # 5 hours

# Configure Redis for caching results
CACHE_MIDDLEWARE_SECONDS = 60 * 10 # 10 minutes
CACHE_MIDDLEWARE_KEY_PREFIX = 'myelearning'
CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True

CACHES = {
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": config("HEROKU_REDIS_AQUA_URL"),
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient"
"CLIENT_CLASS": "django_redis.client.DefaultClient",
"MAX_ENTRIES": 1000,
},
"KEY_PREFIX": "myelearning",
"TIMEOUT": 300
Expand Down
Empty file added staticfiles/robots.txt
Empty file.
2 changes: 1 addition & 1 deletion students/templates/students/contact/contact_form.html
@@ -1,7 +1,7 @@
{% extends "base.html" %}
{% load i18n %}
{% load widget_tweaks %}
{% load staticfiles %}
{% load static %}
{% block title %}
{% trans 'Feeback' %}
{% endblock %}
Expand Down
2 changes: 1 addition & 1 deletion students/templates/students/user/detail.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
{% load staticfiles %}
{% load static %}
{% load gravatar %}
{% load badges_tags %}
{% load i18n %}
Expand Down

0 comments on commit 72e6acb

Please sign in to comment.