-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
56 changed files
with
433 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
data/large_files filter=lfs diff=lfs merge=lfs -crlf | ||
data/large_files/comments.json filter=lfs diff=lfs merge=lfs -crlf | ||
data/large_files/corpus.mm filter=lfs diff=lfs merge=lfs -crlf | ||
data/large_files/corpus.mm.index filter=lfs diff=lfs merge=lfs -crlf | ||
data/large_files/tfidf_corpus.mm filter=lfs diff=lfs merge=lfs -crlf | ||
data/large_files/tfidf_corpus.mm.index filter=lfs diff=lfs merge=lfs -crlf | ||
data/data/large_files filter=lfs diff=lfs merge=lfs -crlf | ||
data/data/large_files/comments.json filter=lfs diff=lfs merge=lfs -crlf | ||
data/data/large_files/corpus.mm filter=lfs diff=lfs merge=lfs -crlf | ||
data/data/large_files/corpus.mm.index filter=lfs diff=lfs merge=lfs -crlf | ||
data/data/large_files/tfidf_corpus.mm filter=lfs diff=lfs merge=lfs -crlf | ||
data/data/large_files/tfidf_corpus.mm.index filter=lfs diff=lfs merge=lfs -crlf |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
""" | ||
Django settings for debates project. | ||
For more information on this file, see | ||
https://docs.djangoproject.com/en/1.7/topics/settings/ | ||
For the full list of settings and their values, see | ||
https://docs.djangoproject.com/en/1.7/ref/settings/ | ||
""" | ||
|
||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...) | ||
import os | ||
BASE_DIR = os.path.dirname(os.path.dirname(__file__)) | ||
|
||
|
||
# Quick-start development settings - unsuitable for production | ||
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/ | ||
|
||
# SECURITY WARNING: keep the secret key used in production secret! | ||
SECRET_KEY = 't3iwc65l39v@gj)89+r7xd#h&6erfx*sev0d8b*r%)h(tn#r&n' | ||
|
||
# SECURITY WARNING: don't run with debug turned on in production! | ||
DEBUG = True | ||
|
||
TEMPLATE_DEBUG = True | ||
|
||
ALLOWED_HOSTS = [] | ||
|
||
|
||
# Application definition | ||
|
||
INSTALLED_APPS = ( | ||
'django.contrib.admin', | ||
'django.contrib.auth', | ||
'django.contrib.contenttypes', | ||
'django.contrib.sessions', | ||
'django.contrib.messages', | ||
'django.contrib.staticfiles', | ||
'rest_framework', | ||
'channels', | ||
) | ||
|
||
MIDDLEWARE_CLASSES = ( | ||
'django.contrib.sessions.middleware.SessionMiddleware', | ||
'django.middleware.common.CommonMiddleware', | ||
'django.middleware.csrf.CsrfViewMiddleware', | ||
'django.contrib.auth.middleware.AuthenticationMiddleware', | ||
'django.contrib.auth.middleware.SessionAuthenticationMiddleware', | ||
'django.contrib.messages.middleware.MessageMiddleware', | ||
'django.middleware.clickjacking.XFrameOptionsMiddleware', | ||
) | ||
|
||
ROOT_URLCONF = 'debates.urls' | ||
|
||
WSGI_APPLICATION = 'debates.wsgi.application' | ||
|
||
|
||
# Database | ||
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases | ||
|
||
DATABASES = { | ||
'default': { | ||
'ENGINE': 'django.db.backends.sqlite3', | ||
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), | ||
} | ||
} | ||
|
||
# Internationalization | ||
# https://docs.djangoproject.com/en/1.7/topics/i18n/ | ||
|
||
LANGUAGE_CODE = 'en-us' | ||
|
||
TIME_ZONE = 'UTC' | ||
|
||
USE_I18N = True | ||
|
||
USE_L10N = True | ||
|
||
USE_TZ = True | ||
|
||
|
||
# Static files (CSS, JavaScript, Images) | ||
# https://docs.djangoproject.com/en/1.7/howto/static-files/ | ||
|
||
STATIC_URL = '/static/' | ||
|
||
REST_FRAMEWORK = { | ||
'PAGE_SIZE': 10, | ||
'EXCEPTION_HANDLER': 'rest_framework_json_api.exceptions.exception_handler', | ||
'DEFAULT_PAGINATION_CLASS': | ||
'rest_framework_json_api.pagination.PageNumberPagination', | ||
'DEFAULT_PARSER_CLASSES': ( | ||
'rest_framework_json_api.parsers.JSONParser', | ||
'rest_framework.parsers.FormParser', | ||
'rest_framework.parsers.MultiPartParser' | ||
), | ||
'DEFAULT_RENDERER_CLASSES': ( | ||
'rest_framework_json_api.renderers.JSONRenderer', | ||
'rest_framework.renderers.BrowsableAPIRenderer', | ||
), | ||
'DEFAULT_METADATA_CLASS': 'rest_framework_json_api.metadata.JSONAPIMetadata', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from django.conf.urls import url, include | ||
from rest_framework import routers | ||
from speakers import views | ||
|
||
router = routers.DefaultRouter() | ||
router.register(r'users', views.UserViewSet) | ||
router.register(r'groups', views.GroupViewSet) | ||
|
||
# Wire up our API using automatic URL routing. | ||
# Additionally, we include login URLs for the browsable API. | ||
urlpatterns = [ | ||
url(r'^', include(router.urls)), | ||
url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')) | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
""" | ||
WSGI config for debates project. | ||
It exposes the WSGI callable as a module-level variable named ``application``. | ||
For more information on this file, see | ||
https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ | ||
""" | ||
|
||
import os | ||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "debates.settings") | ||
|
||
from django.core.wsgi import get_wsgi_application | ||
application = get_wsgi_application() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env python | ||
import os | ||
import sys | ||
|
||
if __name__ == "__main__": | ||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "debates.settings") | ||
|
||
from django.core.management import execute_from_command_line | ||
|
||
execute_from_command_line(sys.argv) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
asgiref==0.9.1 | ||
autobahn==0.12.1 | ||
channels==0.9.5 | ||
daphne==0.9.3 | ||
Django==1.9.4 | ||
djangorestframework==3.3.2 | ||
djangorestframework-jsonapi==2.0.0b2 | ||
inflection==0.3.1 | ||
six==1.10.0 | ||
Twisted==15.5.0 | ||
txaio==2.2.1 | ||
zope.interface==4.1.3 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.contrib import admin | ||
|
||
# Register your models here. |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.db import models | ||
|
||
# Create your models here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from django.contrib.auth.models import User, Group | ||
from rest_framework import serializers | ||
|
||
|
||
class UserSerializer(serializers.HyperlinkedModelSerializer): | ||
class Meta: | ||
model = User | ||
fields = ('url', 'username', 'email', 'groups') | ||
|
||
|
||
class GroupSerializer(serializers.HyperlinkedModelSerializer): | ||
class Meta: | ||
model = Group | ||
fields = ('url', 'name') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.test import TestCase | ||
|
||
# Create your tests here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from django.contrib.auth.models import User, Group | ||
from rest_framework import viewsets | ||
from speakers.serializers import UserSerializer, GroupSerializer | ||
|
||
|
||
class UserViewSet(viewsets.ModelViewSet): | ||
""" | ||
API endpoint that allows users to be viewed or edited. | ||
""" | ||
queryset = User.objects.all().order_by('-date_joined') | ||
serializer_class = UserSerializer | ||
|
||
|
||
class GroupViewSet(viewsets.ModelViewSet): | ||
""" | ||
API endpoint that allows groups to be viewed or edited. | ||
""" | ||
queryset = Group.objects.all() | ||
serializer_class = GroupSerializer |
File renamed without changes.
Oops, something went wrong.