Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rrrrrrmb committed Mar 28, 2020
0 parents commit b374a2e
Show file tree
Hide file tree
Showing 5,770 changed files with 647,120 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
Empty file added base_app/__init__.py
Empty file.
Binary file added base_app/__pycache__/__init__.cpython-36.pyc
Binary file not shown.
Binary file added base_app/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file added base_app/__pycache__/settings.cpython-36.pyc
Binary file not shown.
Binary file added base_app/__pycache__/settings.cpython-38.pyc
Binary file not shown.
Binary file added base_app/__pycache__/urls.cpython-36.pyc
Binary file not shown.
Binary file added base_app/__pycache__/urls.cpython-38.pyc
Binary file not shown.
Binary file added base_app/__pycache__/wsgi.cpython-36.pyc
Binary file not shown.
Binary file added base_app/__pycache__/wsgi.cpython-38.pyc
Binary file not shown.
16 changes: 16 additions & 0 deletions base_app/asgi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
ASGI config for base_app project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
"""

import os

from django.core.asgi import get_asgi_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'base_app.settings')

application = get_asgi_application()
125 changes: 125 additions & 0 deletions base_app/settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
"""
Django settings for base_app project.
Generated by 'django-admin startproject' using Django 3.0.2.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/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__)))
TEMPLATE_DIR = os.path.join(BASE_DIR, 'treasurehunt/templates/treasurehunt')

# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'v2me!)*-^k!hkug&%k&x9n4haz!u47ej+i-c72%f6!e!kh6kl2'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []

# Application definition

INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'treasurehunt',
]

MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

ROOT_URLCONF = 'base_app.urls'

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
TEMPLATE_DIR,
],
'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 = 'base_app.wsgi.application'

# Database
# https://docs.djangoproject.com/en/3.0/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/3.0/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/3.0/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'Asia/Kolkata'

USE_I18N = True

USE_L10N = True

USE_TZ = True

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.0/howto/static-files/

STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')

LOGIN_URL = '/login/'
22 changes: 22 additions & 0 deletions base_app/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
"""base_app URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include

urlpatterns = [
path('admin/', admin.site.urls),
path('', include('treasurehunt.urls'))
]
16 changes: 16 additions & 0 deletions base_app/wsgi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
WSGI config for base_app 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/3.0/howto/deployment/wsgi/
"""

import os

from django.core.wsgi import get_wsgi_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'base_app.settings')

application = get_wsgi_application()
Binary file added db.sqlite3
Binary file not shown.
21 changes: 21 additions & 0 deletions manage.py
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', 'base_app.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 added treasurehunt/__init__.py
Empty file.
Binary file added treasurehunt/__pycache__/__init__.cpython-36.pyc
Binary file not shown.
Binary file added treasurehunt/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file added treasurehunt/__pycache__/admin.cpython-36.pyc
Binary file not shown.
Binary file added treasurehunt/__pycache__/admin.cpython-38.pyc
Binary file not shown.
Binary file added treasurehunt/__pycache__/forms.cpython-36.pyc
Binary file not shown.
Binary file added treasurehunt/__pycache__/forms.cpython-38.pyc
Binary file not shown.
Binary file added treasurehunt/__pycache__/models.cpython-36.pyc
Binary file not shown.
Binary file added treasurehunt/__pycache__/models.cpython-38.pyc
Binary file not shown.
Binary file added treasurehunt/__pycache__/urls.cpython-36.pyc
Binary file not shown.
Binary file added treasurehunt/__pycache__/urls.cpython-38.pyc
Binary file not shown.
Binary file added treasurehunt/__pycache__/views.cpython-36.pyc
Binary file not shown.
Binary file added treasurehunt/__pycache__/views.cpython-38.pyc
Binary file not shown.
5 changes: 5 additions & 0 deletions treasurehunt/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.contrib import admin
from treasurehunt.models import Score, AnswerChecker
# Register your models here.
admin.site.register(Score)
admin.site.register(AnswerChecker)
5 changes: 5 additions & 0 deletions treasurehunt/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.apps import AppConfig


class TreasurehuntConfig(AppConfig):
name = 'treasurehunt'
22 changes: 22 additions & 0 deletions treasurehunt/forms.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from django import forms
from django.contrib.auth.models import User
from . import models


class UserForm(forms.ModelForm):
password = forms.CharField(widget=forms.PasswordInput(
attrs={'placeholder': 'Enter the Password'}))
confirm_password = forms.CharField(widget=forms.PasswordInput(
attrs={'placeholder': 'Reenter the password'}))

class Meta():
model = User
fields = ('username', 'email', 'password', 'confirm_password')


class Answer(forms.ModelForm):
answer = forms.CharField()

class Meta():
model = models.Answer
fields = ('answer', )
25 changes: 25 additions & 0 deletions treasurehunt/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Generated by Django 3.0.2 on 2020-01-30 20:29

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='Score',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('score', models.PositiveIntegerField(default=0)),
('user', models.OneToOneField(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL)),
],
),
]
28 changes: 28 additions & 0 deletions treasurehunt/migrations/0002_auto_20200201_0034.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Generated by Django 3.0.2 on 2020-01-31 19:04

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


class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('treasurehunt', '0001_initial'),
]

operations = [
migrations.CreateModel(
name='Answer',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('answer', models.CharField(max_length=255)),
],
),
migrations.AlterField(
model_name='score',
name='user',
field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
),
]
21 changes: 21 additions & 0 deletions treasurehunt/migrations/0003_answerchecker.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated by Django 3.0.2 on 2020-02-18 19:02

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('treasurehunt', '0002_auto_20200201_0034'),
]

operations = [
migrations.CreateModel(
name='AnswerChecker',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('index', models.PositiveIntegerField(default=0, unique=True)),
('answer', models.CharField(max_length=255)),
],
),
]
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.
27 changes: 27 additions & 0 deletions treasurehunt/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
from django.db import models
from django.contrib.auth.models import User


# Create your models here.
class Score(models.Model):

user = models.OneToOneField(User, on_delete=models.CASCADE)
score = models.PositiveIntegerField(default=0)

def __str__(self):
return self.user.username


class Answer(models.Model):
answer = models.CharField(max_length=255)


class AnswerChecker(models.Model):
index = models.PositiveIntegerField(default=0, unique=True)
answer = models.CharField(max_length=255)

def __str__(self):
return self.answer

def ans_value(self):
return self.answer
Binary file added treasurehunt/static/files/Rules.pdf
Binary file not shown.
Binary file added treasurehunt/static/images/0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added treasurehunt/static/images/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added treasurehunt/static/images/10QASawqeadsp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added treasurehunt/static/images/11IUoiruwefhdsl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added treasurehunt/static/images/12IYRUEHDSnakhqw.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added treasurehunt/static/images/13KLJcmnxwqeg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added treasurehunt/static/images/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added treasurehunt/static/images/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added treasurehunt/static/images/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added treasurehunt/static/images/5wopeiqweoj.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added treasurehunt/static/images/6XYyxasydyaanmp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added treasurehunt/static/images/7dwqeqpdsaaqQ.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added treasurehunt/static/images/8Qweqewqdsapoi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added treasurehunt/static/images/9dsawqQwqe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added treasurehunt/static/images/back.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added treasurehunt/static/images/demo-g.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added treasurehunt/static/images/icl1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b374a2e

Please sign in to comment.