diff --git a/RoboClub/settings.py b/RoboClub/settings.py index 85daa426..7dde7e18 100644 --- a/RoboClub/settings.py +++ b/RoboClub/settings.py @@ -33,7 +33,7 @@ # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/ -IS_LOCAL=config('DEBUG', default=False, cast=bool) +IS_LOCAL=config('DEBUG', default=True, cast=bool) # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = config('SECRET_KEY', default='django-insecure-dfv22x*65_x&xp_x@v$s*&ieo()*@3!*499lxdfaqgk$(gbw3x') diff --git a/blog/migrations/0001_initial.py b/blog/migrations/0001_initial.py new file mode 100644 index 00000000..6dcf6b87 --- /dev/null +++ b/blog/migrations/0001_initial.py @@ -0,0 +1,34 @@ +# Generated by Django 3.1.5 on 2023-07-05 09:11 + +import blog.models +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion +import taggit.managers + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('taggit', '0003_taggeditem_add_unique_index'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='Blog', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(max_length=50)), + ('content', models.TextField()), + ('date', models.DateField()), + ('vidlink', models.URLField(blank=True)), + ('image', models.ImageField(blank=True, upload_to=blog.models.get_path)), + ('approved', models.BooleanField(default=False)), + ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ('tags', taggit.managers.TaggableManager(blank=True, help_text='A comma-separated list of tags.', through='taggit.TaggedItem', to='taggit.Tag', verbose_name='Tags')), + ], + ), + ] diff --git a/blog/migrations/__init__.py b/blog/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/component/migrations/0001_initial.py b/component/migrations/0001_initial.py new file mode 100644 index 00000000..8a9acc72 --- /dev/null +++ b/component/migrations/0001_initial.py @@ -0,0 +1,44 @@ +# Generated by Django 3.1.5 on 2023-07-05 09:17 + +import component.models +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='Component', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=128)), + ('detail', models.TextField(blank=True)), + ('image', models.ImageField(blank=True, upload_to=component.models.get_path)), + ('type', models.IntegerField(choices=[(0, 'Development Boards'), (1, 'Sensors and Electronic Components'), (2, 'Motors and Motor Drivers'), (3, 'Tools'), (4, 'Power and Battery'), (5, 'Transmitter and Receiver'), (6, 'Miscellaneous')], default=6)), + ('max_num', models.IntegerField(default=0)), + ('issued_num', models.IntegerField(default=0)), + ('issued_members', models.ManyToManyField(blank=True, to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='Request', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('status', models.IntegerField(choices=[(0, 'Pending'), (1, 'Accepted'), (2, 'Rejected')], default=0)), + ('request_num', models.IntegerField(default=0)), + ('user_confirmation', models.BooleanField(default=False)), + ('time_confirmation', models.DateTimeField(blank=True, null=True)), + ('reason', models.TextField(blank=True, default='', max_length=128, null=True)), + ('component', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='component.component')), + ('request_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ], + ), + ] diff --git a/component/migrations/__init__.py b/component/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/project/migrations/0001_initial.py b/project/migrations/0001_initial.py new file mode 100644 index 00000000..26bdd168 --- /dev/null +++ b/project/migrations/0001_initial.py @@ -0,0 +1,47 @@ +# Generated by Django 3.1.5 on 2023-07-05 09:11 + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion +import project.models +import taggit.managers + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('taggit', '0003_taggeditem_add_unique_index'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='Project', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(max_length=100)), + ('aim', models.TextField(max_length=200)), + ('github', models.URLField(blank=True)), + ('vidlink', models.URLField(blank=True)), + ('detail', models.TextField()), + ('overview', models.TextField(blank=True)), + ('status', models.IntegerField(choices=[(0, 'Ongoing'), (1, 'Completed'), (2, 'Abandoned')], default=0)), + ('comp_and_tech', models.CharField(default=None, max_length=250)), + ('image', models.ImageField(blank=True, upload_to=project.models.get_path)), + ('members', models.ManyToManyField(to=settings.AUTH_USER_MODEL)), + ('tags', taggit.managers.TaggableManager(help_text='A comma-separated list of tags.', through='taggit.TaggedItem', to='taggit.Tag', verbose_name='Tags')), + ], + ), + migrations.CreateModel( + name='ShareKey', + fields=[ + ('location', models.TextField()), + ('token', models.CharField(max_length=40, primary_key=True, serialize=False)), + ('creation_date', models.DateTimeField(auto_now_add=True)), + ('expiration_seconds', models.BigIntegerField()), + ('project', models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='sharelink', to='project.project')), + ], + ), + ] diff --git a/project/migrations/__init__.py b/project/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/requirements.txt b/requirements.txt index daefd3ce..d48012e0 100644 Binary files a/requirements.txt and b/requirements.txt differ diff --git a/workshop/migrations/0001_initial.py b/workshop/migrations/0001_initial.py new file mode 100644 index 00000000..c149993c --- /dev/null +++ b/workshop/migrations/0001_initial.py @@ -0,0 +1,30 @@ +# Generated by Django 3.1.5 on 2023-07-05 09:17 + +from django.db import migrations, models +import workshop.models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Workshop', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(max_length=256)), + ('date', models.DateField(blank=True, null=True)), + ('venue', models.CharField(blank=True, max_length=256, null=True)), + ('target', models.CharField(default='All', max_length=256)), + ('link', models.FileField(blank=True, null=True, upload_to=workshop.models.get_path)), + ('image', models.ImageField(blank=True, upload_to=workshop.models.get_path)), + ('date_posted', models.DateField()), + ('description', models.TextField(blank=True, max_length=1000)), + ('status', models.IntegerField(choices=[(0, 'Past'), (1, 'Upcoming')], default=1)), + ], + ), + ] diff --git a/workshop/migrations/__init__.py b/workshop/migrations/__init__.py new file mode 100644 index 00000000..e69de29b