upgrade packages

This commit is contained in:
Aaron Gutierrez
2019-01-27 00:29:32 +00:00
parent 2dee669507
commit ac7afddaab
7 changed files with 48 additions and 43 deletions

View File

@@ -5,7 +5,7 @@ from django.db import models
class Committee(models.Model): class Committee(models.Model):
name = models.CharField(max_length=100, unique=True) name = models.CharField(max_length=100, unique=True)
chair = models.ForeignKey(User, null=True) chair = models.ForeignKey(User, null=True, on_delete=models.CASCADE)
def __str__(self): def __str__(self):
return self.name return self.name

View File

@@ -1,11 +1,11 @@
from django.conf.urls import url from django.urls import path
from committee import views from committee import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.edit, name='edit'), path('', views.edit, name='edit'),
url(r'^update/(?P<committee>\d+)/$', views.update, name='update'), path('update/<int:committee>/', views.update, name='update'),
url(r'^fincom/$', views.add_to_fincom, name='add_to_fincom'), path('fincom/', views.add_to_fincom, name='add_to_fincom'),
url(r'^fincom/delete$', views.remove_fincom, name='remove_fincom'), path('fincom/delete', views.remove_fincom, name='remove_fincom'),
url(r'^new$', views.new_committee, name='new_committee'), path('new', views.new_committee, name='new_committee'),
] ]

View File

@@ -13,16 +13,16 @@ Including another URLconf
1. Import the include() function: from django.conf.urls import url, include 1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
""" """
from django.conf.urls import include, url from django.urls import include, path
from django.contrib import admin from django.contrib import admin
from fincom import views from fincom import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.index, name='index'), path('', views.index, name='index'),
url(r'^logout$', views.user_logout, name='logout'), path('logout', views.user_logout, name='logout'),
url(r'^items/', include('items.urls')), path('items/', include('items.urls')),
url(r'^committees/', include('committee.urls')), path('committees/', include('committee.urls')),
url('', include('social_django.urls', namespace='social')), path('', include('social_django.urls', namespace='social')),
url(r'^admin/', admin.site.urls), path('admin/', admin.site.urls),
] ]

View File

@@ -3,7 +3,7 @@ from django.contrib.auth import logout
from django.template import loader from django.template import loader
def index(request): def index(request):
if request.user.is_authenticated(): if request.user.is_authenticated:
return HttpResponseRedirect('/items') return HttpResponseRedirect('/items')
template = loader.get_template('fincom/index.html') template = loader.get_template('fincom/index.html')

View File

@@ -75,7 +75,7 @@ class Item(models.Model):
desc = models.CharField(max_length=200) desc = models.CharField(max_length=200)
event = models.CharField(max_length=200) event = models.CharField(max_length=200)
committee = models.ForeignKey(Committee) committee = models.ForeignKey(Committee, on_delete=models.DO_NOTHING)
details = models.TextField() details = models.TextField()
cost = models.DecimalField(max_digits=7, decimal_places=2) cost = models.DecimalField(max_digits=7, decimal_places=2)
date_purchased = models.DateField('date purchased') date_purchased = models.DateField('date purchased')
@@ -84,7 +84,7 @@ class Item(models.Model):
variations={'thumbnail': (600, 600)} variations={'thumbnail': (600, 600)}
) )
created_by = models.ForeignKey(User, related_name='created_by') created_by = models.ForeignKey(User, related_name='created_by', on_delete=models.DO_NOTHING)
approved_by = models.ManyToManyField(User, blank=True, related_name='approved_by') approved_by = models.ManyToManyField(User, blank=True, related_name='approved_by')
date_filed = models.DateTimeField('date filed') date_filed = models.DateTimeField('date filed')
status = models.CharField(max_length=2, choices=STATUS) status = models.CharField(max_length=2, choices=STATUS)

View File

@@ -1,12 +1,12 @@
from django.conf.urls import url from django.urls import path
from items import views from items import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.list, name='list'), path(r'', views.list, name='list'),
url(r'^(?P<item_id>\d+)/$', views.details, name='details'), path('<int:item_id>/', views.details, name='details'),
url(r'^(?P<item_id>\d+)/approve$', views.approve, name='approve'), path('<int:item_id>/approve', views.approve, name='approve'),
url(r'^(?P<item_id>\d+)/reject$', views.reject, name='reject'), path('<int:item_id>/reject', views.reject, name='reject'),
url(r'^(?P<item_id>\d+)/edit$', views.edit, name='edit'), path('<int:item_id>/edit', views.edit, name='edit'),
url(r'^(?P<item_id>\d+)/delete$', views.delete, name='delete'), path('<int:item_id>/delete', views.delete, name='delete'),
url(r'^new$', views.new_form, name='new_form'), path('new', views.new_form, name='new_form'),
] ]

View File

@@ -1,31 +1,36 @@
appdirs==1.4.0 appdirs==1.4.0
boto3==1.9.28 boto3==1.9.86
botocore==1.12.28 botocore==1.12.86
Django==1.11.16 certifi==2018.11.29
chardet==3.0.4
defusedxml==0.5.0
Django==2.1.5
django-cleanup==0.4.2 django-cleanup==0.4.2
django-stdimage==2.4.1 django-stdimage==2.4.1
django-storages==1.5.2 django-storages==1.5.2
docutils==0.13.1 docutils==0.14
futures==3.0.5 futures==3.0.5
gunicorn==19.9.0 idna==2.8
jmespath==0.9.1 jmespath==0.9.3
oauthlib==2.1.0 oauthlib==3.0.1
olefile==0.44 olefile==0.44
packaging==16.8 packaging==16.8
Pillow==5.3.0 Pillow==4.0.0
pkg-resources==0.0.0
progressbar2==3.12.0 progressbar2==3.12.0
psycopg2-binary==2.7.5 psycopg2-binary==2.7.5
PyJWT==1.4.2 PyJWT==1.7.1
pyparsing==2.1.10 pyparsing==2.1.10
python-dateutil==2.6.0 python-dateutil==2.7.5
python-openid==2.2.5 python-openid==2.2.5
python-utils==2.0.1 python-utils==2.0.1
pytz==2018.5 python3-openid==3.1.0
requests==2.13.0 pytz==2018.9
requests-oauthlib==0.7.0 requests==2.21.0
s3transfer==0.1.10 requests-oauthlib==1.2.0
six==1.10.0 s3transfer==0.1.13
social-auth-app-django==2.1.0 six==1.12.0
social-auth-core==1.7.0 social-auth-app-django==3.1.0
urllib3==1.23 social-auth-core==3.0.0
urllib3==1.24.1
whitenoise==3.3.0 whitenoise==3.3.0