├── db.sqlite3
├── manage.py
├── todo
├── __init__.py
├── __pycache__
│ ├── __init__.cpython-38.pyc
│ ├── admin.cpython-38.pyc
│ ├── forms.cpython-38.pyc
│ ├── models.cpython-38.pyc
│ └── views.cpython-38.pyc
├── admin.py
├── apps.py
├── forms.py
├── migrations
│ ├── 0001_initial.py
│ ├── 0002_auto_20200131_0131.py
│ ├── __init__.py
│ └── __pycache__
│ │ ├── 0001_initial.cpython-38.pyc
│ │ ├── 0002_auto_20200131_0131.cpython-38.pyc
│ │ └── __init__.cpython-38.pyc
├── models.py
├── static
│ └── todo
│ │ └── logo.png
├── templates
│ └── todo
│ │ ├── base.html
│ │ ├── completedtodos.html
│ │ ├── createtodo.html
│ │ ├── currenttodos.html
│ │ ├── home.html
│ │ ├── loginuser.html
│ │ ├── signupuser.html
│ │ └── viewtodo.html
├── tests.py
└── views.py
└── todowoo
├── __init__.py
├── __pycache__
├── __init__.cpython-38.pyc
├── settings.cpython-38.pyc
├── urls.cpython-38.pyc
└── wsgi.cpython-38.pyc
├── asgi.py
├── settings.py
├── urls.py
└── wsgi.py
/db.sqlite3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zappycode/django3-todowoo-project/663b0661148f26ed3cfa86603c7844c7cc6c35c9/db.sqlite3
--------------------------------------------------------------------------------
/manage.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | """Django's command-line utility for administrative tasks."""
3 | import os
4 | import sys
5 |
6 |
7 | def main():
8 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'todowoo.settings')
9 | try:
10 | from django.core.management import execute_from_command_line
11 | except ImportError as exc:
12 | raise ImportError(
13 | "Couldn't import Django. Are you sure it's installed and "
14 | "available on your PYTHONPATH environment variable? Did you "
15 | "forget to activate a virtual environment?"
16 | ) from exc
17 | execute_from_command_line(sys.argv)
18 |
19 |
20 | if __name__ == '__main__':
21 | main()
22 |
--------------------------------------------------------------------------------
/todo/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zappycode/django3-todowoo-project/663b0661148f26ed3cfa86603c7844c7cc6c35c9/todo/__init__.py
--------------------------------------------------------------------------------
/todo/__pycache__/__init__.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zappycode/django3-todowoo-project/663b0661148f26ed3cfa86603c7844c7cc6c35c9/todo/__pycache__/__init__.cpython-38.pyc
--------------------------------------------------------------------------------
/todo/__pycache__/admin.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zappycode/django3-todowoo-project/663b0661148f26ed3cfa86603c7844c7cc6c35c9/todo/__pycache__/admin.cpython-38.pyc
--------------------------------------------------------------------------------
/todo/__pycache__/forms.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zappycode/django3-todowoo-project/663b0661148f26ed3cfa86603c7844c7cc6c35c9/todo/__pycache__/forms.cpython-38.pyc
--------------------------------------------------------------------------------
/todo/__pycache__/models.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zappycode/django3-todowoo-project/663b0661148f26ed3cfa86603c7844c7cc6c35c9/todo/__pycache__/models.cpython-38.pyc
--------------------------------------------------------------------------------
/todo/__pycache__/views.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zappycode/django3-todowoo-project/663b0661148f26ed3cfa86603c7844c7cc6c35c9/todo/__pycache__/views.cpython-38.pyc
--------------------------------------------------------------------------------
/todo/admin.py:
--------------------------------------------------------------------------------
1 | from django.contrib import admin
2 | from .models import Todo
3 |
4 | class TodoAdmin(admin.ModelAdmin):
5 | readonly_fields = ('created',)
6 |
7 | admin.site.register(Todo, TodoAdmin)
8 |
--------------------------------------------------------------------------------
/todo/apps.py:
--------------------------------------------------------------------------------
1 | from django.apps import AppConfig
2 |
3 |
4 | class TodoConfig(AppConfig):
5 | name = 'todo'
6 |
--------------------------------------------------------------------------------
/todo/forms.py:
--------------------------------------------------------------------------------
1 | from django.forms import ModelForm
2 | from .models import Todo
3 |
4 | class TodoForm(ModelForm):
5 | class Meta:
6 | model = Todo
7 | fields = ['title', 'memo', 'important']
8 |
--------------------------------------------------------------------------------
/todo/migrations/0001_initial.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 3.0 on 2020-01-31 01:28
2 |
3 | from django.conf import settings
4 | from django.db import migrations, models
5 | import django.db.models.deletion
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | initial = True
11 |
12 | dependencies = [
13 | migrations.swappable_dependency(settings.AUTH_USER_MODEL),
14 | ]
15 |
16 | operations = [
17 | migrations.CreateModel(
18 | name='Todo',
19 | fields=[
20 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
21 | ('title', models.CharField(max_length=100)),
22 | ('memo', models.TextField(blank=True)),
23 | ('created', models.DateTimeField(auto_now_add=True)),
24 | ('datecompleted', models.DateTimeField(null=True)),
25 | ('important', models.BooleanField(default=False)),
26 | ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
27 | ],
28 | ),
29 | ]
30 |
--------------------------------------------------------------------------------
/todo/migrations/0002_auto_20200131_0131.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 3.0 on 2020-01-31 01:31
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('todo', '0001_initial'),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name='todo',
15 | name='datecompleted',
16 | field=models.DateTimeField(blank=True, null=True),
17 | ),
18 | ]
19 |
--------------------------------------------------------------------------------
/todo/migrations/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zappycode/django3-todowoo-project/663b0661148f26ed3cfa86603c7844c7cc6c35c9/todo/migrations/__init__.py
--------------------------------------------------------------------------------
/todo/migrations/__pycache__/0001_initial.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zappycode/django3-todowoo-project/663b0661148f26ed3cfa86603c7844c7cc6c35c9/todo/migrations/__pycache__/0001_initial.cpython-38.pyc
--------------------------------------------------------------------------------
/todo/migrations/__pycache__/0002_auto_20200131_0131.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zappycode/django3-todowoo-project/663b0661148f26ed3cfa86603c7844c7cc6c35c9/todo/migrations/__pycache__/0002_auto_20200131_0131.cpython-38.pyc
--------------------------------------------------------------------------------
/todo/migrations/__pycache__/__init__.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zappycode/django3-todowoo-project/663b0661148f26ed3cfa86603c7844c7cc6c35c9/todo/migrations/__pycache__/__init__.cpython-38.pyc
--------------------------------------------------------------------------------
/todo/models.py:
--------------------------------------------------------------------------------
1 | from django.db import models
2 | from django.contrib.auth.models import User
3 |
4 | class Todo(models.Model):
5 | title = models.CharField(max_length=100)
6 | memo = models.TextField(blank=True)
7 | created = models.DateTimeField(auto_now_add=True)
8 | datecompleted = models.DateTimeField(null=True, blank=True)
9 | important = models.BooleanField(default=False)
10 | user = models.ForeignKey(User, on_delete=models.CASCADE)
11 |
12 | def __str__(self):
13 | return self.title
14 |
--------------------------------------------------------------------------------
/todo/static/todo/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zappycode/django3-todowoo-project/663b0661148f26ed3cfa86603c7844c7cc6c35c9/todo/static/todo/logo.png
--------------------------------------------------------------------------------
/todo/templates/todo/base.html:
--------------------------------------------------------------------------------
1 | {% load static %}
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | Todo Woo
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | Todo Woo
23 |
24 |
25 |
26 |
27 |
28 | {% if user.is_authenticated %}
29 |
42 | {% endif %}
43 |
44 | {% if user.is_authenticated %}
45 |
46 | Logout
47 |
51 |
52 | {% else %}
53 |
54 | Sign Up
55 |
56 |
57 | Login
58 |
59 | {% endif %}
60 |
61 |
62 |
63 |
64 |
65 |
66 | {% block content %}{% endblock %}
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/todo/templates/todo/completedtodos.html:
--------------------------------------------------------------------------------
1 | {% extends "todo/base.html" %}
2 |
3 | {% block content %}
4 |
5 |
6 |
Completed Todos
7 |
8 |
9 |
18 | {% endblock %}
19 |
--------------------------------------------------------------------------------
/todo/templates/todo/createtodo.html:
--------------------------------------------------------------------------------
1 | {% extends "todo/base.html" %}
2 |
3 | {% block content %}
4 |
9 |
10 |
11 | {% if error %}
12 |
13 | {{ error }}
14 |
15 | {% endif %}
16 |
32 |
33 |
34 | {% endblock %}
--------------------------------------------------------------------------------
/todo/templates/todo/currenttodos.html:
--------------------------------------------------------------------------------
1 | {% extends "todo/base.html" %}
2 |
3 | {% block content %}
4 |
5 |
6 | {% if todos %}
7 |
{{ todos.count }} Current Todo{{ todos.count|pluralize }}
8 | {% else %}
9 | Current Todos
10 | {% endif %}
11 |
12 |
13 |
14 |
15 | {% if todos %}
16 |
21 | {% else %}
22 |
23 |
Looks like you don't have any todos! Nice work.
24 |
25 |
New Todo
26 |
27 | {% endif %}
28 |
29 |
30 | {% endblock %}
31 |
--------------------------------------------------------------------------------
/todo/templates/todo/home.html:
--------------------------------------------------------------------------------
1 | {% extends "todo/base.html" %}
2 |
3 | {% block content %}
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
Simply Your Todos. Woo!
14 |
Life is fun. But life is also busy. There's a million different things you could be doing. But what matters is what you do. We created Todo Woo to help you make sense of all of your opportunities and live that life that matters most to you. Your new organized life awaits.
15 |
Start
16 |
17 |
18 |
19 | {% endblock %}
20 |
--------------------------------------------------------------------------------
/todo/templates/todo/loginuser.html:
--------------------------------------------------------------------------------
1 | {% extends "todo/base.html" %}
2 |
3 | {% block content %}
4 |
9 |
10 |
11 | {% if error %}
12 |
13 | {{ error }}
14 |
15 | {% endif %}
16 |
17 | {% csrf_token %}
18 |
19 | Username
20 |
21 |
22 |
23 | Password
24 |
25 |
26 | Login
27 |
28 |
29 |
30 | Need an account?
Sign Up here
31 |
32 |
33 |
34 | {% endblock %}
35 |
--------------------------------------------------------------------------------
/todo/templates/todo/signupuser.html:
--------------------------------------------------------------------------------
1 | {% extends "todo/base.html" %}
2 |
3 | {% block content %}
4 |
9 |
10 |
11 | {% if error %}
12 |
13 | {{ error }}
14 |
15 | {% endif %}
16 |
17 | {% csrf_token %}
18 |
19 | Username
20 |
21 | Your username must be unique. We'll let you know if someone has taken it already.
22 |
23 |
24 | Password
25 |
26 |
27 |
28 | Confirm Password
29 |
30 |
31 | Sign Up
32 |
33 |
34 |
35 | Do you already have an account?
Login here
36 |
37 |
38 |
39 | {% endblock %}
40 |
--------------------------------------------------------------------------------
/todo/templates/todo/viewtodo.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | {% extends "todo/base.html" %}
8 |
9 | {% block content %}
10 |
11 |
12 |
New Todo
13 |
14 |
15 |
16 |
17 | {% if error %}
18 |
19 | {{ error }}
20 |
21 | {% endif %}
22 |
23 | {% csrf_token %}
24 |
25 | Title
26 |
27 |
28 |
29 | Memo
30 | {{ todo.memo }}
31 |
32 |
33 |
34 | Important
35 |
36 | Save
37 | Complete
38 | Delete
39 |
40 |
41 |
42 | {% if todo.datecompleted is None %}
43 |
44 | {% csrf_token %}
45 | Complete
46 |
47 | {% endif %}
48 |
49 | {% csrf_token %}
50 | Delete
51 |
52 | {% endblock %}
--------------------------------------------------------------------------------
/todo/tests.py:
--------------------------------------------------------------------------------
1 | from django.test import TestCase
2 |
3 | # Create your tests here.
4 |
--------------------------------------------------------------------------------
/todo/views.py:
--------------------------------------------------------------------------------
1 | from django.shortcuts import render, redirect, get_object_or_404
2 | from django.contrib.auth.forms import UserCreationForm, AuthenticationForm
3 | from django.contrib.auth.models import User
4 | from django.db import IntegrityError
5 | from django.contrib.auth import login, logout, authenticate
6 | from .forms import TodoForm
7 | from .models import Todo
8 | from django.utils import timezone
9 | from django.contrib.auth.decorators import login_required
10 |
11 | def home(request):
12 | return render(request, 'todo/home.html')
13 |
14 | def signupuser(request):
15 | if request.method == 'GET':
16 | return render(request, 'todo/signupuser.html', {'form':UserCreationForm()})
17 | else:
18 | if request.POST['password1'] == request.POST['password2']:
19 | try:
20 | user = User.objects.create_user(request.POST['username'], password=request.POST['password1'])
21 | user.save()
22 | login(request, user)
23 | return redirect('currenttodos')
24 | except IntegrityError:
25 | return render(request, 'todo/signupuser.html', {'form':UserCreationForm(), 'error':'That username has already been taken. Please choose a new username'})
26 | else:
27 | return render(request, 'todo/signupuser.html', {'form':UserCreationForm(), 'error':'Passwords did not match'})
28 |
29 | def loginuser(request):
30 | if request.method == 'GET':
31 | return render(request, 'todo/loginuser.html', {'form':AuthenticationForm()})
32 | else:
33 | user = authenticate(request, username=request.POST['username'], password=request.POST['password'])
34 | if user is None:
35 | return render(request, 'todo/loginuser.html', {'form':AuthenticationForm(), 'error':'Username and password did not match'})
36 | else:
37 | login(request, user)
38 | return redirect('currenttodos')
39 |
40 | @login_required
41 | def logoutuser(request):
42 | if request.method == 'POST':
43 | logout(request)
44 | return redirect('home')
45 |
46 | @login_required
47 | def createtodo(request):
48 | if request.method == 'GET':
49 | return render(request, 'todo/createtodo.html', {'form':TodoForm()})
50 | else:
51 | try:
52 | form = TodoForm(request.POST)
53 | newtodo = form.save(commit=False)
54 | newtodo.user = request.user
55 | newtodo.save()
56 | return redirect('currenttodos')
57 | except ValueError:
58 | return render(request, 'todo/createtodo.html', {'form':TodoForm(), 'error':'Bad data passed in. Try again.'})
59 |
60 | @login_required
61 | def currenttodos(request):
62 | todos = Todo.objects.filter(user=request.user, datecompleted__isnull=True)
63 | return render(request, 'todo/currenttodos.html', {'todos':todos})
64 |
65 | @login_required
66 | def completedtodos(request):
67 | todos = Todo.objects.filter(user=request.user, datecompleted__isnull=False).order_by('-datecompleted')
68 | return render(request, 'todo/completedtodos.html', {'todos':todos})
69 |
70 | @login_required
71 | def viewtodo(request, todo_pk):
72 | todo = get_object_or_404(Todo, pk=todo_pk, user=request.user)
73 | if request.method == 'GET':
74 | form = TodoForm(instance=todo)
75 | return render(request, 'todo/viewtodo.html', {'todo':todo, 'form':form})
76 | else:
77 | try:
78 | form = TodoForm(request.POST, instance=todo)
79 | form.save()
80 | return redirect('currenttodos')
81 | except ValueError:
82 | return render(request, 'todo/viewtodo.html', {'todo':todo, 'form':form, 'error':'Bad info'})
83 |
84 | @login_required
85 | def completetodo(request, todo_pk):
86 | todo = get_object_or_404(Todo, pk=todo_pk, user=request.user)
87 | if request.method == 'POST':
88 | todo.datecompleted = timezone.now()
89 | todo.save()
90 | return redirect('currenttodos')
91 |
92 | @login_required
93 | def deletetodo(request, todo_pk):
94 | todo = get_object_or_404(Todo, pk=todo_pk, user=request.user)
95 | if request.method == 'POST':
96 | todo.delete()
97 | return redirect('currenttodos')
98 |
--------------------------------------------------------------------------------
/todowoo/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zappycode/django3-todowoo-project/663b0661148f26ed3cfa86603c7844c7cc6c35c9/todowoo/__init__.py
--------------------------------------------------------------------------------
/todowoo/__pycache__/__init__.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zappycode/django3-todowoo-project/663b0661148f26ed3cfa86603c7844c7cc6c35c9/todowoo/__pycache__/__init__.cpython-38.pyc
--------------------------------------------------------------------------------
/todowoo/__pycache__/settings.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zappycode/django3-todowoo-project/663b0661148f26ed3cfa86603c7844c7cc6c35c9/todowoo/__pycache__/settings.cpython-38.pyc
--------------------------------------------------------------------------------
/todowoo/__pycache__/urls.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zappycode/django3-todowoo-project/663b0661148f26ed3cfa86603c7844c7cc6c35c9/todowoo/__pycache__/urls.cpython-38.pyc
--------------------------------------------------------------------------------
/todowoo/__pycache__/wsgi.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zappycode/django3-todowoo-project/663b0661148f26ed3cfa86603c7844c7cc6c35c9/todowoo/__pycache__/wsgi.cpython-38.pyc
--------------------------------------------------------------------------------
/todowoo/asgi.py:
--------------------------------------------------------------------------------
1 | """
2 | ASGI config for todowoo project.
3 |
4 | It exposes the ASGI callable as a module-level variable named ``application``.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
8 | """
9 |
10 | import os
11 |
12 | from django.core.asgi import get_asgi_application
13 |
14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'todowoo.settings')
15 |
16 | application = get_asgi_application()
17 |
--------------------------------------------------------------------------------
/todowoo/settings.py:
--------------------------------------------------------------------------------
1 | """
2 | Django settings for todowoo project.
3 |
4 | Generated by 'django-admin startproject' using Django 3.0.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/3.0/topics/settings/
8 |
9 | For the full list of settings and their values, see
10 | https://docs.djangoproject.com/en/3.0/ref/settings/
11 | """
12 |
13 | import os
14 |
15 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
17 |
18 |
19 | # Quick-start development settings - unsuitable for production
20 | # See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
21 |
22 | # SECURITY WARNING: keep the secret key used in production secret!
23 | SECRET_KEY = '_jjhm#&qjqbm_qula%xs2(0&^qwai@2c%au&4z57%g+=-lsbno'
24 |
25 | # SECURITY WARNING: don't run with debug turned on in production!
26 | DEBUG = True
27 |
28 | ALLOWED_HOSTS = []
29 |
30 |
31 | # Application definition
32 |
33 | INSTALLED_APPS = [
34 | 'django.contrib.admin',
35 | 'django.contrib.auth',
36 | 'django.contrib.contenttypes',
37 | 'django.contrib.sessions',
38 | 'django.contrib.messages',
39 | 'django.contrib.staticfiles',
40 | 'todo',
41 | ]
42 |
43 | MIDDLEWARE = [
44 | 'django.middleware.security.SecurityMiddleware',
45 | 'django.contrib.sessions.middleware.SessionMiddleware',
46 | 'django.middleware.common.CommonMiddleware',
47 | 'django.middleware.csrf.CsrfViewMiddleware',
48 | 'django.contrib.auth.middleware.AuthenticationMiddleware',
49 | 'django.contrib.messages.middleware.MessageMiddleware',
50 | 'django.middleware.clickjacking.XFrameOptionsMiddleware',
51 | ]
52 |
53 | ROOT_URLCONF = 'todowoo.urls'
54 |
55 | TEMPLATES = [
56 | {
57 | 'BACKEND': 'django.template.backends.django.DjangoTemplates',
58 | 'DIRS': [],
59 | 'APP_DIRS': True,
60 | 'OPTIONS': {
61 | 'context_processors': [
62 | 'django.template.context_processors.debug',
63 | 'django.template.context_processors.request',
64 | 'django.contrib.auth.context_processors.auth',
65 | 'django.contrib.messages.context_processors.messages',
66 | ],
67 | },
68 | },
69 | ]
70 |
71 | WSGI_APPLICATION = 'todowoo.wsgi.application'
72 |
73 |
74 | # Database
75 | # https://docs.djangoproject.com/en/3.0/ref/settings/#databases
76 |
77 | DATABASES = {
78 | 'default': {
79 | 'ENGINE': 'django.db.backends.sqlite3',
80 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
81 | }
82 | }
83 |
84 |
85 | # Password validation
86 | # https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators
87 |
88 | AUTH_PASSWORD_VALIDATORS = [
89 | {
90 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
91 | },
92 | {
93 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
94 | },
95 | {
96 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
97 | },
98 | {
99 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
100 | },
101 | ]
102 |
103 |
104 | # Internationalization
105 | # https://docs.djangoproject.com/en/3.0/topics/i18n/
106 |
107 | LANGUAGE_CODE = 'en-us'
108 |
109 | TIME_ZONE = 'UTC'
110 |
111 | USE_I18N = True
112 |
113 | USE_L10N = True
114 |
115 | USE_TZ = True
116 |
117 |
118 | # Static files (CSS, JavaScript, Images)
119 | # https://docs.djangoproject.com/en/3.0/howto/static-files/
120 |
121 | STATIC_URL = '/static/'
122 |
123 | LOGIN_URL = '/login'
124 |
--------------------------------------------------------------------------------
/todowoo/urls.py:
--------------------------------------------------------------------------------
1 | """todowoo URL Configuration
2 |
3 | The `urlpatterns` list routes URLs to views. For more information please see:
4 | https://docs.djangoproject.com/en/3.0/topics/http/urls/
5 | Examples:
6 | Function views
7 | 1. Add an import: from my_app import views
8 | 2. Add a URL to urlpatterns: path('', views.home, name='home')
9 | Class-based views
10 | 1. Add an import: from other_app.views import Home
11 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
12 | Including another URLconf
13 | 1. Import the include() function: from django.urls import include, path
14 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
15 | """
16 | from django.contrib import admin
17 | from django.urls import path
18 | from todo import views
19 |
20 | urlpatterns = [
21 | path('admin/', admin.site.urls),
22 |
23 | # Auth
24 | path('signup/', views.signupuser, name='signupuser'),
25 | path('login/', views.loginuser, name='loginuser'),
26 | path('logout/', views.logoutuser, name='logoutuser'),
27 |
28 | # Todos
29 | path('', views.home, name='home'),
30 | path('create/', views.createtodo, name='createtodo'),
31 | path('current/', views.currenttodos, name='currenttodos'),
32 | path('completed/', views.completedtodos, name='completedtodos'),
33 | path('todo/', views.viewtodo, name='viewtodo'),
34 | path('todo//complete', views.completetodo, name='completetodo'),
35 | path('todo//delete', views.deletetodo, name='deletetodo'),
36 | ]
37 |
--------------------------------------------------------------------------------
/todowoo/wsgi.py:
--------------------------------------------------------------------------------
1 | """
2 | WSGI config for todowoo project.
3 |
4 | It exposes the WSGI callable as a module-level variable named ``application``.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/
8 | """
9 |
10 | import os
11 |
12 | from django.core.wsgi import get_wsgi_application
13 |
14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'todowoo.settings')
15 |
16 | application = get_wsgi_application()
17 |
--------------------------------------------------------------------------------