-
Explore
+{% block header %}Explore{% endblock %}
diff --git a/core/templates/status.html b/core/templates/status.html
index 1c1e935..1b604ac 100644
--- a/core/templates/status.html
+++ b/core/templates/status.html
@@ -1,81 +1,7 @@
+{% extends "base.html" %}
{% load static %}
-
-
-
-
-
-
UnusualArchive
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+{% block header %}Status{% endblock %}
{% block content %}
@@ -120,37 +46,3 @@
{% endblock %}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/core/templates/view.html b/core/templates/view.html
index 45c0330..51afe7d 100644
--- a/core/templates/view.html
+++ b/core/templates/view.html
@@ -1,81 +1,6 @@
+{% extends "base.html" %}
{% load static %}
-
-
-
-
-
-
-
UnusualArchive
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+{% block header %}UNUSUAL MEMES V{{video.id}}{% endblock %}
{% block content %}
@@ -92,31 +17,3 @@
{% endblock %}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/core/urls.py b/core/urls.py
index 3c5407b..b3b572f 100644
--- a/core/urls.py
+++ b/core/urls.py
@@ -6,5 +6,6 @@ urlpatterns = [
path('', views.core, name='core'),
path('status/', views.status, name='status'),
path('about/', views.about, name='about'),
+ path('random/', views.random, name='random'),
path('view/
', views.view, name='view'),
]
diff --git a/core/views.py b/core/views.py
index ee05937..0e43982 100644
--- a/core/views.py
+++ b/core/views.py
@@ -1,7 +1,9 @@
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
+from django.shortcuts import redirect
from core.models import Video
+import random
# Create your views here.
@@ -10,6 +12,11 @@ def core(request):
return render(request, 'base.html', {'videos': videos[::-1]})
+def random(request):
+ videos = Video.objects.all().order_by("?")
+ ran = videos.first();
+ return redirect('/view/'+str(ran.id))
+
def status(request):
highest_id = Video.objects.order_by('-id').first().id
video_list = []
diff --git a/db.sqlite3 b/db.sqlite3
index 053009c..9b557ac 100644
Binary files a/db.sqlite3 and b/db.sqlite3 differ
diff --git a/templates/registration/login.html b/templates/registration/login.html
deleted file mode 100644
index da7493d..0000000
--- a/templates/registration/login.html
+++ /dev/null
@@ -1,54 +0,0 @@
-{% load static %}
-
-
-
-