diff --git a/ACMAS/app/ACMAS_Web/templates/_base.html b/ACMAS/app/ACMAS_Web/templates/_base.html index 91a7aa1..368c817 100644 --- a/ACMAS/app/ACMAS_Web/templates/_base.html +++ b/ACMAS/app/ACMAS_Web/templates/_base.html @@ -3,7 +3,7 @@ {% load component_tags %} -{% with mode="dark" %} +{% with mode="light" %} {% block head %} @@ -278,7 +278,7 @@
  • Github
  • - +
  • diff --git a/ACMAS/app/ACMAS_Web/templates/darkmode.html b/ACMAS/app/ACMAS_Web/templates/darkmode.html new file mode 100644 index 0000000..745a696 --- /dev/null +++ b/ACMAS/app/ACMAS_Web/templates/darkmode.html @@ -0,0 +1,32 @@ +{% extends '_base.html' %} +{% load component_tags %} + +{% block title %}ACMAS Homepage{% endblock %} + +{% block google_description %}ACMAS is the free homework and backtest helper created by students for students. Join our community of students anonymously today!{% endblock %} +{% block google_title %}ACMAS: Automated Course Material Archiving System{% endblock %} +{% block google_keywords %}homework, homework help, exam, exam help, student, free homework help, free school help, tutor, online tutor{% endblock %} + +{% block twitter_title %}ACMAS: Automated Course Material Archiving System{% endblock %} +{% block twitter_description %}ACMAS is the free homework and backtest helper created by students for students. Join our community of students anonymously today!{% endblock %} + +{% block facebook_title %}ACMAS: Automated Course Material Archiving System{% endblock %} +{% block facebook_description %}ACMAS is the free homework and backtest helper created by students for students. Join our community of students anonymously today!{% endblock %} +{% block facebook_url %}www.acmas.systems{% endblock %} + + +{% block content %} +
    +
    Simplify
    studying with
    +
    + + ACMAS logo + +
    +
    +{% endblock content %} +

    This is a test of cookies

    \ No newline at end of file diff --git a/ACMAS/app/ACMAS_Web/urls.py b/ACMAS/app/ACMAS_Web/urls.py index 9ba2b80..5c74934 100644 --- a/ACMAS/app/ACMAS_Web/urls.py +++ b/ACMAS/app/ACMAS_Web/urls.py @@ -30,7 +30,7 @@ path("pdfReader", views.pdfReader, name="pdfReader"), path("upload-file", views.uploadFile, name="uploadFile"), path("upload-manually", views.uploadManually, name="uploadManually"), - path("darkmode",views.toggleDarkMode,name="darkmode"), + path("dark-mode", views.darkMode, name="darkMode"), path("sitemap.xml", views.sitemap, name="sitemap"), path("favicon.ico", views.favicon, name="favicon"), path("robots.txt", views.robots, name="robots"), diff --git a/ACMAS/app/ACMAS_Web/views.py b/ACMAS/app/ACMAS_Web/views.py index c8e7d2b..c4fcb6a 100644 --- a/ACMAS/app/ACMAS_Web/views.py +++ b/ACMAS/app/ACMAS_Web/views.py @@ -23,6 +23,7 @@ def generateContext(request): # ACMAS homepage def index(request): context = generateContext(request) + print("So this is where print messages go") request.session.set_test_cookie() return render(request, "index.html", context) @@ -44,6 +45,9 @@ def favicon(request): # Search by question page def searchByQuestion(request): + if request.session.test_cookie_worked(): + print("The test cookie works") + request.session.delete_test_cookie() context = generateContext(request) question = request.POST.get("question") # Check to see if a question was entered if ( @@ -210,11 +214,14 @@ def uploadManually(request): # Do manual question upload logic createFacade().uploadText(school, course, question, answer, assignment_type) return render(request, "upload-manually.html", context) -def toggleDarkMode(request): + + +def darkMode(request): context = generateContext(request) - #There must be some way to detect which template the user is on. - current_template="index.html" if request.session.test_cookie_worked(): - print("The test cookie works") + print("The test cookie worked!!!") request.session.delete_test_cookie() - return render(request,current_template,context) \ No newline at end of file + # There must be some way to detect which template the user is on. + return render(request, "darkmode.html", context) + +