summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drupal_auth/backend.py8
-rw-r--r--forums/wsgi.py4
-rw-r--r--static/website/templates/fetch_posts.html9
-rw-r--r--static/website/templates/fetch_questions.html9
-rw-r--r--static/website/templates/fetch_tutorials.html10
-rw-r--r--static/website/templates/get_post.html12
-rw-r--r--static/website/templates/get_tutorial.html12
-rw-r--r--static/website/templates/new-post.html45
-rw-r--r--static/website/templates/recent_posts.html5
-rw-r--r--website/managers.py49
10 files changed, 2 insertions, 161 deletions
diff --git a/drupal_auth/backend.py b/drupal_auth/backend.py
deleted file mode 100644
index e85b8b2..0000000
--- a/drupal_auth/backend.py
+++ /dev/null
@@ -1,8 +0,0 @@
-from django.contrib.auth.models import User
-
-from website.models import Test
-
-class DrupalAuthBackend:
- def authenticate(self, username=None, password=None):
- user = User.objects.get(username='admin')
- return user
diff --git a/forums/wsgi.py b/forums/wsgi.py
index 3a52e8b..728eed4 100644
--- a/forums/wsgi.py
+++ b/forums/wsgi.py
@@ -24,8 +24,8 @@ sys.path.append('/Sites/venv/forums/')
# os.environ["DJANGO_SETTINGS_MODULE"] = "forums.settings"
os.environ["DJANGO_SETTINGS_MODULE"] = "forums.settings"
-#activate_this = '/Sites/venv/bin/activate_this.py'
-#execfile(activate_this, dict(__file__=activate_this))
+activate_this = '/Sites/venv/bin/activate_this.py'
+execfile(activate_this, dict(__file__=activate_this))
# This application object is used by any WSGI server configured to use this
# file. This includes Django's development server, if the WSGI_APPLICATION
diff --git a/static/website/templates/fetch_posts.html b/static/website/templates/fetch_posts.html
deleted file mode 100644
index d6d4e06..0000000
--- a/static/website/templates/fetch_posts.html
+++ /dev/null
@@ -1,9 +0,0 @@
-{% extends 'website/templates/base.html' %}
-{% block content %}
-{{ category }}, {{ tutorial }}
-<br>
-Number of posts: {{ posts|length }} <br>
-{% for post in posts %}
- <a href="{% url 'website:get_post' post.id %}"> {{ post.title }}</a>
-{% endfor %}
-{% endblock %}
diff --git a/static/website/templates/fetch_questions.html b/static/website/templates/fetch_questions.html
deleted file mode 100644
index d7492fc..0000000
--- a/static/website/templates/fetch_questions.html
+++ /dev/null
@@ -1,9 +0,0 @@
-{% extends 'website/templates/base.html' %}
-{% block content %}
-{{ category }}, {{ tutorial }}
-<br>
-Number of questions: {{ questions|length }} <br>
-{% for question in questions %}
- <a href="{% url 'website:get_question' question.id %}"> {{ question.title }}</a>
-{% endfor %}
-{% endblock %}
diff --git a/static/website/templates/fetch_tutorials.html b/static/website/templates/fetch_tutorials.html
deleted file mode 100644
index 246c35f..0000000
--- a/static/website/templates/fetch_tutorials.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{% extends 'website/templates/base.html' %}
-{% block content %}
-{% for tut in tutorials %}
- <div class="tutorial">
- <a href="{% url 'website:fetch_questions' category tut.tutorial_name %}">
- {{tut.tutorial_name}}
- </a>
- </div>
-{% endfor %}
-{% endblock %}
diff --git a/static/website/templates/get_post.html b/static/website/templates/get_post.html
deleted file mode 100644
index 359bcd2..0000000
--- a/static/website/templates/get_post.html
+++ /dev/null
@@ -1,12 +0,0 @@
-{% extends 'website/templates/base.html' %}
-{% block content %}
-<h4>{{post.title}}</h4>
-<p>
- {{ post.body }}
-</p>
-
-<b>Replies</b>
-{% for reply in replies %}
- {{ reply.body }}
-{% endfor %}
-{% endblock %}
diff --git a/static/website/templates/get_tutorial.html b/static/website/templates/get_tutorial.html
deleted file mode 100644
index 159f342..0000000
--- a/static/website/templates/get_tutorial.html
+++ /dev/null
@@ -1,12 +0,0 @@
-{% extends 'website/templates/base.html' %}
-{% block content %}
-<h4>{{question.title}}</h4>
-<p>
- {{ question.body }}
-</p>
-
-<b>Replies</b>
-{% for reply in replies %}
- {{ reply.body }}
-{% endfor %}
-{% endblock %}
diff --git a/static/website/templates/new-post.html b/static/website/templates/new-post.html
deleted file mode 100644
index 8487b70..0000000
--- a/static/website/templates/new-post.html
+++ /dev/null
@@ -1,45 +0,0 @@
-{% extends 'website/templates/base.html' %}
-{% load widget_tweaks %}
-{% block content %}
- <h4>
- <span class="glyphicon glyphicon-pencil">
- </span> Create a new question . . .
- </h4>
- <hr>
- <form role="form" action="" method="POST">
- {% with WIDGET_ERROR_CLASS='field_error' %}
-
- <p>Please enter the tutorial details.</p>
- <div class="row">
- <div class="col-lg-3 col-md-4 col-sm-4">
- {% render_field form.category class+="form-control"%}
- </div>
- <div class="col-lg-3 col-md-4 col-sm-4">
- {% render_field form.tutorial class+="form-control" disabled="disabled" %}
- </div>
- <div class="col-lg-2 col-md-2 col-sm-2">
- {% render_field form.minute_range class+="form-control" disabled="disabled" %}
- </div>
- <div class="col-lg-2 col-md-2 col-sm-2">
- {% render_field form.second_range class+="form-control" disabled="disabled" %}
- </div>
- </div>
- <hr>
-
- <p>Please enter your question details.</p>
- <div class="row">
- <div class="col-lg-10">
- <div class="form-group">
- <label for="id_title">Title:</label>
- {% render_field form.title class+="form-control" %}
- </div>
- <div class="form-group">
- <label for="id_body">Question:</label>
- {% render_field form.body class+="form-control" %}
- </div>
- </div>
- </div>
- <input class="btn btn-success" type="submit" value="Submit Question">
- {% endwith %}
- </form>
-{% endblock %}
diff --git a/static/website/templates/recent_posts.html b/static/website/templates/recent_posts.html
deleted file mode 100644
index 3b6ad0e..0000000
--- a/static/website/templates/recent_posts.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<ul>
-{% for post in recent_posts %}
- <li>{{post.title}}</li>
-{% endfor %}
-</ul>
diff --git a/website/managers.py b/website/managers.py
deleted file mode 100644
index c55b931..0000000
--- a/website/managers.py
+++ /dev/null
@@ -1,49 +0,0 @@
-from django.db import models
-from django.contrib.auth.models import (
- BaseUserManager, AbstractBaseUser
-)
-
-class DrupalUserManager(BaseUserManager):
- def create_user(self, password=None):
- user = self.model()
- if not email:
- raise ValueError('Users must have an email address')
-
- user.set_password(password)
- user.save(using=self._db)
- return user
-
- def create_superuser(self, username, password):
- user = self.model()
- user.username = username
- user.password = password
- user.is_admin = True
- user.save(using=self._db)
- return user
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-