-
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.
Merge pull request #1 from Ayush-SR/master
Web Application Completed
- Loading branch information
Showing
6,177 changed files
with
694,788 additions
and
1 deletion.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
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,4 @@ | ||
{ | ||
"git.ignoreLimitWarning": true, | ||
"python.pythonPath": "ll_env/bin/python" | ||
} |
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 |
---|---|---|
@@ -1 +1,17 @@ | ||
# Web-Application | ||
<h1>Learning Log</h1> | ||
#### Developed with :heart: and :coffee: by @Ayush-SR | ||
<p> | ||
<b> Learning Log </b> helps you keep track of your learning, for any topic you're learning about. | ||
</p> | ||
|
||
<blockquote style="color:darksalmon; background-color:black; text-align: center; border-radius: 50px; | ||
font-size: 15px; font-weight: 100;">" Live as if you were to die tomorrow. Learn as if you were to live forever.” Mahatma Gandhi </blockquote> | ||
|
||
---------------------------------------------------------- | ||
|
||
#### Topics Page | ||
![Screen](learning_logs/resources/ll.png) | ||
#### Entry Page | ||
![Screen](learning_logs/resources/ll1.png) | ||
#### Admin Page | ||
![Screen](learning_logs/resources/ll2.png) |
Binary file not shown.
Empty file.
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,16 @@ | ||
""" | ||
ASGI config for learning_log 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.2/howto/deployment/asgi/ | ||
""" | ||
|
||
import os | ||
|
||
from django.core.asgi import get_asgi_application | ||
|
||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'learning_log.settings') | ||
|
||
application = get_asgi_application() |
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,128 @@ | ||
""" | ||
Django settings for learning_log project. | ||
Generated by 'django-admin startproject' using Django 3.2. | ||
For more information on this file, see | ||
https://docs.djangoproject.com/en/3.2/topics/settings/ | ||
For the full list of settings and their values, see | ||
https://docs.djangoproject.com/en/3.2/ref/settings/ | ||
""" | ||
|
||
from pathlib import Path | ||
|
||
# Build paths inside the project like this: BASE_DIR / 'subdir'. | ||
BASE_DIR = Path(__file__).resolve().parent.parent | ||
|
||
|
||
# Quick-start development settings - unsuitable for production | ||
# See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/ | ||
|
||
# SECURITY WARNING: keep the secret key used in production secret! | ||
SECRET_KEY = 'django-insecure-&e)$+6#(izvjxk&8wjo%d1vb5o=+6^$@3a6bs@gz3xrqeh(xpj' | ||
|
||
# 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', | ||
|
||
# My apps | ||
'learning_logs', | ||
] | ||
|
||
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 = 'learning_log.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 = 'learning_log.wsgi.application' | ||
|
||
|
||
# Database | ||
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases | ||
|
||
DATABASES = { | ||
'default': { | ||
'ENGINE': 'django.db.backends.sqlite3', | ||
'NAME': BASE_DIR / 'db.sqlite3', | ||
} | ||
} | ||
|
||
|
||
# Password validation | ||
# https://docs.djangoproject.com/en/3.2/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.2/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/3.2/howto/static-files/ | ||
|
||
STATIC_URL = '/static/' | ||
|
||
# Default primary key field type | ||
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field | ||
|
||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' |
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 @@ | ||
"""learning_log URL Configuration | ||
The `urlpatterns` list routes URLs to views. For more information please see: | ||
https://docs.djangoproject.com/en/3.2/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.conf.urls import include, url | ||
from django.urls import path | ||
|
||
urlpatterns = [ | ||
url(r'^admin/', admin.site.urls), | ||
url(r'', include('learning_logs.urls')), #namespace='learning_logs'), | ||
] |
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 @@ | ||
""" | ||
WSGI config for learning_log 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.2/howto/deployment/wsgi/ | ||
""" | ||
|
||
import os | ||
|
||
from django.core.wsgi import get_wsgi_application | ||
|
||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'learning_log.settings') | ||
|
||
application = get_wsgi_application() |
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.
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,9 @@ | ||
from django.contrib import admin | ||
|
||
# Register your models here. | ||
|
||
from learning_logs.models import Topic | ||
from learning_logs.models import Entry | ||
|
||
admin.site.register(Topic) | ||
admin.site.register(Entry) |
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 LearningLogsConfig(AppConfig): | ||
default_auto_field = 'django.db.models.BigAutoField' | ||
name = 'learning_logs' |
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 @@ | ||
from django import forms | ||
|
||
from .models import Topic, Entry | ||
|
||
class TopicForm(forms.ModelForm): | ||
class Meta: | ||
model = Topic | ||
fields = ['text'] | ||
labels = {'text': ''} | ||
# widgets = {'text': forms.Textarea(attrs={'cols':80})} | ||
|
||
class EntryForm(forms.ModelForm): | ||
class Meta: | ||
model = Entry | ||
fields = ['text'] | ||
labels = {'text': ''} | ||
widgets = {'text': forms.Textarea(attrs={'cols':80})} | ||
|
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 @@ | ||
# Generated by Django 3.2 on 2021-05-04 07:55 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Topic', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('text', models.CharField(max_length=200)), | ||
('date_added', models.DateTimeField(auto_now_add=True)), | ||
], | ||
), | ||
] |
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 3.2 on 2021-05-04 08:27 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('learning_logs', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Entry', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('text', models.TextField()), | ||
('date_added', models.DateTimeField(auto_now_add=True)), | ||
('topic', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='learning_logs.topic')), | ||
], | ||
options={ | ||
'verbose_name_plural': 'entries', | ||
}, | ||
), | ||
] |
Empty file.
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,26 @@ | ||
from django.db import models | ||
|
||
# Create your models here. | ||
class Topic(models.Model): | ||
"""A topic the user is learning about.""" | ||
text = models.CharField(max_length=200) | ||
date_added = models.DateTimeField(auto_now_add=True) | ||
|
||
def __str__(self): | ||
"""Return a string representation of the model.""" | ||
return self.text | ||
|
||
class Entry(models.Model): | ||
"""Somethings specific learned about a topic""" | ||
topic = models.ForeignKey(Topic,on_delete=models.CASCADE) | ||
text = models.TextField() | ||
date_added = models.DateTimeField(auto_now_add=True) | ||
|
||
class Meta: | ||
verbose_name_plural = 'entries' | ||
|
||
def __str__(self): | ||
"""Return a string representation of the model.""" | ||
return self.text[:50] + "..." | ||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,15 @@ | ||
<head> | ||
<title>Learning Log's Web Server</title> | ||
<!-- <link rel="image" href="learning_logs/resources/KNIT.png"> --> | ||
</head> | ||
|
||
<p> | ||
<blockquote style="color: black; font-weight: bold; font-size: 50px;"> | ||
Welcome to future of learning. | ||
</blockquote> | ||
<a href="{% url 'index' %}"><button>Learning Log</button></a> | ||
<a href="{% url 'topics' %}"><button>Topics</button></a> | ||
|
||
</p> | ||
|
||
{% block content %}{% endblock content %} |
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,15 @@ | ||
{% extends "learning_logs/base.html" %} | ||
<p>Learning Log</p> | ||
|
||
|
||
{% block content %} | ||
| ||
|
||
<p> | ||
<b> Learning Log </b> helps you keep track of your learning, for any topic you're learning about.</p> | ||
|
||
<blockquote style="color:darksalmon; background-color:black; text-align: center; border-radius: 50px; | ||
font-size: 45px; font-weight: 100; bottom: 10%;">" Live as if you were to die tomorrow. Learn as if you were to live forever.” | ||
Mahatma Gandhi </blockquote> | ||
|
||
{% endblock content %} |
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,14 @@ | ||
{% extends "learning_logs/base.html" %} | ||
|
||
{% block content %} | ||
|
||
<p><a href="{% url 'topic' topic.id %}">{{ topic }}</a></p> | ||
|
||
<!-- <p>Add a new entry:</p> --> | ||
<!-- <form action="{% url 'new_entry' topic.id %}" method = 'post'> | ||
{% csrf_token %} | ||
{{ form.as_p }} | ||
<button name='Submit'>Add Entry</button> | ||
</form> --> | ||
|
||
{% endblock content %} |
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,11 @@ | ||
{% extends "learning_logs/base.html" %} | ||
|
||
{% block content %} | ||
<p>Add a new topic:</p> | ||
<form action="{% url 'new_topic' %}" method='post'> | ||
{% csrf_token %} | ||
{{ form.as_p }} | ||
<button name="Submit">add topic</button> | ||
</form> | ||
|
||
{% endblock content %} |
Oops, something went wrong.