Commit 030be363 authored by David Haynes's avatar David Haynes 🙆

Tear it all down and rename

- Adopt go_ahead and go_back
parent 179097b6
......@@ -10,7 +10,8 @@ export GO_CREATE_SUPERUSER
GO_SECRET_KEY=$(dd if=/dev/urandom count=100 | tr -dc "A-Za-z0-9" | fold -w 60 | head -n1 2>/dev/null)
python go/manage.py makemigrations
python go/manage.py makemigrations go
python go/manage.py makemigrations go_back
python go/manage.py makemigrations go_ahead
python go/manage.py migrate
python go/manage.py runserver 0.0.0.0:8000
\ No newline at end of file
# Generated by Django 2.0.5 on 2018-05-23 23:51
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('go', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='url',
name='short',
field=models.SlugField(allow_unicode=True, max_length=20, unique=True),
),
]
# Generated by Django 2.0.5 on 2018-05-24 00:03
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('go', '0002_auto_20180523_2351'),
]
operations = [
migrations.AlterField(
model_name='url',
name='short',
field=models.CharField(max_length=20, unique=True),
),
]
# Generated by Django 2.0.5 on 2018-06-08 20:58
from django.db import migrations, models
import django.utils.timezone
import go.validators
class Migration(migrations.Migration):
dependencies = [
('go', '0003_auto_20180524_0003'),
]
operations = [
migrations.AlterField(
model_name='url',
name='date_created',
field=models.DateTimeField(default=django.utils.timezone.now, verbose_name='Go Link Creation Date'),
),
migrations.AlterField(
model_name='url',
name='destination',
field=models.URLField(default='https://go.gmu.edu', help_text='The URL to be redirected to when visiting the shortlink.', max_length=1000),
),
migrations.AlterField(
model_name='url',
name='owner',
field=models.ForeignKey(on_delete='cascade', to='go.RegisteredUser', verbose_name='RegisteredUser Owner'),
),
migrations.AlterField(
model_name='url',
name='short',
field=models.CharField(help_text='The shortcode that acts as the unique go link.', max_length=20, unique=True, validators=[go.validators.unique_short_validator, go.validators.regex_short_validator]),
),
]
# Generated by Django 2.0.5 on 2018-06-09 00:25
import datetime
from django.db import migrations, models
from django.utils.timezone import utc
import go.validators
class Migration(migrations.Migration):
dependencies = [
('go', '0004_auto_20180608_2058'),
]
operations = [
migrations.AlterField(
model_name='registereduser',
name='approved',
field=models.BooleanField(default=False, verbose_name='Approval Status'),
),
migrations.AlterField(
model_name='registereduser',
name='blocked',
field=models.BooleanField(default=False, verbose_name='Blocked Status'),
),
migrations.AlterField(
model_name='registereduser',
name='description',
field=models.TextField(blank=True, default='', verbose_name='Signup Description'),
),
migrations.AlterField(
model_name='registereduser',
name='full_name',
field=models.CharField(default='', max_length=100, verbose_name='Full Name'),
),
migrations.AlterField(
model_name='registereduser',
name='organization',
field=models.CharField(default='', max_length=100, verbose_name='Organization'),
),
migrations.AlterField(
model_name='registereduser',
name='registered',
field=models.BooleanField(default=False, verbose_name='Registration Status'),
),
migrations.AlterField(
model_name='url',
name='date_created',
field=models.DateTimeField(default=datetime.datetime(2018, 6, 9, 0, 25, 38, 606587, tzinfo=utc), verbose_name='Go Link Creation Date'),
),
migrations.AlterField(
model_name='url',
name='date_expires',
field=models.DateTimeField(blank=True, null=True, verbose_name='Go Link Expiry Date'),
),
migrations.AlterField(
model_name='url',
name='destination',
field=models.URLField(default='https://go.gmu.edu', max_length=1000, verbose_name='Go Link Destination URL'),
),
migrations.AlterField(
model_name='url',
name='short',
field=models.CharField(max_length=20, unique=True, validators=[go.validators.unique_short_validator, go.validators.regex_short_validator], verbose_name='Go Shortcode'),
),
]
# Generated by Django 2.0.5 on 2018-06-09 00:25
import datetime
from django.db import migrations, models
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('go', '0005_auto_20180609_0025'),
]
operations = [
migrations.AlterField(
model_name='url',
name='date_created',
field=models.DateTimeField(default=datetime.datetime(2018, 6, 9, 0, 25, 39, 319719, tzinfo=utc), verbose_name='Go Link Creation Date'),
),
]
# Generated by Django 2.0.5 on 2018-06-09 00:26
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('go', '0006_auto_20180609_0025'),
]
operations = [
migrations.AlterField(
model_name='url',
name='date_created',
field=models.DateTimeField(default=django.utils.timezone.now, verbose_name='Go Link Creation Date'),
),
]
from django.apps import AppConfig
class GoForwardConfig(AppConfig):
name = 'go_forward'
class GoAheadConfig(AppConfig):
name = 'go_ahead'
......@@ -8,7 +8,7 @@ from django.core.management.base import BaseCommand
from django.utils import timezone
# App Imports
from go.models import URL
from go_back.models import URL
class Command(BaseCommand):
"""
......
......@@ -13,7 +13,7 @@ from django.test import TestCase
from django.utils import timezone
# App Imports
from go.models import URL, RegisteredUser
from go_back.models import URL, RegisteredUser
# class ExpireLinksTest(TestCase):
# def setUp(self):
......
# Generated by Django 2.0.5 on 2018-05-23 23:29
# Generated by Django 2.0.8 on 2018-08-02 01:05
from django.conf import settings
from django.db import migrations, models
import django.utils.timezone
import go_back.validators
class Migration(migrations.Migration):
......@@ -18,12 +19,12 @@ class Migration(migrations.Migration):
name='RegisteredUser',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('full_name', models.CharField(default='', max_length=100, verbose_name='verbose name')),
('organization', models.CharField(default='', max_length=100, verbose_name='verbose name')),
('description', models.TextField(blank=True, default='', verbose_name='verbose name')),
('registered', models.BooleanField(default=False, verbose_name='verbose name')),
('approved', models.BooleanField(default=False, verbose_name='verbose name')),
('blocked', models.BooleanField(default=False, verbose_name='verbose name')),
('full_name', models.CharField(default='', max_length=100, verbose_name='Full Name')),
('organization', models.CharField(default='', max_length=100, verbose_name='Organization')),
('description', models.TextField(blank=True, default='', verbose_name='Signup Description')),
('registered', models.BooleanField(default=False, verbose_name='Registration Status')),
('approved', models.BooleanField(default=False, verbose_name='Approval Status')),
('blocked', models.BooleanField(default=False, verbose_name='Blocked Status')),
('user', models.OneToOneField(on_delete='cascade', to=settings.AUTH_USER_MODEL, verbose_name='Django User Object')),
],
),
......@@ -31,14 +32,14 @@ class Migration(migrations.Migration):
name='URL',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('date_created', models.DateTimeField(default=django.utils.timezone.now, verbose_name='verbose name')),
('date_expires', models.DateTimeField(blank=True, null=True, verbose_name='verbose name')),
('destination', models.URLField(default='https://go.gmu.edu', max_length=1000)),
('short', models.SlugField(max_length=20, unique=True)),
('date_created', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Go Link Creation Date')),
('date_expires', models.DateTimeField(blank=True, null=True, verbose_name='Go Link Expiry Date')),
('destination', models.URLField(default='https://go.gmu.edu', max_length=1000, verbose_name='Go Link Destination URL')),
('short', models.CharField(max_length=20, unique=True, validators=[go_back.validators.unique_short_validator, go_back.validators.regex_short_validator], verbose_name='Go Shortcode')),
('clicks', models.IntegerField(default=0)),
('qrclicks', models.IntegerField(default=0)),
('socialclicks', models.IntegerField(default=0)),
('owner', models.ForeignKey(on_delete='cascade', to='go.RegisteredUser', verbose_name='verbose name')),
('owner', models.ForeignKey(on_delete='cascade', to='go_back.RegisteredUser', verbose_name='RegisteredUser Owner')),
],
options={
'ordering': ['short'],
......
......@@ -8,7 +8,7 @@ data based on the status of the user.
from django import template
# App Imports
from go.models import RegisteredUser
from go_back.models import RegisteredUser
# To be a valid tag library, the module must contain a module-level variable
# named register that is a template.Library instance, in which all the tags and
......
......@@ -8,7 +8,7 @@ from django.contrib.auth.models import User
from django.test import TestCase
# App Imports
from go.models import RegisteredUser
from go_back.models import RegisteredUser
from .go_extras import is_approved, is_registered
class GoExtrasTest(TestCase):
......
......@@ -77,7 +77,7 @@ TEMPLATES = [
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
os.path.join(BASE_DIR, 'templates'),
'./go/go_forward/templates/'
'./go/go_ahead/templates/'
],
'APP_DIRS': True,
'OPTIONS': {
......@@ -126,8 +126,8 @@ INSTALLED_APPS = (
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'go',
'go_forward',
'go_back',
'go_ahead',
# Third party
'crispy_forms',
'cas',
......
from django.urls import path, include
urlpatterns = [
path('', include('go.urls')),
path('', include('go_forward.urls')),
path('', include('go_back.urls')),
path('', include('go_ahead.urls')),
]
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