Skip to content

Commit

Permalink
Merge pull request #41 from rohin079/main
Browse files Browse the repository at this point in the history
Completed issues #7, #8, #9, #10, #33, #34, #,35, #36,
ughrima authored Jul 23, 2023
2 parents 05da0ed + a303969 commit 109f829
Showing 1,600 changed files with 249,081 additions and 56 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
26 changes: 0 additions & 26 deletions django-boilerplate/TechConnect/TechConnect/views.py

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
28 changes: 28 additions & 0 deletions django-boilerplate/TechConnectProject/TechConnect/forms/forms.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

# TechConnect/forms/forms.py

from django import forms
from ..models.models import Chapter
from ..models.models import Opportunity
from ..models.models import BlogSubmission
from ..models.models import BlogPublication

class ChapterForm(forms.ModelForm):
class Meta:
model = Chapter
fields = ['name_of_chapter', 'event_name', 'event_location', 'event_date', 'event_poster', 'event_description']

class OpportunityForm(forms.ModelForm):
class Meta:
model = Opportunity
fields = ['title', 'key_details', 'description']

class BlogSubmissionForm(forms.ModelForm):
class Meta:
model = BlogSubmission
fields = ['name', 'year_of_education', 'blog_title', 'blog_material']

class BlogPublicationForm(forms.ModelForm):
class Meta:
model = BlogPublication
fields = ['name', 'year_of_education', 'blog_title', 'blog_material']
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Generated by Django 4.1.10 on 2023-07-23 19:41

from django.db import migrations, models
import uuid


class Migration(migrations.Migration):

initial = True

dependencies = [
]

operations = [
migrations.CreateModel(
name='Chapter',
fields=[
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('name_of_chapter', models.CharField(max_length=100)),
('event_name', models.CharField(max_length=100)),
('event_location', models.CharField(max_length=100)),
('event_date', models.DateField()),
('event_poster', models.CharField(max_length=255)),
('event_description', models.TextField()),
],
options={
'db_table': 'createChapter',
},
),
migrations.CreateModel(
name='Opportunity',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=100)),
('key_details', models.CharField(max_length=200)),
('description', models.TextField()),
],
options={
'db_table': 'opportunity',
},
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 4.1.10 on 2023-07-23 19:48

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('TechConnect', '0001_initial'),
]

operations = [
migrations.AlterModelTable(
name='opportunity',
table=None,
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 4.1.10 on 2023-07-23 20:07

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('TechConnect', '0002_alter_opportunity_table'),
]

operations = [
migrations.AlterModelTable(
name='opportunity',
table='opportunity',
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Generated by Django 4.1.10 on 2023-07-23 20:14

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('TechConnect', '0003_alter_opportunity_table'),
]

operations = [
migrations.CreateModel(
name='BlogSubmission',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100)),
('year_of_education', models.CharField(max_length=50)),
('blog_title', models.CharField(max_length=200)),
('blog_material', models.TextField()),
],
options={
'db_table': 'submitBlog',
},
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Generated by Django 4.1.10 on 2023-07-23 20:21

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('TechConnect', '0004_blogsubmission'),
]

operations = [
migrations.CreateModel(
name='BlogPublication',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100)),
('year_of_education', models.CharField(max_length=50)),
('blog_title', models.CharField(max_length=200)),
('blog_material', models.TextField()),
],
options={
'db_table': 'publishBlog',
},
),
]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
54 changes: 54 additions & 0 deletions django-boilerplate/TechConnectProject/TechConnect/models/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
from django.db import models
import uuid

class Chapter(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
name_of_chapter = models.CharField(max_length=100)
event_name = models.CharField(max_length=100)
event_location = models.CharField(max_length=100)
event_date = models.DateField()
event_poster = models.CharField(max_length=255)
event_description = models.TextField()

def __str__(self):
return self.name_of_chapter

class Meta:
db_table = 'createChapter'

class Opportunity(models.Model):
title = models.CharField(max_length=100)
key_details = models.CharField(max_length=200)
description = models.TextField()

def __str__(self):
return self.title

class Meta:
db_table = 'opportunity'


class BlogSubmission(models.Model):
name = models.CharField(max_length=100)
year_of_education = models.CharField(max_length=50)
blog_title = models.CharField(max_length=200)
blog_material = models.TextField()

def __str__(self):
return self.blog_title

class Meta:
db_table = 'submitBlog'

class BlogPublication(models.Model):
name = models.CharField(max_length=100)
year_of_education = models.CharField(max_length=50)
blog_title = models.CharField(max_length=200)
blog_material = models.TextField()

def __str__(self):
return self.blog_title

class Meta:
db_table = 'publishBlog'

Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'blog_form',
'TechConnect',
]

MIDDLEWARE = [
@@ -67,8 +67,12 @@

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
'ENGINE': 'djongo',
'ENFORCE_SCHEMA': False, # Set to True if you want to enforce a schema (optional)
'CLIENT': {
'host': 'mongodb+srv://rohin:admin@cluster0.kv3yklv.mongodb.net/', # Replace with your MongoDB URI
},
'NAME': 'TechConnect', # Replace with your MongoDB database name
}
}

@@ -108,6 +112,11 @@
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.1/howto/static-files/

# settings.py

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'


STATIC_ROOT = os.path.join(BASE_DIR, 'TechConnect/static_collected')
STATIC_URL = '/static/'
STATICFILES_DIRS = [
Loading

0 comments on commit 109f829

Please sign in to comment.