Commit 797f2a80 authored by David Seaward's avatar David Seaward

new debug options

parent 11ec259e
...@@ -6,6 +6,8 @@ SITE_TITLE = Title ...@@ -6,6 +6,8 @@ SITE_TITLE = Title
SITE_BYLINE = Example byline SITE_BYLINE = Example byline
SITE_DOMAIN = example.com SITE_DOMAIN = example.com
DEBUG = True DEBUG = True
DEBUG_ALL_ACCESS = True
DEBUG_CHANGE_PASSWORD = False
DEBUG_SKIP_ACTIVATION_COMMAND = True DEBUG_SKIP_ACTIVATION_COMMAND = True
ALLOWED_HOSTS = localhost ALLOWED_HOSTS = localhost
STATIC_ROOT = /var/opt/purist/account/static STATIC_ROOT = /var/opt/purist/account/static
......
# -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-03-10 10:34
from __future__ import unicode_literals
import django.contrib.auth.models
import django.contrib.auth.validators
import django.utils.timezone
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0008_alter_user_username_max_length'),
]
operations = [
migrations.CreateModel(
name='User',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('password', models.CharField(max_length=128, verbose_name='password')),
('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
('is_superuser', models.BooleanField(default=False,
help_text='Designates that this user has all permissions without explicitly assigning them.',
verbose_name='superuser status')),
('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'},
help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
max_length=150, unique=True,
validators=[django.contrib.auth.validators.UnicodeUsernameValidator()],
verbose_name='username')),
('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')),
('last_name', models.CharField(blank=True, max_length=30, verbose_name='last name')),
('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
('is_staff', models.BooleanField(default=False,
help_text='Designates whether the user can log into this admin site.',
verbose_name='staff status')),
('is_active', models.BooleanField(default=True,
help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
verbose_name='active')),
('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
('groups', models.ManyToManyField(blank=True,
help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.',
related_name='user_set', related_query_name='user', to='auth.Group',
verbose_name='groups')),
('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.',
related_name='user_set', related_query_name='user',
to='auth.Permission', verbose_name='user permissions')),
],
options={
'verbose_name': 'user',
'verbose_name_plural': 'users',
'abstract': False,
},
managers=[
('objects', django.contrib.auth.models.UserManager()),
],
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-03-10 13:40
from __future__ import unicode_literals
from django.db import migrations
import ldapregister.models
class Migration(migrations.Migration):
dependencies = [
('ldapregister', '0001_initial'),
]
operations = [
migrations.AlterModelManagers(
name='user',
managers=[
('objects', ldapregister.models.UserManager()),
],
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-03-17 12:51
from __future__ import unicode_literals
from django.db import migrations, models
import ldapdb.models.fields
class Migration(migrations.Migration):
dependencies = [
('ldapregister', '0002_auto_20170310_1340'),
]
operations = [
migrations.CreateModel(
name='LdapGroup',
fields=[
('dn', models.CharField(max_length=200, primary_key=True, serialize=False)),
# ('cn', ldapdb.models.fields.CharField(db_column='cn', max_length=200, primary_key=True, serialize=False)),
('cn', ldapdb.models.fields.CharField(db_column='cn', max_length=200, serialize=False)),
('description', ldapdb.models.fields.CharField(db_column='description', max_length=200)),
('members', ldapdb.models.fields.ListField(db_column='member')),
],
options={
'verbose_name_plural': 'LDAP groups',
'verbose_name': 'LDAP group',
},
),
migrations.CreateModel(
name='LdapPerson',
fields=[
('dn', models.CharField(max_length=200, primary_key=True, serialize=False)),
# ('uid', ldapdb.models.fields.CharField(db_column='uid', max_length=200, primary_key=True, serialize=False)),
('uid', ldapdb.models.fields.CharField(db_column='uid', max_length=200, serialize=False)),
('cn', ldapdb.models.fields.CharField(db_column='cn', max_length=200)),
('description', ldapdb.models.fields.CharField(db_column='description', max_length=200)),
('sn', ldapdb.models.fields.CharField(db_column='sn', max_length=200)),
],
options={
'verbose_name_plural': 'LDAP people',
'verbose_name': 'LDAP person',
},
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-07-19 14:16
from __future__ import unicode_literals
import django.db.models.deletion
import django.utils.timezone
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Credit',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('time_credit', models.DecimalField(decimal_places=2, default=0, max_digits=6)),
('volume_credit', models.DecimalField(decimal_places=2, default=0, max_digits=6)),
('old_expiry_date', models.DateTimeField(default=None, blank=True, null=True)),
('old_time_total',
models.DecimalField(blank=True, decimal_places=2, default=None, max_digits=6, null=True)),
('old_volume_total',
models.DecimalField(blank=True, decimal_places=2, default=None, max_digits=6, null=True)),
('new_expiry_date', models.DateTimeField(blank=True, default=None, null=True)),
('new_time_total',
models.DecimalField(blank=True, decimal_places=2, default=None, max_digits=6, null=True)),
('new_volume_total',
models.DecimalField(blank=True, decimal_places=2, default=None, max_digits=6, null=True)),
('created_date', models.DateTimeField(default=django.utils.timezone.now)),
('updated_date', models.DateTimeField(default=django.utils.timezone.now)),
],
),
migrations.CreateModel(
name='ExternalBundle',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('parser', models.CharField(choices=[('WOO1', 'WooCommerce v1')], max_length=30)),
('external_key', models.CharField(max_length=30)),
('service',
models.CharField(choices=[('TUNNEL', 'Tunnel'), ('COMMUNICATION', 'Communication')], max_length=30)),
('time_credit', models.DecimalField(decimal_places=2, default=0, max_digits=6)),
('volume_credit', models.DecimalField(decimal_places=2, default=0, max_digits=6)),
('created_date', models.DateTimeField(default=django.utils.timezone.now)),
('updated_date', models.DateTimeField(default=django.utils.timezone.now)),
],
),
migrations.CreateModel(
name='ExternalCredit',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('parser', models.CharField(choices=[('WOO1', 'WooCommerce v1')], max_length=30)),
('external_key', models.CharField(max_length=30)),
('label', models.CharField(max_length=30)),
('bundle_key', models.CharField(max_length=30)),
('bundle_label', models.CharField(max_length=30)),
('quantity', models.DecimalField(decimal_places=2, default=1, max_digits=6)),
('account_name', models.CharField(default='', max_length=30)),
('additional_data', models.TextField(default='')),
('is_converted', models.BooleanField(default=False)),
('created_date', models.DateTimeField(default=django.utils.timezone.now)),
('updated_date', models.DateTimeField(default=django.utils.timezone.now)),
],
),
migrations.CreateModel(
name='Limit',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('service',
models.CharField(choices=[('TUNNEL', 'Tunnel'), ('COMMUNICATION', 'Communication')], max_length=30)),
('expiry_date', models.DateTimeField(blank=True, default=None, null=True)),
('volume_total', models.DecimalField(decimal_places=2, max_digits=6)),
('time_total', models.DecimalField(decimal_places=2, max_digits=6)),
('is_active', models.BooleanField()),
('created_date', models.DateTimeField(default=django.utils.timezone.now)),
('updated_date', models.DateTimeField(default=django.utils.timezone.now)),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
migrations.AddField(
model_name='credit',
name='external',
field=models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE,
to='limitmonitor.ExternalCredit'),
),
migrations.AddField(
model_name='credit',
name='limit',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='limitmonitor.Limit'),
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-08-15 11:59
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('limitmonitor', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='externalcredit',
name='error_message',
field=models.TextField(default=''),
),
migrations.AlterField(
model_name='limit',
name='is_active',
field=models.BooleanField(default=False),
),
migrations.AlterField(
model_name='limit',
name='time_total',
field=models.DecimalField(decimal_places=2, default=0, max_digits=6),
),
migrations.AlterField(
model_name='limit',
name='volume_total',
field=models.DecimalField(decimal_places=2, default=0, max_digits=6),
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-08-28 06:15
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('limitmonitor', '0002_auto_20170815_1159'),
]
operations = [
migrations.AddField(
model_name='limit',
name='renewal_date',
field=models.DateTimeField(blank=True, default=None, null=True),
),
migrations.AlterField(
model_name='externalbundle',
name='parser',
field=models.CharField(choices=[('WOO1', 'WooCommerce v1'), ('WOOSUB1', 'WooCommerce Subscription v1')], max_length=30),
),
migrations.AlterField(
model_name='externalcredit',
name='parser',
field=models.CharField(choices=[('WOO1', 'WooCommerce v1'), ('WOOSUB1', 'WooCommerce Subscription v1')], max_length=30),
),
]
import logging
from django.contrib.auth.password_validation import MinimumLengthValidator as BaseValidator
from django_auth_ldap.backend import LDAPBackend as BaseBackend
from django.utils.translation import ungettext
log = logging.getLogger(__name__)
class Backend(BaseBackend):
def __init__(self, *args, **kwargs):
super(Backend, self).__init__(*args, **kwargs)
def ldap_to_django_username(self, username):
return username.lower().replace(".", "")
class Validator(BaseValidator):
def __init__(self, *args, **kwargs):
super(Validator, self).__init__(*args, **kwargs)
def get_help_text(self):
return ungettext(
"A good passphrase is made of at least three long words.",
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment