Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update proposal.md #1

Open
wants to merge 145 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
145 commits
Select commit Hold shift + click to select a range
4fb7a02
Update proposal.md
Sep 20, 2018
874702f
Homepage
Sep 20, 2018
c781ca5
Update proposal.md
Sep 21, 2018
2ba2bf6
Navigation bar
Sep 21, 2018
c62bdd1
Merge branch 'master' of https://github.com/jhui04/326_project
Sep 21, 2018
8d9dc69
Event Page
erica-z Sep 22, 2018
f1ec8af
HomePage fix
Sep 23, 2018
76d128c
Done
Sep 25, 2018
057d173
Update proposal.md
Sep 27, 2018
a1d69ff
added map page
Sep 27, 2018
16b8c1d
Added index.html
Sep 27, 2018
2c6011c
Deleted #index.html#
Sep 27, 2018
b276114
Deleted index.html~
Sep 27, 2018
1e05005
Added brief explanation at top of tile.
Sep 27, 2018
4e13abf
Merge branch 'master' of https://github.com/jhui04/326_project
Sep 27, 2018
41bcc58
Updated backgrounds to fit main page.
Sep 27, 2018
da823ac
Made an About page
Sep 27, 2018
e59e0cb
Update proposal.md
Sep 27, 2018
f1c58ca
Add files via upload
Sep 27, 2018
04784e2
Added mock data to home, event, and about pages, and created the prof…
Sep 27, 2018
916be4b
Merge branch 'master' of https://github.com/jhui04/326_project
Sep 27, 2018
d679bdd
Comitted
Sep 27, 2018
925deb4
Merge branch 'master' of https://github.com/jhui04/326_project
Sep 28, 2018
7bcee66
added django template
Sep 28, 2018
f50b98a
Merge branch 'master' of https://github.com/jhui04/326_project
Sep 28, 2018
58366ea
added urls.py for Catch app with redirects
Oct 2, 2018
a3bc116
Changed the homePage
Oct 2, 2018
b25cdcb
Merge branch 'master' of https://github.com/jhui04/326_project
Oct 2, 2018
c3603e3
removed icon header
Oct 4, 2018
b5c0b6b
superuser created
Oct 6, 2018
3557266
Merge branch 'master' of https://github.com/jhui04/326_project
Oct 6, 2018
dd58747
Added simple event model and url mapping for navbar
Oct 8, 2018
64f00c6
Made a forumpage, homepage editing now
Oct 8, 2018
35b7dde
Merge branch 'master' of https://github.com/jhui04/326_project
Oct 8, 2018
ac51d33
registered Event model in admin.py
Oct 8, 2018
51b1140
Merge branch 'master' of https://github.com/jhui04/326_project
Oct 8, 2018
441505e
Adding events function
Oct 8, 2018
68a5988
submission page working, needs to redirect afterwards
Oct 8, 2018
0dba388
Create proposal.md
Oct 16, 2018
89b9728
Create imgs
Oct 16, 2018
07ebbb1
Add files via upload
Oct 16, 2018
6d22e5b
reuploaded the deleted imgs folder
Oct 16, 2018
c5930a0
home page edit on aquiring events
Oct 17, 2018
8943608
added pet model and submission form
Oct 18, 2018
6879f4c
fixed submit button redirect.
Oct 18, 2018
b4d75e3
Project2DataModel
erica-z Oct 20, 2018
5a8b240
qweqwe
erica-z Oct 25, 2018
53b2028
pet model
erica-z Oct 25, 2018
b1cc3e9
init.sh
erica-z Oct 25, 2018
6af6bc3
updated models.py
erica-z Oct 25, 2018
b09ba7b
updated models.py
erica-z Oct 25, 2018
bc7e603
updated models.py
erica-z Oct 25, 2018
59de7fc
added templates and faker for petuser
Oct 26, 2018
b8e81cf
finished most of init.py, just needs cleaning up
Oct 26, 2018
8b1bc4b
Putting back forms i deleted!!
erica-z Oct 27, 2018
e3b0d7c
Putting back style.css
erica-z Oct 27, 2018
63bf056
Revert "Putting back style.css"
erica-z Oct 27, 2018
d5b2d4a
cleaned up CSS and init.py
Oct 28, 2018
279d79f
Merge branch 'master' of https://github.com/jhui04/326_project
erica-z Oct 28, 2018
9facf27
Revert "Merge branch 'master' of https://github.com/jhui04/326_project"
erica-z Oct 28, 2018
8ac102e
edited init.sh and updated the data model diagram
erica-z Oct 28, 2018
998d90b
updated data model diagram
erica-z Oct 30, 2018
47f968f
created images[]
erica-z Oct 30, 2018
9340dcf
deleted unnecessary imports
erica-z Oct 30, 2018
d19ecf6
images for mock data
erica-z Oct 30, 2018
b79e058
images weren't showing up, added images to generation and templating
Oct 31, 2018
eecfcfb
readded the event and pet form
Nov 1, 2018
bfa4575
individual write up
erica-z Nov 2, 2018
8cc25b0
updated diagram
erica-z Nov 3, 2018
9689f9c
Added indivisual writeup / team writeup
Nov 5, 2018
38a8c7f
indiv. write up - added link to git hub
erica-z Nov 6, 2018
afb4d7f
Merge branch 'master' of https://github.com/jhui04/326_project
erica-z Nov 6, 2018
3ed2dd6
Create submission_02.md
Nov 6, 2018
f219570
Add files via upload
Nov 6, 2018
966769d
Update submission_02.md
Nov 6, 2018
d4e0aa8
Update submission_02.md
Nov 6, 2018
0e230d7
Update submission_02.md
Nov 6, 2018
654403b
changed string representations of PetUser and Pet
Nov 6, 2018
89c7a88
Merge branch 'master' of https://github.com/jhui04/326_project
Nov 6, 2018
8eabdf2
Create Justin_Hui_submission_02.md
Nov 6, 2018
94dbd26
Parth-Nagraj-Indivisual-Write-Up
pdnagraj Nov 6, 2018
ee66327
Rename Parth-Nagraj-Individual-Writeup to Parth-Nagraj-Individual-Wri…
pdnagraj Nov 6, 2018
c5e987b
Delete Parth Nagraj - Indivisual Write-Up.docx
pdnagraj Nov 6, 2018
f172c18
Added individual submission writeup.
Nov 6, 2018
e6d24ea
login.html --directly from lecture slides
erica-z Nov 13, 2018
905ed96
added path to login.html and moved into Catch directory
Nov 13, 2018
ff32a77
added nav bar and style in the login.html
erica-z Nov 19, 2018
d68fdf9
added log in redirect in settings
erica-z Nov 19, 2018
8e5ee98
added form to change email
erica-z Nov 19, 2018
85c0c59
Added comments about where the problem could be
erica-z Nov 19, 2018
e491584
added user sign up form and added a sign up button in homepage
erica-z Nov 22, 2018
b6416bc
extended django's user model to our PetUser; created 4 buttons on hom…
erica-z Nov 22, 2018
dab34ec
adjusted display of homepage buttons depending on if the user's logge…
erica-z Nov 22, 2018
5240ecc
login/logout and authentication required to view navbar
Nov 26, 2018
3e79d95
profile, pets, and events are displayed based on logged in user, chan…
Nov 27, 2018
c2bafbb
edit homepage, events, and profile to display different data dependin…
erica-z Nov 27, 2018
0af01d9
added groups and permissions, all users generated from init.py are in it
Nov 27, 2018
5a04f13
Create submission_03.md
Nov 27, 2018
353a3ac
Update submission_03.md
Nov 27, 2018
c68fe54
Create Justin_Hui_submission_03.md
Nov 27, 2018
79decec
Update Justin_Hui_submission_03.md
Nov 27, 2018
c54860f
Revert "edit homepage, events, and profile to display different data …
erica-z Nov 27, 2018
ab6e8c1
Merge branch 'master' of https://github.com/jhui04/326_project
erica-z Nov 27, 2018
fdbb044
edited navbar.html so users that are not logged in can see the websit…
erica-z Nov 27, 2018
2d6bbb6
implemented add pet
erica-z Nov 27, 2018
27849d4
Update submission_03.md
Nov 27, 2018
f4f4869
Update submission_03.md
Nov 27, 2018
3086538
individual write up project 3
erica-z Nov 27, 2018
beca2b6
Merge branch 'master' of https://github.com/jhui04/326_project
erica-z Nov 27, 2018
06a7a36
Cleaned up the docs, Added sumbision video, added my indivisual submi…
Nov 27, 2018
819f1de
Personal submission.
Nov 27, 2018
762d1a8
update to navbar.html so that events/pets tab are clickable when user…
erica-z Dec 10, 2018
e56d301
added markers for each event that display information when clicked. e…
Dec 11, 2018
5daa371
updated events page to display all events in the database
erica-z Dec 11, 2018
55b2853
added "add pet" button to pets page
erica-z Dec 11, 2018
554f410
homePage displays the events the user is hosting
Dec 11, 2018
2144d60
homePage displays the events the user is hosting
Dec 11, 2018
f7cafb7
added pets have randomly chosen stock images
Dec 11, 2018
4846708
cleaned urls
erica-z Dec 11, 2018
136af6b
Revert "cleaned urls"
erica-z Dec 11, 2018
86e8c02
Merge branch 'master' of https://github.com/jhui04/326_project
erica-z Dec 11, 2018
c3ca51d
Revert "Merge branch 'master' of https://github.com/jhui04/326_project"
erica-z Dec 11, 2018
9954c34
Button fix.
baileyboone Dec 11, 2018
e692eda
reverting some changes to f7cafb7
Dec 11, 2018
24bdbd0
Update .DS_Store
erica-z Dec 11, 2018
a353346
AnonymousUser PetPage fix
baileyboone Dec 11, 2018
b06d064
Revert "reverting some changes to f7cafb7"
baileyboone Dec 12, 2018
2bb916f
reverted the revert from before and fixed the navbar when logged out …
baileyboone Dec 12, 2018
f049f08
removed loginrequiredmixin
baileyboone Dec 12, 2018
ff434f0
no more sign ups
baileyboone Dec 12, 2018
9d6cb06
add events on eventpage
baileyboone Dec 12, 2018
5f539cd
added final write up and the slides
erica-z Dec 12, 2018
f8816dd
deleted some tables, added back maps
Dec 12, 2018
b1e459b
Merge branch 'master' of https://github.com/jhui04/326_project
Dec 12, 2018
f05a4fd
style tweaks
baileyboone Dec 12, 2018
e539fbf
Merge branch 'master' of https://github.com/jhui04/326_project
baileyboone Dec 12, 2018
7a23921
more style update
baileyboone Dec 12, 2018
618222f
navbar opacity
baileyboone Dec 12, 2018
67f4c4b
Added Final writeup and made it md
Dec 12, 2018
7bf67f3
Final_Write_Up
pdnagraj Dec 12, 2018
57e5ced
Delete Final_Write_Up
pdnagraj Dec 12, 2018
3018d50
Final Write Up
pdnagraj Dec 12, 2018
0245c43
Delete final_write_up.md
pdnagraj Dec 12, 2018
a36d5ff
Presentation Update
Dec 12, 2018
ae78a75
Merge branch 'master' of https://github.com/jhui04/326_project
Dec 12, 2018
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
Binary file added .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .vagrant/machines/default/virtualbox/action_provision
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.5:adc499ae-26c1-404b-8001-6f9bf26939c0
1 change: 1 addition & 0 deletions .vagrant/machines/default/virtualbox/action_set_name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1538013461
1 change: 1 addition & 0 deletions .vagrant/machines/default/virtualbox/box_meta
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name":"bento/ubuntu-18.04","version":"201803.24.0","provider":"virtualbox","directory":"boxes/bento-VAGRANTSLASH-ubuntu-18.04/201803.24.0/virtualbox"}
1 change: 1 addition & 0 deletions .vagrant/machines/default/virtualbox/creator_uid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
501
1 change: 1 addition & 0 deletions .vagrant/machines/default/virtualbox/id
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
adc499ae-26c1-404b-8001-6f9bf26939c0
1 change: 1 addition & 0 deletions .vagrant/machines/default/virtualbox/index_uuid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9a7a32abc5c34c88a2e21673d4ff069c
27 changes: 27 additions & 0 deletions .vagrant/machines/default/virtualbox/private_key
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEpQIBAAKCAQEArdGBIz2jXBLMuG0Cvn7EJ3Pols2QRXJWX+sOsl8fggAYyytk
aD06wUgSI86aht0SsjdQwlgKdCK2nBfON/11KEYIGN4gVg569Ucmu6E3HgY2Q7YM
n/uKADxKTy727tBa7V3ZzCuVRVztvBxA66jbWBG82oJUcq3xKVz/4KnXwVRLdLxq
gFn/weHY+ukExd7uhIsvObNCyLgEGELMPQwS+gquyBYLUSfKiKFlk6orHnffdbRY
O8UglkcOV5bU1U2Y5cFOK9O6qV2yGL5Dpnql8Avc0Jv+zvhkpG+IDdSjzq5T7Nqk
sfsAAALvD4VL0Kvm/gKE5/uQyUgEczz3uX0+yQIDAQABAoIBAFc3LEj2gKWOeVKA
wEO9b8csDaS9eIqgGF8Ants5h6G/UrF/EF6NepHJC/ETlc3d16e8wbUCYBxt3prs
BvlpIAQZP67apfcIRQIVtYWoGvPhwhCvpB4SJOiBV/frZNPnj/hSgxpDNB8dxdwB
gUG99HF4VP5/LshsJvnOREYCctP6F9KwAhj386hSVw/qM8nvL4zw6rSbHOmtFjb1
t7vj7HLnKSsrWPRCaWrXCgWAeIhTmd/XHWdlcwyDel76Ecc7zP5WHZkkLa8vVIHP
lQokggCpWOQDvx5m5PKUxfnwVb4rGvSbUh31b+fUwpoKGXo4biBN7pGoPV8dn/oK
tYbVzgECgYEA4OAy+LFwv4claXYrLnG1np93PxtyDx01AnfczRdbY/yGIB8p8DyW
H5Sx2XXsE+n5G5XhH5S+zv/C9k5pMOJ2rK4cHxd/2DSsWfg2JyFC1DwY40AI6AMZ
s7XBetfrRcZUyMeIOuh0zNnSaZa/lZZx04OqmM3OplMkK/K2seK6zdECgYEAxeA9
LVr+M/1IIiZY2nAp/FCRlvQD2DzLWEnEo/0WKlgTRS7Zs4M2qhI7LdoWaxbhViRj
G8QuMJCEeeuPmamOLbAJ2/kg+u/HxGwbcUzvur5qyeEQ3oqN230pfDvfV8EIel0b
TkfkkeXJjeuEUnQB5bJdCbgoIL48g/XOnSSNR3kCgYEAvN/yT+mRPnz/kk27RR4i
oqFjofCmY0Vv0avlG6mDjD58VRx3uBzbJplYq8Kcz7kUDvRbCpB/lxNAqGoBdhqv
/KecXQz6xxiurj6JFWKdY+86JB0TnfOEsel2IXybUpabfawBoyC9gZVuYltIfRbI
chRDxGYQLKjmV7dbdZtutRECgYEAkoL3KTb/k2UNXOPB1HNKUx0gv4GLuzdAZO2x
4K5LFC1Ej2wiG02jUwfOs6OQB9jYHd0xWOTIQoMu48sr913Y/TEkC7EJ32NdKa3W
H+0Ub9P/49x2jiBO6t5gsjDurN4rtdZsmmiW8AQRWbixsA9fPED1rHWjmKLi0d5W
Dnp69RkCgYEAnA3NB8tkd88mmZsy5z4NmN0XkfBnWj3lhEdk1m1o7nTyjRO4Hbv0
trNIEl1M/9wrZvF3BGo9QHNHG8ciRF8wTp9I1vA4nlaUrteRbkE53o+YtywHpub7
1omouExaF3YPcVAq3G2xWBt/H9ih/7EVUQ9qYtE20CGxlyKjzbdTP4k=
-----END RSA PRIVATE KEY-----
1 change: 1 addition & 0 deletions .vagrant/machines/default/virtualbox/synced_folders
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"virtualbox":{"/vagrant":{"guestpath":"/vagrant","hostpath":"/Users/Bailey/Documents/College/Fall 2018/COMPSCI 326/repo/326_project","disabled":false,"__vagrantfile":true}}}
1 change: 1 addition & 0 deletions .vagrant/machines/default/virtualbox/vagrant_cwd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/Users/Bailey/Documents/College/Fall 2018/COMPSCI 326/repo/326_project
9 changes: 9 additions & 0 deletions .vagrant/rgloader/loader.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This file loads the proper rgloader/loader.rb file that comes packaged
# with Vagrant so that encoded files can properly run with Vagrant.

if ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"]
require File.expand_path(
"rgloader/loader", ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"])
else
raise "Encoded files can't be read outside of the Vagrant installer."
end
Binary file added CS326_project/.DS_Store
Binary file not shown.
Binary file added CS326_project/.swp
Binary file not shown.
File renamed without changes.
131 changes: 131 additions & 0 deletions CS326_project/CS326_project/settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
"""
Django settings for CS326_project project.

Generated by 'django-admin startproject' using Django 2.0.6.

For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""

import os

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '9#@jjh%93#kb15#=fs0$lxthv$x(@*el3ito5bhz%#!5)+eb+8'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []


# Application definition

INSTALLED_APPS = [
'Catch.apps.CatchConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
]

MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

ROOT_URLCONF = 'CS326_project.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',
],
},
},
]

WSGI_APPLICATION = 'CS326_project.wsgi.application'


# Database
# https://docs.djangoproject.com/en/2.0/ref/settings/#databases

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}


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

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/2.0/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/2.0/howto/static-files/

STATIC_URL = '/static/'
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')


# Log in Redirect
LOGIN_REDIRECT_URL = '/Catch/homePage'
LOGOUT_REDIRECT_URL = '/Catch/homePage'


AUTH_USER_MODEL = 'Catch.PetUser'
31 changes: 31 additions & 0 deletions CS326_project/CS326_project/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
"""CS326_project URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from django.conf.urls import include
from django.views.generic import RedirectView
from django.conf import settings
from django.conf.urls.static import static

urlpatterns = [
path('admin/', admin.site.urls),
path('Catch/', include('Catch.urls')),
path('', RedirectView.as_view(url='/Catch/')),
#path('accounts/', include('django.contrib.auth.urls')),
]

urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
16 changes: 16 additions & 0 deletions CS326_project/CS326_project/wsgi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
WSGI config for CS326_project 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/2.0/howto/deployment/wsgi/
"""

import os

from django.core.wsgi import get_wsgi_application

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "CS326_project.settings")

application = get_wsgi_application()
Binary file added CS326_project/Catch/.DS_Store
Binary file not shown.
Empty file added CS326_project/Catch/__init__.py
Empty file.
22 changes: 22 additions & 0 deletions CS326_project/Catch/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from django.contrib import admin
from .models import PetUser, Pet, Event

from django.contrib.auth import get_user_model
from django.contrib.auth.admin import UserAdmin
from .forms import PetUserCreationForm, PetUserChangeForm
from .models import PetUser


# Register your models here.
# admin.site.register(PetUser)
admin.site.register(Pet)
admin.site.register(Event)


class PetUserAdmin(UserAdmin):
add_form = PetUserCreationForm
form = PetUserChangeForm
model = PetUser
list_display = ['email', 'username', 'image']

admin.site.register(PetUser, PetUserAdmin)
5 changes: 5 additions & 0 deletions CS326_project/Catch/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.apps import AppConfig


class CatchConfig(AppConfig):
name = 'Catch'
42 changes: 42 additions & 0 deletions CS326_project/Catch/forms.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
from django import forms
from django.contrib.auth.forms import UserCreationForm, UserChangeForm
from .models import PetUser, Pet


class PetUserCreationForm(UserCreationForm):
username = forms.CharField(max_length = 30)
first_name = forms.CharField(max_length = 30)
last_name = forms.CharField(max_length = 30)
password = forms.CharField(max_length = 30)
email = forms.EmailField(max_length = 30)
location = forms.CharField(max_length = 100)
description = forms.CharField(widget=forms.Textarea)

class Meta(UserCreationForm):
model = PetUser
fields = ('username', 'first_name', 'last_name','password','email','location','description')

class PetUserChangeForm(UserChangeForm):
username = forms.CharField(max_length = 30)
first_name = forms.CharField(max_length = 30)
last_name = forms.CharField(max_length = 30)
email = forms.EmailField(max_length = 30)
location = forms.CharField(max_length = 100)
description = forms.CharField(widget=forms.Textarea)
# image = forms.ImageField(upload_to = "user_images", null = True)

class Meta(UserCreationForm):
model = PetUser
fields = ('username', 'first_name', 'last_name','email','location','description', 'image')


class PetCreationForm(forms.ModelForm):
name = forms.CharField()
pet_type = forms.CharField()
breed = forms.CharField()
description = forms.CharField()
#image = forms.ImageField()

class Meta:
model = Pet
fields = ('name', 'pet_type', 'breed','description',) # 'image')
72 changes: 72 additions & 0 deletions CS326_project/Catch/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Generated by Django 2.1.2 on 2018-11-13 18:31

import datetime
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

initial = True

dependencies = [
]

operations = [
migrations.CreateModel(
name='Event',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100)),
('location', models.CharField(blank=True, help_text='Please be as specific as possible. Include the building and room number if applicable. A kind reminder, it is best to meet in public places.', max_length=30, null=True)),
('latitude', models.FloatField(null=True)),
('longitude', models.FloatField(null=True)),
('datetime', models.DateTimeField()),
('capacity', models.IntegerField()),
('description', models.TextField(null=True)),
('image', models.ImageField(null=True, upload_to='event_images')),
('duration', models.DurationField(default=datetime.timedelta(0, 3600))),
],
),
migrations.CreateModel(
name='Pet',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=30)),
('pet_type', models.CharField(max_length=30)),
('breed', models.CharField(blank=True, max_length=30, null=True)),
('description', models.TextField(blank=True, max_length=3000, null=True)),
('image', models.ImageField(null=True, upload_to='pet_images')),
],
),
migrations.CreateModel(
name='PetUser',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('username', models.CharField(max_length=30)),
('first_name', models.CharField(max_length=30)),
('last_name', models.CharField(max_length=30)),
('password', models.CharField(max_length=30)),
('email', models.EmailField(max_length=30)),
('location', models.CharField(blank=True, help_text='Your area of residence', max_length=100, null=True)),
('description', models.CharField(blank=True, max_length=3000, null=True)),
('image', models.ImageField(null=True, upload_to='user_images')),
('hosting', models.ManyToManyField(to='Catch.Event')),
],
),
migrations.AddField(
model_name='pet',
name='owner',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='Catch.PetUser'),
),
migrations.AddField(
model_name='event',
name='host',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='Catch.PetUser'),
),
migrations.AddField(
model_name='event',
name='pet',
field=models.ManyToManyField(to='Catch.Pet'),
),
]
Loading