From 8b55c52a40b00446e819f5612d36318c2380afc1 Mon Sep 17 00:00:00 2001 From: jwindsor Date: Sat, 24 Sep 2016 21:28:47 -0400 Subject: [PATCH] Accounts and basic mainpage --- .DS_Store | Bin 0 -> 6148 bytes Procfile | 1 + README.md | 43 +++++++ accounts/__init__.py | 0 accounts/admin.py | 3 + accounts/forms.py | 12 ++ accounts/models.py | 5 + accounts/templates/accounts/login.html | 16 +++ accounts/templates/accounts/register.html | 28 +++++ accounts/tests.py | 3 + accounts/urls.py | 9 ++ accounts/views.py | 99 ++++++++++++++++ bin/activate | 78 ++++++++++++ bin/activate.csh | 36 ++++++ bin/activate.fish | 76 ++++++++++++ bin/activate_this.py | 34 ++++++ bin/easy_install | 11 ++ bin/easy_install-2.7 | 11 ++ bin/pip | 11 ++ bin/pip2 | 11 ++ bin/pip2.7 | 11 ++ bin/python | Bin 0 -> 25152 bytes bin/python-config | 78 ++++++++++++ bin/python2 | 1 + bin/python2.7 | 1 + bin/wheel | 11 ++ db.sqlite3 | Bin 0 -> 131072 bytes include/python2.7 | 1 + iriot/__init__.py | 0 iriot/settings.py | 137 ++++++++++++++++++++++ iriot/static/humans.txt | 0 iriot/urls.py | 23 ++++ iriot/wsgi.py | 16 +++ manage.py | 10 ++ master/__init__.py | 0 master/admin.py | 3 + master/migrations/__init__.py | 0 master/models.py | 3 + master/templates/master/base.html | 98 ++++++++++++++++ master/templates/master/index.html | 21 ++++ master/tests.py | 3 + master/urls.py | 8 ++ master/views.py | 6 + pip-selfcheck.json | 1 + requirements.txt | 5 + runtime.txt | 1 + 46 files changed, 925 insertions(+) create mode 100644 .DS_Store create mode 100644 Procfile create mode 100644 README.md create mode 100644 accounts/__init__.py create mode 100644 accounts/admin.py create mode 100644 accounts/forms.py create mode 100644 accounts/models.py create mode 100644 accounts/templates/accounts/login.html create mode 100644 accounts/templates/accounts/register.html create mode 100644 accounts/tests.py create mode 100644 accounts/urls.py create mode 100644 accounts/views.py create mode 100644 bin/activate create mode 100644 bin/activate.csh create mode 100644 bin/activate.fish create mode 100644 bin/activate_this.py create mode 100755 bin/easy_install create mode 100755 bin/easy_install-2.7 create mode 100755 bin/pip create mode 100755 bin/pip2 create mode 100755 bin/pip2.7 create mode 100755 bin/python create mode 100755 bin/python-config create mode 120000 bin/python2 create mode 120000 bin/python2.7 create mode 100755 bin/wheel create mode 100644 db.sqlite3 create mode 120000 include/python2.7 create mode 100644 iriot/__init__.py create mode 100644 iriot/settings.py create mode 100644 iriot/static/humans.txt create mode 100644 iriot/urls.py create mode 100644 iriot/wsgi.py create mode 100644 manage.py create mode 100644 master/__init__.py create mode 100644 master/admin.py create mode 100644 master/migrations/__init__.py create mode 100644 master/models.py create mode 100644 master/templates/master/base.html create mode 100644 master/templates/master/index.html create mode 100644 master/tests.py create mode 100644 master/urls.py create mode 100644 master/views.py create mode 100644 pip-selfcheck.json create mode 100644 requirements.txt create mode 100644 runtime.txt diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0Login + +
+ {% csrf_token %} + + +
+ + +
+ + +
+{% endblock %} diff --git a/accounts/templates/accounts/register.html b/accounts/templates/accounts/register.html new file mode 100644 index 0000000..ddf3e08 --- /dev/null +++ b/accounts/templates/accounts/register.html @@ -0,0 +1,28 @@ +{% extends "master/base.html" %} +{% block body_block %} +

Register

+ + {% if registered %} +

You are Registered. Continue to Home Page.

+ {% else %} + +
+ + {% csrf_token %} + + + {% for field in user_form.visible_fields %} +
+ {{ field.errors }} + + {{ field }} +
+ {% endfor %} + + + +
+ {% endif %} +{% endblock %} diff --git a/accounts/tests.py b/accounts/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/accounts/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/accounts/urls.py b/accounts/urls.py new file mode 100644 index 0000000..56ce987 --- /dev/null +++ b/accounts/urls.py @@ -0,0 +1,9 @@ +from django.conf.urls import url + +from . import views + +urlpatterns = [ + url(r'^register/$', views.register, name='register'), + url(r'^login/$', views.user_login, name='login'), + url(r'^logout/$', views.user_logout, name='logout'), +] diff --git a/accounts/views.py b/accounts/views.py new file mode 100644 index 0000000..aff37aa --- /dev/null +++ b/accounts/views.py @@ -0,0 +1,99 @@ +from django.shortcuts import render +from django.http import HttpResponse, HttpResponseRedirect +from django.contrib.auth import authenticate, login, logout +from .forms import UserForm +from django.contrib.auth.decorators import login_required +from django.contrib import messages +from django.core.urlresolvers import reverse +from django.contrib.auth.models import User + +def register(request): + + # A boolean value for telling the template whether the registration was successful. + # Set to False initially. Code changes value to True when registration succeeds. + registered = False + + # If it's a HTTP POST, we're interested in processing form data. + if request.method == 'POST': + # Attempt to grab information from the raw form information. + # Note that we make use of both UserForm and UserProfileForm. + user_form = UserForm(data=request.POST) + + # If the two forms are valid... + if user_form.is_valid(): + # Save the user's form data to the database. + user = user_form.save() + + # Now we hash the password with the set_password method. + # Once hashed, we can update the user object. + user.set_password(user.password) + + user.save() + + registered = True + + # Invalid form or forms - mistakes or something else? + # Print problems to the terminal. + # They'll also be shown to the user. + else: + print(user_form.errors) + + # Not a HTTP POST, so we render our form using two ModelForm instances. + # These forms will be blank, ready for user input. + else: + user_form = UserForm() + + # Render the template depending on the context. + return render(request, 'accounts/register.html', {'user_form': user_form, 'registered': registered} ) + +def user_login(request): + + # If the request is a HTTP POST, try to pull out the relevant information. + if request.method == 'POST': + # Gather the username and password provided by the user. + # This information is obtained from the login form. + # We use request.POST.get('') as opposed to request.POST[''], + # because the request.POST.get('') returns None, if the value does not exist, + # while the request.POST[''] will raise key error exception + username = request.POST.get('username') + password = request.POST.get('password') + + # Use Django's machinery to attempt to see if the username/password + # combination is valid - a User object is returned if it is. + user = authenticate(username=username, password=password) + + # If we have a User object, the details are correct. + # If None (Python's way of representing the absence of a value), no user + # with matching credentials was found. + if user: + # Is the account active? It could have been disabled. + if user.is_active: + # If the account is valid and active, we can log the user in. + # We'll send the user back to the homepage. + login(request, user) + return HttpResponseRedirect('/') + else: + # An inactive account was used - no logging in! + messages.warning(request, 'Your account is disabled. Please contact support.') + return HttpResponseRedirect('/') + else: + # Bad login details were provided. So we can't log the user in. + # TODO: USE FLASH MESSAGES ----------------- + messages.warning(request, 'Invalid Login.') + return HttpResponseRedirect(reverse('accounts:login')) + + # The request is not a HTTP POST, so display the login form. + # This scenario would most likely be a HTTP GET. + else: + # No context variables to pass to the template system, hence the + # blank dictionary object... + return render(request, 'accounts/login.html', {}) + + +# Use the login_required() decorator to ensure only those logged in can access the view. +@login_required +def user_logout(request): + # Since we know the user is logged in, we can now just log them out. + logout(request) + messages.success(request, 'You are now logged out.') + return HttpResponseRedirect('/') diff --git a/bin/activate b/bin/activate new file mode 100644 index 0000000..7e12a3e --- /dev/null +++ b/bin/activate @@ -0,0 +1,78 @@ +# This file must be used with "source bin/activate" *from bash* +# you cannot run it directly + +deactivate () { + unset -f pydoc >/dev/null 2>&1 + + # reset old environment variables + # ! [ -z ${VAR+_} ] returns true if VAR is declared at all + if ! [ -z "${_OLD_VIRTUAL_PATH+_}" ] ; then + PATH="$_OLD_VIRTUAL_PATH" + export PATH + unset _OLD_VIRTUAL_PATH + fi + if ! [ -z "${_OLD_VIRTUAL_PYTHONHOME+_}" ] ; then + PYTHONHOME="$_OLD_VIRTUAL_PYTHONHOME" + export PYTHONHOME + unset _OLD_VIRTUAL_PYTHONHOME + fi + + # This should detect bash and zsh, which have a hash command that must + # be called to get it to forget past commands. Without forgetting + # past commands the $PATH changes we made may not be respected + if [ -n "${BASH-}" ] || [ -n "${ZSH_VERSION-}" ] ; then + hash -r 2>/dev/null + fi + + if ! [ -z "${_OLD_VIRTUAL_PS1+_}" ] ; then + PS1="$_OLD_VIRTUAL_PS1" + export PS1 + unset _OLD_VIRTUAL_PS1 + fi + + unset VIRTUAL_ENV + if [ ! "${1-}" = "nondestructive" ] ; then + # Self destruct! + unset -f deactivate + fi +} + +# unset irrelevant variables +deactivate nondestructive + +VIRTUAL_ENV="/Users/jameswindsor/Documents/Capstone/iRiot-WebApp" +export VIRTUAL_ENV + +_OLD_VIRTUAL_PATH="$PATH" +PATH="$VIRTUAL_ENV/bin:$PATH" +export PATH + +# unset PYTHONHOME if set +if ! [ -z "${PYTHONHOME+_}" ] ; then + _OLD_VIRTUAL_PYTHONHOME="$PYTHONHOME" + unset PYTHONHOME +fi + +if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT-}" ] ; then + _OLD_VIRTUAL_PS1="$PS1" + if [ "x" != x ] ; then + PS1="$PS1" + else + PS1="(`basename \"$VIRTUAL_ENV\"`) $PS1" + fi + export PS1 +fi + +# Make sure to unalias pydoc if it's already there +alias pydoc 2>/dev/null >/dev/null && unalias pydoc + +pydoc () { + python -m pydoc "$@" +} + +# This should detect bash and zsh, which have a hash command that must +# be called to get it to forget past commands. Without forgetting +# past commands the $PATH changes we made may not be respected +if [ -n "${BASH-}" ] || [ -n "${ZSH_VERSION-}" ] ; then + hash -r 2>/dev/null +fi diff --git a/bin/activate.csh b/bin/activate.csh new file mode 100644 index 0000000..91b2c7b --- /dev/null +++ b/bin/activate.csh @@ -0,0 +1,36 @@ +# This file must be used with "source bin/activate.csh" *from csh*. +# You cannot run it directly. +# Created by Davide Di Blasi . + +alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; test "\!:*" != "nondestructive" && unalias deactivate && unalias pydoc' + +# Unset irrelevant variables. +deactivate nondestructive + +setenv VIRTUAL_ENV "/Users/jameswindsor/Documents/Capstone/iRiot-WebApp" + +set _OLD_VIRTUAL_PATH="$PATH" +setenv PATH "$VIRTUAL_ENV/bin:$PATH" + + + +if ("" != "") then + set env_name = "" +else + set env_name = `basename "$VIRTUAL_ENV"` +endif + +# Could be in a non-interactive environment, +# in which case, $prompt is undefined and we wouldn't +# care about the prompt anyway. +if ( $?prompt ) then + set _OLD_VIRTUAL_PROMPT="$prompt" + set prompt = "[$env_name] $prompt" +endif + +unset env_name + +alias pydoc python -m pydoc + +rehash + diff --git a/bin/activate.fish b/bin/activate.fish new file mode 100644 index 0000000..edfedb5 --- /dev/null +++ b/bin/activate.fish @@ -0,0 +1,76 @@ +# This file must be used using `. bin/activate.fish` *within a running fish ( http://fishshell.com ) session*. +# Do not run it directly. + +function deactivate -d 'Exit virtualenv mode and return to the normal environment.' + # reset old environment variables + if test -n "$_OLD_VIRTUAL_PATH" + set -gx PATH $_OLD_VIRTUAL_PATH + set -e _OLD_VIRTUAL_PATH + end + + if test -n "$_OLD_VIRTUAL_PYTHONHOME" + set -gx PYTHONHOME $_OLD_VIRTUAL_PYTHONHOME + set -e _OLD_VIRTUAL_PYTHONHOME + end + + if test -n "$_OLD_FISH_PROMPT_OVERRIDE" + # Set an empty local `$fish_function_path` to allow the removal of `fish_prompt` using `functions -e`. + set -l fish_function_path + + # Erase virtualenv's `fish_prompt` and restore the original. + functions -e fish_prompt + functions -c _old_fish_prompt fish_prompt + functions -e _old_fish_prompt + set -e _OLD_FISH_PROMPT_OVERRIDE + end + + set -e VIRTUAL_ENV + + if test "$argv[1]" != 'nondestructive' + # Self-destruct! + functions -e pydoc + functions -e deactivate + end +end + +# Unset irrelevant variables. +deactivate nondestructive + +set -gx VIRTUAL_ENV "/Users/jameswindsor/Documents/Capstone/iRiot-WebApp" + +set -gx _OLD_VIRTUAL_PATH $PATH +set -gx PATH "$VIRTUAL_ENV/bin" $PATH + +# Unset `$PYTHONHOME` if set. +if set -q PYTHONHOME + set -gx _OLD_VIRTUAL_PYTHONHOME $PYTHONHOME + set -e PYTHONHOME +end + +function pydoc + python -m pydoc $argv +end + +if test -z "$VIRTUAL_ENV_DISABLE_PROMPT" + # Copy the current `fish_prompt` function as `_old_fish_prompt`. + functions -c fish_prompt _old_fish_prompt + + function fish_prompt + # Save the current $status, for fish_prompts that display it. + set -l old_status $status + + # Prompt override provided? + # If not, just prepend the environment name. + if test -n "" + printf '%s%s' "" (set_color normal) + else + printf '%s(%s) ' (set_color normal) (basename "$VIRTUAL_ENV") + end + + # Restore the original $status + echo "exit $old_status" | source + _old_fish_prompt + end + + set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV" +end diff --git a/bin/activate_this.py b/bin/activate_this.py new file mode 100644 index 0000000..f18193b --- /dev/null +++ b/bin/activate_this.py @@ -0,0 +1,34 @@ +"""By using execfile(this_file, dict(__file__=this_file)) you will +activate this virtualenv environment. + +This can be used when you must use an existing Python interpreter, not +the virtualenv bin/python +""" + +try: + __file__ +except NameError: + raise AssertionError( + "You must run this like execfile('path/to/activate_this.py', dict(__file__='path/to/activate_this.py'))") +import sys +import os + +old_os_path = os.environ.get('PATH', '') +os.environ['PATH'] = os.path.dirname(os.path.abspath(__file__)) + os.pathsep + old_os_path +base = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +if sys.platform == 'win32': + site_packages = os.path.join(base, 'Lib', 'site-packages') +else: + site_packages = os.path.join(base, 'lib', 'python%s' % sys.version[:3], 'site-packages') +prev_sys_path = list(sys.path) +import site +site.addsitedir(site_packages) +sys.real_prefix = sys.prefix +sys.prefix = base +# Move the added items to the front of the path: +new_sys_path = [] +for item in list(sys.path): + if item not in prev_sys_path: + new_sys_path.append(item) + sys.path.remove(item) +sys.path[:0] = new_sys_path diff --git a/bin/easy_install b/bin/easy_install new file mode 100755 index 0000000..2843c58 --- /dev/null +++ b/bin/easy_install @@ -0,0 +1,11 @@ +#!/Users/jameswindsor/Documents/Capstone/iRiot-WebApp/bin/python + +# -*- coding: utf-8 -*- +import re +import sys + +from setuptools.command.easy_install import main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/bin/easy_install-2.7 b/bin/easy_install-2.7 new file mode 100755 index 0000000..2843c58 --- /dev/null +++ b/bin/easy_install-2.7 @@ -0,0 +1,11 @@ +#!/Users/jameswindsor/Documents/Capstone/iRiot-WebApp/bin/python + +# -*- coding: utf-8 -*- +import re +import sys + +from setuptools.command.easy_install import main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/bin/pip b/bin/pip new file mode 100755 index 0000000..c7699c2 --- /dev/null +++ b/bin/pip @@ -0,0 +1,11 @@ +#!/Users/jameswindsor/Documents/Capstone/iRiot-WebApp/bin/python + +# -*- coding: utf-8 -*- +import re +import sys + +from pip import main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/bin/pip2 b/bin/pip2 new file mode 100755 index 0000000..c7699c2 --- /dev/null +++ b/bin/pip2 @@ -0,0 +1,11 @@ +#!/Users/jameswindsor/Documents/Capstone/iRiot-WebApp/bin/python + +# -*- coding: utf-8 -*- +import re +import sys + +from pip import main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/bin/pip2.7 b/bin/pip2.7 new file mode 100755 index 0000000..c7699c2 --- /dev/null +++ b/bin/pip2.7 @@ -0,0 +1,11 @@ +#!/Users/jameswindsor/Documents/Capstone/iRiot-WebApp/bin/python + +# -*- coding: utf-8 -*- +import re +import sys + +from pip import main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/bin/python b/bin/python new file mode 100755 index 0000000000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XY29PT$tlYOGv(Yh0ePQ`{ zxtoWP&H?xs&Yp1qe#BC9$_lr18v`@OA?~3-Y~I{$q>5SNlx3QfBd(k`&r)o4#iE&? zpuD9f+Z5X%7ERmCpJ^ZI?>)M!v-2^iRmd=MX~Q|4G;#i(;^RNYEsg)0e*W+^Zkebv zNS{aApG-C408(uV;j|EcJR?N~U8lpxbCU^5-G{wCKH=k^^zp+!-t_U@d*SmK@4)kM z?~MC?@SyJX>@=>03g+TaYTQU#Rso0e-o&g-iRL&Nn$gqXa<*Cp{i-RqQWMr^-F`H_ZM7$o*V7~`TNEB^yU;S`g8lc3=!8~Co6*} z`~7+QJ&skWmETq1UPIIwXSX*H$RtmuAB}_7;=gkE?m2{^V}zB5HLFA+e--7dThcA< z70A5ju&@m_l>g~Hhl^+*c;(>D(M3_NbLEzwf~L6%qsl0YN|z5CjB) z4;q1yp3=?4=umHId1tk96TRsvz1CCi`a%d?`N1PBN{f{nG?cq?j@VcFd*zy=IqTHp zy=vCGR?XlGsR4;(Fn^5JvF)qWe=oz*M}+)Z+Y|xc|JW2khK^^S9@o V4g2K9I(X;BAK?7}^?t4e{2Rf%y59f* literal 0 HcmV?d00001 diff --git a/bin/python-config b/bin/python-config new file mode 100755 index 0000000..43486df --- /dev/null +++ b/bin/python-config @@ -0,0 +1,78 @@ +#!/Users/jameswindsor/Documents/Capstone/iRiot-WebApp/bin/python + +import sys +import getopt +import sysconfig + +valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags', + 'ldflags', 'help'] + +if sys.version_info >= (3, 2): + valid_opts.insert(-1, 'extension-suffix') + valid_opts.append('abiflags') +if sys.version_info >= (3, 3): + valid_opts.append('configdir') + + +def exit_with_usage(code=1): + sys.stderr.write("Usage: {0} [{1}]\n".format( + sys.argv[0], '|'.join('--'+opt for opt in valid_opts))) + sys.exit(code) + +try: + opts, args = getopt.getopt(sys.argv[1:], '', valid_opts) +except getopt.error: + exit_with_usage() + +if not opts: + exit_with_usage() + +pyver = sysconfig.get_config_var('VERSION') +getvar = sysconfig.get_config_var + +opt_flags = [flag for (flag, val) in opts] + +if '--help' in opt_flags: + exit_with_usage(code=0) + +for opt in opt_flags: + if opt == '--prefix': + print(sysconfig.get_config_var('prefix')) + + elif opt == '--exec-prefix': + print(sysconfig.get_config_var('exec_prefix')) + + elif opt in ('--includes', '--cflags'): + flags = ['-I' + sysconfig.get_path('include'), + '-I' + sysconfig.get_path('platinclude')] + if opt == '--cflags': + flags.extend(getvar('CFLAGS').split()) + print(' '.join(flags)) + + elif opt in ('--libs', '--ldflags'): + abiflags = getattr(sys, 'abiflags', '') + libs = ['-lpython' + pyver + abiflags] + libs += getvar('LIBS').split() + libs += getvar('SYSLIBS').split() + # add the prefix/lib/pythonX.Y/config dir, but only if there is no + # shared library in prefix/lib/. + if opt == '--ldflags': + if not getvar('Py_ENABLE_SHARED'): + libs.insert(0, '-L' + getvar('LIBPL')) + if not getvar('PYTHONFRAMEWORK'): + libs.extend(getvar('LINKFORSHARED').split()) + print(' '.join(libs)) + + elif opt == '--extension-suffix': + ext_suffix = sysconfig.get_config_var('EXT_SUFFIX') + if ext_suffix is None: + ext_suffix = sysconfig.get_config_var('SO') + print(ext_suffix) + + elif opt == '--abiflags': + if not getattr(sys, 'abiflags', None): + exit_with_usage() + print(sys.abiflags) + + elif opt == '--configdir': + print(sysconfig.get_config_var('LIBPL')) diff --git a/bin/python2 b/bin/python2 new file mode 120000 index 0000000..d8654aa --- /dev/null +++ b/bin/python2 @@ -0,0 +1 @@ +python \ No newline at end of file diff --git a/bin/python2.7 b/bin/python2.7 new file mode 120000 index 0000000..d8654aa --- /dev/null +++ b/bin/python2.7 @@ -0,0 +1 @@ +python \ No newline at end of file diff --git a/bin/wheel b/bin/wheel new file mode 100755 index 0000000..511c9b8 --- /dev/null +++ b/bin/wheel @@ -0,0 +1,11 @@ +#!/Users/jameswindsor/Documents/Capstone/iRiot-WebApp/bin/python + +# -*- coding: utf-8 -*- +import re +import sys + +from wheel.tool import main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/db.sqlite3 b/db.sqlite3 new file mode 100644 index 0000000000000000000000000000000000000000..d013580e34b0b276634cdcfa933d8ad2db8484ee GIT binary patch literal 131072 zcmeI5TWlOzTF1NGH{ZI;vE!+kO)_qG#*;LTJi-d^w0gcdTkhm8hD6tZi(y<>LLryS zC6a&ixB0n5zIem(D!k4N`?}-M|C?%%E7@y%YQmv>yY_(^|uxBMbcWb3H z8b@9G+jt>lNA~KVpSzi0>M6@!9q5))E~u4?S}Ing88I%d3vod+v@Lqj0biR?Lx;`4 zHX-UxD_`BGubj{gyu6ozO|`2{?TG^!XzJL{KwZ7&?1ce8mrF3a{=IB7>?vSO*jGo@lxDORQG&X%IPJQ*Zdi5XvWG^0gcB29W-jK^dPtEE5KnWrTr?Wys= zb`zeNQdTL-1tlEWJst3K$t3e+wkogZ6|047jn>M$(m5tz*uI>6XFg@``dU>`h@?7( zRKhW*ltbyob5OYBacX1rD@N#ExlD*Q%j^??e}vN6U>uSEqJtAZiAxV_jf{}M}NTp^p@yIyshk- zY@^sueyZ2cjf^lKo^396qZ0IXDCnU|xFuIAk4j}yGq&Y&W>YSo7oszfM)e@B%*&Ok zlrQDfVmOqQt4dWZDE4@@B2{X{eYCQKL+hnd-X2Rswc6g$FY=c9kpA={xooIql1*nx z(~vzSl!C10t&+rJR!$^6HMA;kY_uCmV&qI!-B#M8Xo;o!CAFv!L~X^72z@>-HNv>G zPN?!QPsW83aTJj!;~V7P&9;^b^cC;KU9I6>(NYmos8`Ie12|xys3A# zimKUV-TEAivtp0H!kEoM!o1~av=8;{eYuz`H9f)%lW1Svcpx>JsKDEDi_~)-KPQUJ zZcX!zgEEI8Z!-`Fi6em0WG5+!ytO6e<#ol@2egV5$kVq|bi^fg`?%|)dp2jirPxNf z-DHa8slVa%a~YAT>n-1*xKhJ7DL%cP6|>^HHW+ab^%(4$hxQJFopkE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q63Ng0T2KI5C8!X009sH0T2KI5co0?IO9(CM0sI)Lf|L(M2HtI PksmQ}QB2H4`RV@yv2a0U literal 0 HcmV?d00001 diff --git a/include/python2.7 b/include/python2.7 new file mode 120000 index 0000000..3fe034f --- /dev/null +++ b/include/python2.7 @@ -0,0 +1 @@ +/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 \ No newline at end of file diff --git a/iriot/__init__.py b/iriot/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/iriot/settings.py b/iriot/settings.py new file mode 100644 index 0000000..e7d6bbb --- /dev/null +++ b/iriot/settings.py @@ -0,0 +1,137 @@ +""" +Django settings for iriot project on Heroku. Fore more info, see: +https://github.com/heroku/heroku-django-template + +For more information on this file, see +https://docs.djangoproject.com/en/1.9/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/1.9/ref/settings/ +""" + +import os +import dj_database_url + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__)) + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = "9lr-ah*val3=)gm3xt%g$szzchczr6w0%z8uvfsp(%#8lt5jnm" + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + # Disable Django's own staticfiles handling in favour of WhiteNoise, for + # greater consistency between gunicorn and `./manage.py runserver`. See: + # http://whitenoise.evans.io/en/stable/django.html#using-whitenoise-in-development + 'whitenoise.runserver_nostatic', + 'django.contrib.staticfiles', + 'accounts', + 'master' +] + +MIDDLEWARE_CLASSES = [ + 'django.middleware.security.SecurityMiddleware', + 'whitenoise.middleware.WhiteNoiseMiddleware', + '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 = 'iriot.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + 'debug': DEBUG, + }, + }, +] + +WSGI_APPLICATION = 'iriot.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/1.9/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + } +} + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + +# Internationalization +# https://docs.djangoproject.com/en/1.9/topics/i18n/ + +LANGUAGE_CODE = 'en-us' +TIME_ZONE = 'UTC' +USE_I18N = True +USE_L10N = True +USE_TZ = True + +# Update database configuration with $DATABASE_URL. +db_from_env = dj_database_url.config(conn_max_age=500) +DATABASES['default'].update(db_from_env) + +# Honor the 'X-Forwarded-Proto' header for request.is_secure() +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') + +# Allow all host headers +ALLOWED_HOSTS = ['*'] + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/1.9/howto/static-files/ + +STATIC_ROOT = os.path.join(PROJECT_ROOT, 'staticfiles') +STATIC_URL = '/static/' + +# Extra places for collectstatic to find static files. +STATICFILES_DIRS = [ + os.path.join(PROJECT_ROOT, 'static'), +] + +# Simplified static file serving. +# https://warehouse.python.org/project/whitenoise/ +STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage' diff --git a/iriot/static/humans.txt b/iriot/static/humans.txt new file mode 100644 index 0000000..e69de29 diff --git a/iriot/urls.py b/iriot/urls.py new file mode 100644 index 0000000..b0f068f --- /dev/null +++ b/iriot/urls.py @@ -0,0 +1,23 @@ +"""iriot URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/1.9/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.conf.urls import url, include + 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) +""" +from django.conf.urls import include, url +from django.contrib import admin + +urlpatterns = [ + url(r'^admin/', admin.site.urls), + url(r'^accounts/', include('accounts.urls', namespace="accounts")), + url(r'^$', include('master.urls', namespace="master")), +] diff --git a/iriot/wsgi.py b/iriot/wsgi.py new file mode 100644 index 0000000..4f199d8 --- /dev/null +++ b/iriot/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for iriot 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.9/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "iriot.settings") + +application = get_wsgi_application() diff --git a/manage.py b/manage.py new file mode 100644 index 0000000..92c897c --- /dev/null +++ b/manage.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "iriot.settings") + + from django.core.management import execute_from_command_line + + execute_from_command_line(sys.argv) diff --git a/master/__init__.py b/master/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/master/admin.py b/master/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/master/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/master/migrations/__init__.py b/master/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/master/models.py b/master/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/master/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/master/templates/master/base.html b/master/templates/master/base.html new file mode 100644 index 0000000..5c0c3e9 --- /dev/null +++ b/master/templates/master/base.html @@ -0,0 +1,98 @@ + + + + + + + + + + SecureShare | {% block title %}This page{% endblock %} + + + + + + + {% block head_block %}{% endblock %} + + + + + + +
+
+ +
+
+ {% if messages %} +
+ {% for message in messages %} +
+ + {{ message }} +
+ {% endfor %} +
+ {% endif %} + {% block body_block %}{% endblock %} +
+
+
+
+ + + + + + + + + diff --git a/master/templates/master/index.html b/master/templates/master/index.html new file mode 100644 index 0000000..ebadbf7 --- /dev/null +++ b/master/templates/master/index.html @@ -0,0 +1,21 @@ +{% extends "master/base.html" %} +{% block body_block %} +{% if user.is_authenticated %} + + +

