Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added pychart/MEDIA/.gitkeep
Empty file.
48 changes: 48 additions & 0 deletions pychart/MEDIA/TestScatter.html

Large diffs are not rendered by default.

506 changes: 506 additions & 0 deletions pychart/MEDIA/boston_housing_data.csv

Large diffs are not rendered by default.

20 changes: 18 additions & 2 deletions pychart/pychart/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'pychart_profile',
'pychart_datarender'
]

MIDDLEWARE = [
Expand Down Expand Up @@ -75,12 +77,16 @@

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
'ENGINE': 'django.db.backends.postgresql',
'NAME': os.environ['PYCHART_DB'],
'TEST': {
'NAME': 'test_pychart'
}
}
}



# Password validation
# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators

Expand Down Expand Up @@ -118,3 +124,13 @@
# https://docs.djangoproject.com/en/1.10/howto/static-files/

STATIC_URL = '/static/'

# Regsitration Stuff
ACCOUNT_ACTIVATION_DAYS = 7

EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'

LOGIN_REDIRECT_URL = '/'

MEDIA_ROOT = os.path.join(BASE_DIR, 'MEDIA')
MEDIA_URL = '/media/'
38 changes: 38 additions & 0 deletions pychart/pychart_datarender/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-13 19:43
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

initial = True

dependencies = [
]

operations = [
migrations.CreateModel(
name='Data',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=255)),
('description', models.CharField(blank=True, max_length=255, null=True)),
('data', models.FileField(blank=True, null=True, upload_to=' ')),
('date_uploaded', models.DateField(auto_now=True)),
('date_modified', models.DateField(auto_now=True)),
],
),
migrations.CreateModel(
name='Render',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=255)),
('description', models.CharField(blank=True, max_length=255, null=True)),
('render_type', models.CharField(blank=True, choices=[('Scatter', 'Scatter'), ('Bar', 'Bar'), ('Histogram', 'Histogram')], max_length=255, null=True)),
('date_uploaded', models.DateField(auto_now=True)),
('date_modified', models.DateField(auto_now=True)),
],
),
]
40 changes: 40 additions & 0 deletions pychart/pychart_datarender/models.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
from django.db import models

# Create your models here.

class Data(models.Model):
"""Implementation of data model."""
title = models.CharField(max_length=255, blank=False, null=False)
description = models.CharField(max_length=255, blank=True, null=True)
data = models.FileField(upload_to='data', blank=True, null=True)
date_uploaded = models.DateField(auto_now=True)
date_modified = models.DateField(auto_now=True)
# owner = models.ForeignKey(Profile,
# related_name='data_sets',
# blank=False,
# null=False)

def __str__(self):
"""Create string representation of this model."""
return self.title


class Render(models.Model):
"""Implementation of render model."""

RENDER_TYPE = (
('Scatter', 'Scatter'),
('Bar', 'Bar'),
('Histogram', 'Histogram')
)

title = models.CharField(max_length=255, blank=False, null=False)
description = models.CharField(max_length=255, blank=True, null=True)
render_type = models.CharField(max_length=255,
choices=RENDER_TYPE,
blank=True,
null=True)
render = models.FileField(upload_to='render', blank=True, null=True)
date_uploaded = models.DateField(auto_now=True)
date_modified = models.DateField(auto_now=True)

def __str__(self):
"""Create string representation of this model."""
return self.title
64 changes: 64 additions & 0 deletions requirements.pip
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
alabaster==0.7.9
appdirs==1.4.0
appnope==0.1.0
Babel==2.3.4
backports.shutil-get-terminal-size==1.0.0
bleach==1.5.0
cycler==0.10.0
decorator==4.0.11
Django==1.10.5
django-registration==2.2
docutils==0.13.1
entrypoints==0.2.2
factory-boy==2.8.1
Faker==0.7.7
gnureadline==6.3.3
html5lib==0.9999999
imagesize==0.7.1
ipykernel==4.5.2
ipyparallel==6.0.0
ipython==5.2.1
ipython-genutils==0.1.0
ipywidgets==5.2.2
Jinja2==2.9.5
jsonschema==2.5.1
jupyter-client==4.4.0
jupyter-core==4.2.1
MarkupSafe==0.23
matplotlib==2.0.0
mistune==0.7.3
nbconvert==5.1.1
nbformat==4.2.0
nose==1.3.7
notebook==4.3.1
numpy==1.12.0
packaging==16.8
pandas==0.19.2
pandocfilters==1.4.1
path.py==10.1
pexpect==4.2.1
pickleshare==0.7.4
pkg-resources==0.0.0
prompt-toolkit==1.0.10
psycopg2==2.6.2
ptyprocess==0.5.1
Pygments==2.2.0
pyparsing==2.1.10
python-dateutil==2.6.0
pytz==2016.10
pyzmq==16.0.2
qtconsole==4.2.1
requests==2.13.0
scikit-learn==0.18.1
scipy==0.18.1
seaborn==0.7.1
simplegeneric==0.8.1
six==1.10.0
snowballstemmer==1.2.1
Sphinx==1.5.2
terminado==0.6
testpath==0.3
tornado==4.4.2
traitlets==4.3.1
wcwidth==0.1.7
widgetsnbextension==1.2.6