-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0e40b8c
Showing
178 changed files
with
31,303 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env python | ||
"""Django's command-line utility for administrative tasks.""" | ||
import os | ||
import sys | ||
|
||
|
||
def main(): | ||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'quizproject.settings') | ||
try: | ||
from django.core.management import execute_from_command_line | ||
except ImportError as exc: | ||
raise ImportError( | ||
"Couldn't import Django. Are you sure it's installed and " | ||
"available on your PYTHONPATH environment variable? Did you " | ||
"forget to activate a virtual environment?" | ||
) from exc | ||
execute_from_command_line(sys.argv) | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
Empty file.
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from django.contrib import admin | ||
from .forms import quesmodel | ||
# # Register your models here. | ||
|
||
admin.site.register(quesmodel) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class QuizappConfig(AppConfig): | ||
default_auto_field = 'django.db.models.BigAutoField' | ||
name = 'quizapp' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
from django import forms | ||
from django.contrib.auth.forms import UserCreationForm | ||
from django.contrib.auth.models import User | ||
from .models import quesmodel | ||
|
||
|
||
class registration_form(UserCreationForm): | ||
username = forms.CharField(max_length=20, required=True, | ||
widget=forms.TextInput(attrs={"placeholder": "Enter usernsme"})) | ||
email = forms.EmailField(required=True, widget=forms.TextInput(attrs={"placeholder": "Enter email"})) | ||
password1 = forms.CharField(max_length=20, required=True, | ||
widget=forms.PasswordInput(attrs={"placeholder": "Re-enter password"})) | ||
password2 = forms.CharField(max_length=20, required=True, | ||
widget=forms.PasswordInput(attrs={"placeholder": "Re-enter password"})) | ||
|
||
class Meta: | ||
model = User | ||
fields = ["username", "email", "password1", "password2"] | ||
|
||
|
||
class login_form(forms.Form): | ||
login_email = forms.EmailField(required=True, | ||
widget=forms.EmailInput(attrs={'placeholder': '[email protected]'})) | ||
login_password = forms.CharField(max_length=20, required=True, | ||
widget=forms.PasswordInput(attrs={"placeholder": "Enter Password"})) | ||
|
||
|
||
class addquesform(forms.ModelForm): | ||
class Meta: | ||
model = quesmodel | ||
fields = ["question","answer"] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Generated by Django 4.0.2 on 2022-02-28 19:30 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='quesmodel', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('question', models.CharField(max_length=200)), | ||
('option1', models.CharField(max_length=20)), | ||
('option2', models.CharField(max_length=20)), | ||
('option3', models.CharField(max_length=20)), | ||
('option4', models.CharField(max_length=20)), | ||
('answer', models.CharField(max_length=20)), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 4.0.2 on 2022-03-01 14:43 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('quizapp', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameField( | ||
model_name='quesmodel', | ||
old_name='answer', | ||
new_name='ans', | ||
), | ||
] |
23 changes: 23 additions & 0 deletions
23
quizapp/migrations/0003_rename_ans_quesmodel_answer_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Generated by Django 4.0.2 on 2022-03-01 14:46 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('quizapp', '0002_rename_answer_quesmodel_ans'), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameField( | ||
model_name='quesmodel', | ||
old_name='ans', | ||
new_name='answer', | ||
), | ||
migrations.RenameField( | ||
model_name='quesmodel', | ||
old_name='question', | ||
new_name='questions', | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
quizapp/migrations/0004_rename_questions_quesmodel_question.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 4.0.2 on 2022-03-01 14:49 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('quizapp', '0003_rename_ans_quesmodel_answer_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameField( | ||
model_name='quesmodel', | ||
old_name='questions', | ||
new_name='question', | ||
), | ||
] |
Empty file.
Binary file not shown.
Binary file added
BIN
+559 Bytes
quizapp/migrations/__pycache__/0002_rename_answer_quesmodel_ans.cpython-38.pyc
Binary file not shown.
Binary file added
BIN
+633 Bytes
quizapp/migrations/__pycache__/0003_rename_ans_quesmodel_answer_and_more.cpython-38.pyc
Binary file not shown.
Binary file added
BIN
+604 Bytes
quizapp/migrations/__pycache__/0004_rename_questions_quesmodel_question.cpython-38.pyc
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from django.db import models | ||
|
||
|
||
# Create your models here. | ||
|
||
class quesmodel(models.Model): | ||
# objects = None | ||
question = models.CharField(max_length=200) | ||
option1 = models.CharField(max_length=20) | ||
option2 = models.CharField(max_length=20) | ||
option3 = models.CharField(max_length=20) | ||
option4 = models.CharField(max_length=20) | ||
answer = models.CharField(max_length=20) | ||
|
||
def __str__(self): | ||
return self.question |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
.gradient-custom-2 { | ||
/* fallback for old browsers */ | ||
background: #fccb90; | ||
|
||
/* Chrome 10-25, Safari 5.1-6 */ | ||
background: -webkit-linear-gradient(to right, #ee7724, #d8363a, #dd3675, #b44593); | ||
|
||
/* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */ | ||
background: linear-gradient(to right, #ee7724, #d8363a, #dd3675, #b44593); | ||
} | ||
|
||
@media (min-width: 768px) { | ||
.gradient-form { | ||
height: 100vh !important; | ||
} | ||
} | ||
@media (min-width: 769px) { | ||
.gradient-custom-2 { | ||
border-top-right-radius: .3rem; | ||
border-bottom-right-radius: .3rem; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{% load widget_tweaks %} | ||
<html> | ||
{% load static %} | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Quiz</title> | ||
<link href="{% static 'css/home.css' %}" rel="stylesheet"> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous"> | ||
</head> | ||
<body class="bg-light"> | ||
<!-- <nav class="navbar navbar-expand-md navbar-dark bg-dark">--> | ||
<!-- <div class="container">--> | ||
<!-- <h1><a href="quizapp/home.html">Quiz Up!</a></h1>--> | ||
<!-- </div>--> | ||
<!-- </nav>--> | ||
<section class="h-100 gradient-form" style="background-color: #eee;"> | ||
<div class="container py-5 h-100"> | ||
<div class="row d-flex justify-content-center align-items-center h-100"> | ||
<div class="col-xl-10"> | ||
<div class="card rounded-3 text-black"> | ||
<div class="row g-0"> | ||
<div class="col-lg-6"> | ||
<div class="card-body p-md-5 mx-md-4"> | ||
|
||
<div class="text-center"> | ||
<img src="https://mdbcdn.b-cdn.net/img/Photos/new-templates/bootstrap-login-form/lotus.webp" style="width: 185px;" alt="logo"> | ||
<h4 class="mt-1 mb-5 pb-1">Quiz Up</h4> | ||
</div> | ||
|
||
<form action="{% url 'log' %} "method="POST"> | ||
<h6 style="text-align:center">{{status}}</h6> | ||
<p>Please login to your account</p> | ||
|
||
{% csrf_token %} | ||
{% for field in form %} | ||
<div class="input-group mb-3"> | ||
{{field.errors}} | ||
{% render_field field class="form-control" %} | ||
</div> | ||
{% endfor %} | ||
|
||
<div class="text-center pt-1 mb-5 pb-1"> | ||
<button name="login" class="btn btn-block fa-lg gradient-custom-2 mb-3">Log in | ||
</div> | ||
|
||
<div class="d-flex align-items-center justify-content-center pb-4"> | ||
<p class="mb-0 me-2">Don't have an account?</p> | ||
<a class="btn btn-outline-danger" href="{% url 'reg' %}">Create new</a> | ||
</div> | ||
|
||
</form> | ||
|
||
</div> | ||
</div> | ||
<div class="col-lg-6 d-flex align-items-center gradient-custom-2"> | ||
<div class="text-white px-3 py-4 p-md-5 mx-md-4"> | ||
<h4 class="mb-4">Its Quiz up Time. Play along us!</h4> | ||
<p class="small mb-0">Getting bored? looking for some fun? Come join us and test your knowledge in fun way.</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
</body> | ||
</html> |
Empty file.
Oops, something went wrong.