diff --git a/src/unluckystrike/blog/templates/blog_base.html b/src/unluckystrike/blog/templates/blog_base.html deleted file mode 100755 index 2fa3dab..0000000 --- a/src/unluckystrike/blog/templates/blog_base.html +++ /dev/null @@ -1,121 +0,0 @@ -{% extends "base.html" %} -{% block content %} - -
-
-
-
-
-

Blog

-
-
- -
-
- {% if not post_list %} -

No results were found for your search

- {% else %} - {% for post in post_list %} - -

{{ post.title }}

-
- - {{ post.author | upper }} |  - {{ post.created_on.date }} |  - Categories:  - {% for category in post.categories.all %} - - {{ category.name }} -   - {% endfor %} - -
- - Discover -
-
- {% endfor %} - {% endif %} - -
- - -
-
-
-
-
- -
-
- - -
-
-
-
-
- - -
-
Categories
-
-
- -
-
-
-
- - - {% if is_paginated %} - -
- -{% endblock %} \ No newline at end of file diff --git a/src/unluckystrike/main/settings.py b/src/unluckystrike/main/settings.py index e51fcf9..3abe31c 100755 --- a/src/unluckystrike/main/settings.py +++ b/src/unluckystrike/main/settings.py @@ -57,12 +57,24 @@ 'blog', 'service', # addon apps + 'channels', 'letsencrypt', 'rest_framework', 'drf_yasg', 'ckeditor', ] +# Channels +ASGI_APPLICATION = 'config.asgi.application' +CHANNEL_LAYERS = { + 'default': { + 'BACKEND': 'channels_redis.core.RedisChannelLayer', + 'CONFIG': { + "hosts": [('127.0.0.1', 6379)], + }, + }, +} + MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', diff --git a/src/unluckystrike/main/templates/base.html b/src/unluckystrike/main/templates/base.html index 928c615..62c071c 100755 --- a/src/unluckystrike/main/templates/base.html +++ b/src/unluckystrike/main/templates/base.html @@ -96,6 +96,8 @@
Project
+ +{% endblock %} \ No newline at end of file diff --git a/src/unluckystrike/projects/templates/open-webcam-test.html b/src/unluckystrike/projects/templates/open-webcam-test.html new file mode 100755 index 0000000..ee24e68 --- /dev/null +++ b/src/unluckystrike/projects/templates/open-webcam-test.html @@ -0,0 +1,55 @@ +{% extends "base.html" %} + +{% block title%}Open Webcam Test - Unlucky Strike{% endblock title %} + +{% block content %} + +

Open Webcam Test

+ +
+
+
+
+
Open Webcam Test
+
+ + + +
+
+
+ +
+ + + +
+
+
+
+ + +
+ +{% endblock %} diff --git a/src/unluckystrike/projects/views.py b/src/unluckystrike/projects/views.py index 0503ece..dbc3f6b 100755 --- a/src/unluckystrike/projects/views.py +++ b/src/unluckystrike/projects/views.py @@ -21,8 +21,12 @@ def project_detail(request, project): return render(request, 'raspberry-pi-lab.html') elif project == 'deep-learning-for-advanced-driver-assistance-system-applications': return render(request, 'deep-learning-for-advanced-driver-assistance-system-applications.html') + elif project == 'open-webcam-test': + return render(request, 'open-webcam-test.html') elif project == 'lottery': return lottery_view(request) + elif project == 'exchange-rate': + return exchange_rate_view(request) else: return render(request, '#') @@ -41,4 +45,9 @@ def lottery_view(request): "lottery_number": lottery_number, } - return render(request, 'lottery.html', context) \ No newline at end of file + return render(request, 'lottery.html', context) + + +def exchange_rate_view(request): + + return render(request, 'exchange-rate.html') \ No newline at end of file