diff --git a/config/settings/common.py b/config/settings/common.py index 7ec5bf8..33cc399 100644 --- a/config/settings/common.py +++ b/config/settings/common.py @@ -331,6 +331,15 @@ AUTH_PASSWORD_VALIDATORS = [ }, ] + +# PASSWORD HASHING +# ------------------------------------------------------------------------------ +# Use fast password hasher so tests run faster +PASSWORD_HASHERS = ( + 'django.contrib.auth.hashers.Argon2PasswordHasher', + 'django.contrib.auth.hashers.MD5PasswordHasher', +) + # AUTHENTICATION CONFIGURATION # ------------------------------------------------------------------------------ AUTHENTICATION_BACKENDS = ( @@ -448,5 +457,7 @@ REST_FRAMEWORK = { # Deprecated need removing, sorl plugin still expects TEMPLATE_DEBUG so for now we need it just for this plugin TEMPLATE_DEBUG = False CORS_ORIGIN_WHITELIST = ( - 'matrix.org' + 'matrix.org', + 'vector.im', + 'riot.im' ) diff --git a/mhackspace/requests/migrations/0006_auto_20170906_0804.py b/mhackspace/requests/migrations/0006_auto_20170906_0804.py new file mode 100644 index 0000000..14c58db --- /dev/null +++ b/mhackspace/requests/migrations/0006_auto_20170906_0804.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.4 on 2017-09-06 08:04 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('requests', '0005_auto_20170904_1310'), + ] + + operations = [ + migrations.AddField( + model_name='userrequests', + name='title', + field=models.CharField(default='', help_text='Whats being requested ?', max_length=255), + preserve_default=False, + ), + migrations.AlterField( + model_name='userrequests', + name='description', + field=models.TextField(help_text="detail of what's being requested and where it can be purchased"), + ), + migrations.AlterField( + model_name='userrequests', + name='request_type', + field=models.IntegerField(choices=[(0, 'Equipment request'), (1, 'Educational request'), (2, 'Training request')]), + ), + ] diff --git a/mhackspace/requests/models.py b/mhackspace/requests/models.py index f46ed23..9370b5b 100644 --- a/mhackspace/requests/models.py +++ b/mhackspace/requests/models.py @@ -16,13 +16,14 @@ class UserRequests(models.Model): settings.AUTH_USER_MODEL, related_name='+' ) + title = models.CharField(max_length=255, help_text='Whats being requested ?') request_type = models.IntegerField(choices=REQUEST_TYPES, null=False) cost = models.DecimalField( max_digits=4, decimal_places=2, help_text='Leave blank, if no associated cost, or add estimated cost if not sure.' ) - description = models.TextField() + description = models.TextField(help_text="detail of what's being requested and where it can be purchased") created_date = models.DateTimeField(default=timezone.now) class Meta: diff --git a/requirements/base.txt b/requirements/base.txt index 7babc76..22a23a7 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -75,4 +75,5 @@ celery==4.1.0 django-celery-results==1.0.1 django-celery-beat==1.0.1 +argon2-cffi django-cors-headers