Hello {{ user.first_name }}. Welcome to iRiot!

+ + +{% else %} +
+

Welcome to iRiot!

+

The internet of things. simplified.

+

Register Now

+
+

In traditional IoT systems, every device communicates via a WiFi connection, placing a significant load on your local network and creating an unnecessarily large cyber attack surface. Our solution is different.

+

Old Dogs, New Tricks.

+

Why should creating a “smart home” involve buying brand-new, “smart” devices? Many TVs, light switches, fans, AC units, and more already contain IR sensors. By placing one of our hubs on the ceiling of every room in your home, you will be able to control all of these devices from one, simple web app.

+

Security is Key.

+

Amazon provides our project with a robust, secure Internet of Things backbone. Loaded with air-tight features, you should never have to worry about unwanted intruders in your network.

+{% endif %} +{% endblock %} diff --git a/master/tests.py b/master/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/master/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/master/urls.py b/master/urls.py new file mode 100644 index 0000000..c650e6d --- /dev/null +++ b/master/urls.py @@ -0,0 +1,8 @@ +from django.conf.urls import url + +from . import views + +urlpatterns = [ + url(r'^$', views.index, name='index'), + +] diff --git a/master/views.py b/master/views.py new file mode 100644 index 0000000..acc535a --- /dev/null +++ b/master/views.py @@ -0,0 +1,6 @@ +from django.shortcuts import render + +# Create your views here. + +def index(request): + return render(request, 'master/index.html', {}) diff --git a/pip-selfcheck.json b/pip-selfcheck.json new file mode 100644 index 0000000..0e8dda6 --- /dev/null +++ b/pip-selfcheck.json @@ -0,0 +1 @@ +{"last_check":"2016-09-21T13:08:57Z","pypi_version":"8.1.2"} \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..4421a41 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +dj-database-url==0.4.1 +Django==1.9.8 +gunicorn==19.6.0 +psycopg2==2.6.2 +whitenoise==3.2 diff --git a/runtime.txt b/runtime.txt new file mode 100644 index 0000000..fdf7966 --- /dev/null +++ b/runtime.txt @@ -0,0 +1 @@ +python-2.7.12