Skip to content
Snippets Groups Projects
Commit 8a8cbfbc authored by Pendyala Phani Chaitanya's avatar Pendyala Phani Chaitanya
Browse files

First Commit

parents
No related branches found
No related tags found
No related merge requests found
Showing
with 316 additions and 0 deletions
File added
File added
File added
File added
"""
Django settings for AUPMS project.
Generated by 'django-admin startproject' using Django 1.9.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '%!n*puz+fklqz7mkb5*k10r%@uj3s(gc@x%i!-m7%ow&m6e*8='
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
'Validate.apps.ValidateConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
]
MIDDLEWARE_CLASSES = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
ROOT_URLCONF = 'AUPMS.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
WSGI_APPLICATION = 'AUPMS.wsgi.application'
# Database
# https://docs.djangoproject.com/en/1.9/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
# Password validation
# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
# Internationalization
# https://docs.djangoproject.com/en/1.9/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.9/howto/static-files/
STATIC_URL = '/static/'
from django.conf.urls import url,include
from django.contrib import admin
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^',include('Validate.urls')),
]
"""
WSGI config for AUPMS project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "AUPMS.settings")
application = get_wsgi_application()
File added
File added
File added
File added
File added
File added
from django.contrib import admin
from .models import Professor_Tables,Students_Table,Courses_Table,Teacher_Course,Student_course,Student_attendance,Date_wise_attendance,periodicals_marks
# Register your models here.
admin.site.register(Professor_Tables)
admin.site.register(Students_Table)
admin.site.register(Courses_Table)
admin.site.register(Teacher_Course)
admin.site.register(Student_course)
admin.site.register(Student_attendance)
admin.site.register(Date_wise_attendance)
admin.site.register(periodicals_marks)
from django.apps import AppConfig
class ValidateConfig(AppConfig):
name = 'Validate'
# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-04-23 15:19
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Courses_Table',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('course_id', models.CharField(max_length=6, unique=True)),
('course_name', models.CharField(max_length=50)),
('course_credits', models.IntegerField()),
('course_alias', models.CharField(default='None', max_length=15)),
],
),
migrations.CreateModel(
name='Date_wise_attendance',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('date', models.DateField()),
('number_of_hours', models.IntegerField(default=1)),
],
),
migrations.CreateModel(
name='Professor_Tables',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('username', models.CharField(max_length=10, unique=True)),
('Name', models.CharField(max_length=50)),
('password', models.CharField(max_length=15)),
('designation', models.CharField(max_length=30)),
('date_of_birth', models.DateField()),
],
),
migrations.CreateModel(
name='Student_attendance',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('classes_held', models.IntegerField(default=0)),
('classes_attended', models.IntegerField(default=0)),
('attendance_persentage', models.FloatField(default=0.0)),
],
),
migrations.CreateModel(
name='Student_course',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Validate.Courses_Table')),
],
),
migrations.CreateModel(
name='Students_Table',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('student_dept', models.CharField(max_length=3)),
('student_year', models.CharField(max_length=4)),
('student_section', models.CharField(max_length=1)),
('student_rollno', models.CharField(max_length=2)),
('student_name', models.CharField(max_length=50)),
],
),
migrations.CreateModel(
name='Teacher_Course',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('batch', models.CharField(max_length=4)),
('section', models.CharField(max_length=1)),
('courses_taken', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Validate.Courses_Table')),
('prof', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Validate.Professor_Tables')),
],
),
migrations.AlterUniqueTogether(
name='students_table',
unique_together=set([('student_dept', 'student_year', 'student_section', 'student_rollno')]),
),
migrations.AddField(
model_name='student_course',
name='student',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Validate.Students_Table'),
),
migrations.AddField(
model_name='student_attendance',
name='student_course',
field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='Validate.Student_course'),
),
migrations.AddField(
model_name='date_wise_attendance',
name='student_attendance',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Validate.Student_attendance'),
),
migrations.AlterUniqueTogether(
name='teacher_course',
unique_together=set([('prof', 'courses_taken', 'batch', 'section')]),
),
migrations.AlterUniqueTogether(
name='student_course',
unique_together=set([('student', 'course')]),
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-04-23 15:40
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('Validate', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='date_wise_attendance',
name='status',
field=models.CharField(default='Absent', max_length=8),
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-04-23 16:09
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('Validate', '0002_date_wise_attendance_status'),
]
operations = [
migrations.CreateModel(
name='periodicals_marks',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('periodicals_1', models.FloatField(default=0.0)),
('periodicals_2', models.FloatField(default=0.0)),
('student_course', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='Validate.Student_course')),
],
),
]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment