Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration-Teams&Homepage #2

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
SECRET_KEY=yourkeyls
SECRET_KEY=SECRET_KEY2
DEBUG=True
ALLOWED_HOSTS=
11 changes: 5 additions & 6 deletions festcms2/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@
# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
try:
SECRET_KEY = config('SECRET_KEY')#config('SECRET_KEY')
except:
SECRET_KEY = '434324'
SECRET_KEY = config('SECRET_KEY')

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True #config('DEBUG',cast=bool)
DEBUG = config('DEBUG',cast=bool)

ALLOWED_HOSTS = config('ALLOWED_HOSTS',cast=Csv())

ALLOWED_HOSTS = ['*'] #config('ALLOWED_HOSTS',cast=Csv())

# Application definition

Expand Down
Binary file added flow/.DS_Store
Binary file not shown.
25 changes: 2 additions & 23 deletions flow/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,11 @@
from .models import *
# Register your models here.
admin.site.register(Events)
admin.site.register(EventCategory)
admin.site.register(Workshops)
admin.site.register(FAQ)
admin.site.register(About)
admin.site.register(Sponsors)
admin.site.register(TeamCategory)
admin.site.register(TeamMember)
admin.site.register(MajorAttractions)
admin.site.register(Timeline)
admin.site.register(TechmelaProject)
admin.site.register(Review)
admin.site.register(Arena)

#Social Initiatives
class SocialInitiativesPhotosAdmin(admin.StackedInline):
model = SocialInitiativesPhotos

class SocialInitiativesAdmin(admin.ModelAdmin):
inlines = [SocialInitiativesPhotosAdmin]
list_display = ('name',)
admin.site.register(SocialInitiatives , SocialInitiativesAdmin)

#Industrial Visits
class IndustrialVisitsPhotosAdmin(admin.StackedInline):
model = IndustrialVisitsPhotos

class IndustrialVisitsAdmin(admin.ModelAdmin):
inlines = [IndustrialVisitsPhotosAdmin]
list_display = ('name',)
admin.site.register(IndustrialVisits , IndustrialVisitsAdmin)
admin.site.register(MajorAttractions)
95 changes: 14 additions & 81 deletions flow/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Generated by Django 3.1.7 on 2022-02-26 07:22
# Generated by Django 3.0.2 on 2020-02-01 12:45

from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion

Expand All @@ -11,7 +9,6 @@ class Migration(migrations.Migration):
initial = True

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]

