Skip to content

Commit

Permalink
fixed migrations issues and requirements decouple
Browse files Browse the repository at this point in the history
  • Loading branch information
DuP-491 committed Jul 5, 2023
1 parent 0f4f8f1 commit a8ba914
Show file tree
Hide file tree
Showing 10 changed files with 156 additions and 1 deletion.
2 changes: 1 addition & 1 deletion RoboClub/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down
34 changes: 34 additions & 0 deletions blog/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -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')),
],
),
]
Empty file added blog/migrations/__init__.py
Empty file.
44 changes: 44 additions & 0 deletions component/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -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)),
],
),
]
Empty file.
47 changes: 47 additions & 0 deletions project/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -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')),
],
),
]
Empty file added project/migrations/__init__.py
Empty file.
Binary file modified requirements.txt
Binary file not shown.
30 changes: 30 additions & 0 deletions workshop/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -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)),
],
),
]
Empty file added workshop/migrations/__init__.py
Empty file.

0 comments on commit a8ba914

Please sign in to comment.