operations = [
Expand All @@ -25,13 +22,12 @@ class Migration(migrations.Migration):
],
),
migrations.CreateModel(
name='Arena',
name='EventCategory',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=50, unique=True)),
('description', models.TextField(blank=True, help_text='Enter the description of the attraction here')),
('logo', models.ImageField(blank=True, upload_to='arena/')),
('url', models.CharField(blank=True, help_text='URL of Arena item', max_length=100)),
('groupName', models.CharField(help_text='Name of the event group', max_length=255, unique=True)),
('groupId', models.CharField(help_text='ID by which group will be identified', max_length=20, unique=True)),
('logo', models.ImageField(blank=True, upload_to='event_category_images/')),
],
),
migrations.CreateModel(
Expand All @@ -47,36 +43,13 @@ class Migration(migrations.Migration):
'verbose_name_plural': 'FAQs',
},
),
migrations.CreateModel(
name='IndustrialVisits',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=250, unique=True)),
('image', models.ImageField(blank=True, null=True, upload_to='industrial_images/')),
('video_link', models.CharField(blank=True, max_length=1024, null=True)),
],
),
migrations.CreateModel(
name='MajorAttractions',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=50, unique=True)),
('title', models.CharField(blank=True, max_length=200)),
('description', models.TextField(help_text='Enter the description of the attraction here')),
('image', models.ImageField(blank=True, null=True, upload_to='mjr_attrs/')),
('url', models.CharField(blank=True, help_text='URL of major attractions', max_length=1024)),
],
),
migrations.CreateModel(
name='SocialInitiatives',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100, unique=True)),
('description', models.TextField()),
('date_time', models.DateTimeField(null=True)),
('webinar_link', models.CharField(blank=True, max_length=1024, null=True)),
('app_link', models.CharField(blank=True, max_length=1024, null=True)),
('poster', models.ImageField(blank=True, null=True, upload_to='social_images/')),
('logo', models.ImageField(blank=True, upload_to='')),
],
),
migrations.CreateModel(
Expand All @@ -97,28 +70,6 @@ class Migration(migrations.Migration):
('team_image', models.ImageField(blank=True, upload_to='team_images/')),
],
),
migrations.CreateModel(
name='TechmelaProject',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(default='Title here', max_length=30)),
('team_name', models.CharField(max_length=20)),
('description', models.TextField(default='Description here')),
('pdf_link', models.URLField(default='https://drive.google.com/file/d/0B1HXnM1lBuoqMzVhZjcwNTAtZWI5OS00ZDg3LWEyMzktNzZmYWY2Y2NhNWQx/preview')),
('video_link', models.URLField(default='https://drive.google.com/file/d/1KFFhLqRLhdF27KwVVe0npoVX0lNLPhpM/preview')),
('domain', models.CharField(choices=[('Robotics', 'Robotics'), ('Assistive Technology', 'Assistive Technology'), ('Software Projects', 'Software Projects')], default='Robotics', max_length=30)),
('project_image', models.ImageField(blank=True, null=True, upload_to='techmela_projects/')),
],
),
migrations.CreateModel(
name='Timeline',
fields=[
('day_number', models.IntegerField(primary_key=True, serialize=False)),
('title', models.CharField(max_length=20)),
('body', models.TextField()),
('image', models.ImageField(blank=True, upload_to='day_img/')),
],
),
migrations.CreateModel(
name='Workshops',
fields=[
Expand All @@ -129,41 +80,21 @@ class Migration(migrations.Migration):
('description', models.TextField(help_text='Enter short description of the workshop')),
('date_time', models.DateTimeField()),
('venue', models.CharField(max_length=50)),
('contact', models.CharField(max_length=50)),
('registration_open', models.BooleanField(default=True)),
('registration_link', models.CharField(blank=True, help_text='Enter the registration link here', max_length=1024)),
('registration_link', models.CharField(blank=True, help_text='Enter the registration link here', max_length=50)),
],
),
migrations.CreateModel(
name='TeamMember',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(help_text='Enter the name of the member here', max_length=50)),
('position', models.CharField(blank=True, help_text='Enter the position of the person', max_length=50)),
('name', models.CharField(help_text='Enter the name of the member here', max_length=50, unique=True)),
('position', models.CharField(help_text='Enter the position of the person', max_length=50)),
('profile_img', models.ImageField(blank=True, upload_to='members/')),
('choice', models.CharField(choices=[('GLUG', "GNU/Linux Users' Group"), ('CCA', 'Centre for Cognitive Activities'), ('SAE', 'SAE'), ('MNTC', 'Maths n Tech Club'), ('REC', 'RECursion')], default='GLUG', max_length=5)),
('team', models.ManyToManyField(to='flow.TeamCategory')),
],
),
migrations.CreateModel(
name='SocialInitiativesPhotos',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('image', models.ImageField(blank=True, null=True, upload_to='social_images/')),
('social_name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='socialImages', to='flow.socialinitiatives')),
],
),
migrations.CreateModel(
name='Review',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('mark', models.PositiveIntegerField(default=0, validators=[django.core.validators.MaxValueValidator(10), django.core.validators.MinValueValidator(0)])),
('feas', models.PositiveIntegerField(default=0, validators=[django.core.validators.MaxValueValidator(10), django.core.validators.MinValueValidator(0)])),
('tech', models.PositiveIntegerField(default=0, validators=[django.core.validators.MaxValueValidator(10), django.core.validators.MinValueValidator(0)])),
('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='flow.techmelaproject')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='Events',
fields=[
Expand All @@ -172,11 +103,13 @@ class Migration(migrations.Migration):
('eventId', models.CharField(help_text='Enter the ID of the event', max_length=50)),
('logo', models.ImageField(blank=True, upload_to='event_images/')),
('description', models.TextField(help_text='Enter short description of the event')),
('problem_statement', models.TextField(blank=True, help_text='Enter the problem statement of the event here')),
('date_time', models.DateTimeField()),
('venue', models.CharField(blank=True, max_length=50)),
('registration_link', models.CharField(blank=True, help_text='Enter the registration link here', max_length=1024)),
('event_link', models.CharField(blank=True, help_text='If there is no registration, then website link', max_length=1024)),
('eventDay', models.ForeignKey(default=1, on_delete=django.db.models.deletion.DO_NOTHING, to='flow.timeline')),
('contact', models.CharField(max_length=20)),
('registration_open', models.BooleanField(default=True)),
('registration_link', models.CharField(blank=True, help_text='Enter the registration link here', max_length=50)),
('eventGroup', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='flow.EventCategory')),
],
),
]
Loading