From fe7d43f308bbc3953d4a88480b8088d12cbcb0b6 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Fri, 3 Jan 2025 18:46:40 -0600 Subject: archived old not used apps --- app/budget/0007_luxpurchase_cat.py | 20 ----- app/budget/admin.py | 32 ------- app/budget/migrations/0001_initial.py | 36 -------- .../migrations/0002_alter_luxpurchase_amount.py | 18 ---- ...uxpurchase_category_alter_luxpurchase_source.py | 23 ----- .../migrations/0004_alter_luxpurchase_source.py | 19 ----- .../0005_luxspendingcategory_luxfixedmonthly.py | 33 -------- .../0006_remove_luxfixedmonthly_cat_and_more.py | 23 ----- app/budget/migrations/0007_luxpurchase_cat.py | 19 ----- .../migrations/0008_remove_luxpurchase_category.py | 17 ---- .../0009_rename_cat_luxpurchase_category.py | 18 ---- .../migrations/0010_luxfixedmonthly_amount.py | 18 ---- ...method_alter_luxfixedmonthly_amount_and_more.py | 31 ------- app/budget/migrations/__init__.py | 0 app/budget/models.py | 80 ------------------ app/budget/templates/budget/base.html | 35 -------- app/budget/templates/budget/create_cat_form.html | 26 ------ app/budget/templates/budget/create_form.html | 26 ------ app/budget/templates/budget/luxpurchase_list.html | 58 ------------- app/budget/templates/budget/update_form.html | 20 ----- app/budget/urls.py | 29 ------- app/budget/views.py | 57 ------------- app/builder/views.py | 2 +- app/resume/admin.py | 59 ------------- app/resume/build.py | 75 ----------------- app/resume/migrations/0001_initial.py | 49 ----------- app/resume/migrations/0002_auto_20151207_2105.py | 25 ------ app/resume/migrations/0003_auto_20151211_1925.py | 19 ----- app/resume/migrations/0004_job_resume.py | 37 -------- app/resume/migrations/0005_job_slug.py | 18 ---- app/resume/migrations/0006_auto_20190112_1257.py | 22 ----- app/resume/migrations/0007_auto_20190113_1128.py | 18 ---- app/resume/migrations/0008_auto_20190113_1139.py | 24 ------ app/resume/migrations/0009_job_body_html.py | 18 ---- app/resume/migrations/0010_auto_20190113_1147.py | 25 ------ app/resume/migrations/0011_auto_20190114_0227.py | 23 ----- app/resume/migrations/__init__.py | 0 app/resume/models.py | 98 ---------------------- app/resume/urls.py | 48 ----------- app/resume/views.py | 60 ------------- bak/unused_apps/budget/0007_luxpurchase_cat.py | 20 +++++ bak/unused_apps/budget/admin.py | 32 +++++++ bak/unused_apps/budget/migrations/0001_initial.py | 36 ++++++++ .../migrations/0002_alter_luxpurchase_amount.py | 18 ++++ ...uxpurchase_category_alter_luxpurchase_source.py | 23 +++++ .../migrations/0004_alter_luxpurchase_source.py | 19 +++++ .../0005_luxspendingcategory_luxfixedmonthly.py | 33 ++++++++ .../0006_remove_luxfixedmonthly_cat_and_more.py | 23 +++++ .../budget/migrations/0007_luxpurchase_cat.py | 19 +++++ .../migrations/0008_remove_luxpurchase_category.py | 17 ++++ .../0009_rename_cat_luxpurchase_category.py | 18 ++++ .../migrations/0010_luxfixedmonthly_amount.py | 18 ++++ ...method_alter_luxfixedmonthly_amount_and_more.py | 31 +++++++ bak/unused_apps/budget/migrations/__init__.py | 0 bak/unused_apps/budget/models.py | 80 ++++++++++++++++++ bak/unused_apps/budget/templates/budget/base.html | 35 ++++++++ .../budget/templates/budget/create_cat_form.html | 26 ++++++ .../budget/templates/budget/create_form.html | 26 ++++++ .../budget/templates/budget/luxpurchase_list.html | 58 +++++++++++++ .../budget/templates/budget/update_form.html | 20 +++++ bak/unused_apps/budget/urls.py | 29 +++++++ bak/unused_apps/budget/views.py | 57 +++++++++++++ bak/unused_apps/resume/admin.py | 59 +++++++++++++ bak/unused_apps/resume/build.py | 75 +++++++++++++++++ bak/unused_apps/resume/migrations/0001_initial.py | 49 +++++++++++ .../resume/migrations/0002_auto_20151207_2105.py | 25 ++++++ .../resume/migrations/0003_auto_20151211_1925.py | 19 +++++ .../resume/migrations/0004_job_resume.py | 37 ++++++++ bak/unused_apps/resume/migrations/0005_job_slug.py | 18 ++++ .../resume/migrations/0006_auto_20190112_1257.py | 22 +++++ .../resume/migrations/0007_auto_20190113_1128.py | 18 ++++ .../resume/migrations/0008_auto_20190113_1139.py | 24 ++++++ .../resume/migrations/0009_job_body_html.py | 18 ++++ .../resume/migrations/0010_auto_20190113_1147.py | 25 ++++++ .../resume/migrations/0011_auto_20190114_0227.py | 23 +++++ bak/unused_apps/resume/migrations/__init__.py | 0 bak/unused_apps/resume/models.py | 98 ++++++++++++++++++++++ bak/unused_apps/resume/urls.py | 48 +++++++++++ bak/unused_apps/resume/views.py | 60 +++++++++++++ config/base_urls.py | 35 ++++---- 80 files changed, 1275 insertions(+), 1274 deletions(-) delete mode 100644 app/budget/0007_luxpurchase_cat.py delete mode 100644 app/budget/admin.py delete mode 100644 app/budget/migrations/0001_initial.py delete mode 100644 app/budget/migrations/0002_alter_luxpurchase_amount.py delete mode 100644 app/budget/migrations/0003_alter_luxpurchase_category_alter_luxpurchase_source.py delete mode 100644 app/budget/migrations/0004_alter_luxpurchase_source.py delete mode 100644 app/budget/migrations/0005_luxspendingcategory_luxfixedmonthly.py delete mode 100644 app/budget/migrations/0006_remove_luxfixedmonthly_cat_and_more.py delete mode 100644 app/budget/migrations/0007_luxpurchase_cat.py delete mode 100644 app/budget/migrations/0008_remove_luxpurchase_category.py delete mode 100644 app/budget/migrations/0009_rename_cat_luxpurchase_category.py delete mode 100644 app/budget/migrations/0010_luxfixedmonthly_amount.py delete mode 100644 app/budget/migrations/0011_luxpaymentmethod_alter_luxfixedmonthly_amount_and_more.py delete mode 100644 app/budget/migrations/__init__.py delete mode 100644 app/budget/models.py delete mode 100644 app/budget/templates/budget/base.html delete mode 100644 app/budget/templates/budget/create_cat_form.html delete mode 100644 app/budget/templates/budget/create_form.html delete mode 100644 app/budget/templates/budget/luxpurchase_list.html delete mode 100644 app/budget/templates/budget/update_form.html delete mode 100644 app/budget/urls.py delete mode 100644 app/budget/views.py delete mode 100644 app/resume/admin.py delete mode 100644 app/resume/build.py delete mode 100644 app/resume/migrations/0001_initial.py delete mode 100644 app/resume/migrations/0002_auto_20151207_2105.py delete mode 100644 app/resume/migrations/0003_auto_20151211_1925.py delete mode 100644 app/resume/migrations/0004_job_resume.py delete mode 100644 app/resume/migrations/0005_job_slug.py delete mode 100644 app/resume/migrations/0006_auto_20190112_1257.py delete mode 100644 app/resume/migrations/0007_auto_20190113_1128.py delete mode 100644 app/resume/migrations/0008_auto_20190113_1139.py delete mode 100644 app/resume/migrations/0009_job_body_html.py delete mode 100644 app/resume/migrations/0010_auto_20190113_1147.py delete mode 100644 app/resume/migrations/0011_auto_20190114_0227.py delete mode 100644 app/resume/migrations/__init__.py delete mode 100644 app/resume/models.py delete mode 100644 app/resume/urls.py delete mode 100644 app/resume/views.py create mode 100644 bak/unused_apps/budget/0007_luxpurchase_cat.py create mode 100644 bak/unused_apps/budget/admin.py create mode 100644 bak/unused_apps/budget/migrations/0001_initial.py create mode 100644 bak/unused_apps/budget/migrations/0002_alter_luxpurchase_amount.py create mode 100644 bak/unused_apps/budget/migrations/0003_alter_luxpurchase_category_alter_luxpurchase_source.py create mode 100644 bak/unused_apps/budget/migrations/0004_alter_luxpurchase_source.py create mode 100644 bak/unused_apps/budget/migrations/0005_luxspendingcategory_luxfixedmonthly.py create mode 100644 bak/unused_apps/budget/migrations/0006_remove_luxfixedmonthly_cat_and_more.py create mode 100644 bak/unused_apps/budget/migrations/0007_luxpurchase_cat.py create mode 100644 bak/unused_apps/budget/migrations/0008_remove_luxpurchase_category.py create mode 100644 bak/unused_apps/budget/migrations/0009_rename_cat_luxpurchase_category.py create mode 100644 bak/unused_apps/budget/migrations/0010_luxfixedmonthly_amount.py create mode 100644 bak/unused_apps/budget/migrations/0011_luxpaymentmethod_alter_luxfixedmonthly_amount_and_more.py create mode 100644 bak/unused_apps/budget/migrations/__init__.py create mode 100644 bak/unused_apps/budget/models.py create mode 100644 bak/unused_apps/budget/templates/budget/base.html create mode 100644 bak/unused_apps/budget/templates/budget/create_cat_form.html create mode 100644 bak/unused_apps/budget/templates/budget/create_form.html create mode 100644 bak/unused_apps/budget/templates/budget/luxpurchase_list.html create mode 100644 bak/unused_apps/budget/templates/budget/update_form.html create mode 100644 bak/unused_apps/budget/urls.py create mode 100644 bak/unused_apps/budget/views.py create mode 100644 bak/unused_apps/resume/admin.py create mode 100644 bak/unused_apps/resume/build.py create mode 100644 bak/unused_apps/resume/migrations/0001_initial.py create mode 100644 bak/unused_apps/resume/migrations/0002_auto_20151207_2105.py create mode 100644 bak/unused_apps/resume/migrations/0003_auto_20151211_1925.py create mode 100644 bak/unused_apps/resume/migrations/0004_job_resume.py create mode 100644 bak/unused_apps/resume/migrations/0005_job_slug.py create mode 100644 bak/unused_apps/resume/migrations/0006_auto_20190112_1257.py create mode 100644 bak/unused_apps/resume/migrations/0007_auto_20190113_1128.py create mode 100644 bak/unused_apps/resume/migrations/0008_auto_20190113_1139.py create mode 100644 bak/unused_apps/resume/migrations/0009_job_body_html.py create mode 100644 bak/unused_apps/resume/migrations/0010_auto_20190113_1147.py create mode 100644 bak/unused_apps/resume/migrations/0011_auto_20190114_0227.py create mode 100644 bak/unused_apps/resume/migrations/__init__.py create mode 100644 bak/unused_apps/resume/models.py create mode 100644 bak/unused_apps/resume/urls.py create mode 100644 bak/unused_apps/resume/views.py diff --git a/app/budget/0007_luxpurchase_cat.py b/app/budget/0007_luxpurchase_cat.py deleted file mode 100644 index b7bb553..0000000 --- a/app/budget/0007_luxpurchase_cat.py +++ /dev/null @@ -1,20 +0,0 @@ -# Generated by Django 4.0.6 on 2022-11-12 12:53 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('budget', '0006_remove_luxfixedmonthly_cat_and_more'), - ] - - operations = [ - migrations.AddField( - model_name='luxpurchase', - name='cat', - field=models.ForeignKey(default='Grocery & Home', on_delete=django.db.models.deletion.CASCADE, to='budget.luxspendingcategory'), - preserve_default=False, - ), - ] diff --git a/app/budget/admin.py b/app/budget/admin.py deleted file mode 100644 index 0f578fb..0000000 --- a/app/budget/admin.py +++ /dev/null @@ -1,32 +0,0 @@ -from django.contrib import admin -from .models import LuxSource, LuxPurchase, LuxSpendingCategory, LuxFixedMonthly, LuxPaymentMethod - - -@admin.register(LuxSpendingCategory) -class SourceAdmin(admin.ModelAdmin): - list_display = ('name',) - - -@admin.register(LuxSource) -class SourceAdmin(admin.ModelAdmin): - list_display = ('name',) - - -@admin.register(LuxPurchase) -class PurchaseAdmin(admin.ModelAdmin): - list_display = ('source', 'amount', 'category' ) - search_fields = ['source', 'amount'] - list_filter = ('category',) - - class Media: - js = ('next-prev-links.js',) - - -@admin.register(LuxFixedMonthly) -class LuxFixedMonthlyAdmin(admin.ModelAdmin): - list_display = ('name', 'amount', 'category', 'payment_method') - - -@admin.register(LuxPaymentMethod) -class LuxPaymentMethodAdmin(admin.ModelAdmin): - list_display = ('name',) diff --git a/app/budget/migrations/0001_initial.py b/app/budget/migrations/0001_initial.py deleted file mode 100644 index 30bd5a1..0000000 --- a/app/budget/migrations/0001_initial.py +++ /dev/null @@ -1,36 +0,0 @@ -# Generated by Django 4.0.6 on 2022-11-11 17:50 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ] - - operations = [ - migrations.CreateModel( - name='LuxSource', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=200)), - ('date_recorded', models.DateTimeField(auto_now_add=True)), - ], - ), - migrations.CreateModel( - name='LuxPurchase', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('amount', models.IntegerField()), - ('category', models.IntegerField(choices=[(0, 'Grocery and Home'), (1, 'Gas'), (2, 'Bus'), (3, 'Lodging'), (4, 'Books'), (5, 'Clothes'), (6, 'Eating Out'), (7, 'Misc')], default=0)), - ('date_recorded', models.DateTimeField(auto_now_add=True)), - ('source', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='budget.luxsource')), - ], - options={ - 'ordering': ('-date_recorded',), - }, - ), - ] diff --git a/app/budget/migrations/0002_alter_luxpurchase_amount.py b/app/budget/migrations/0002_alter_luxpurchase_amount.py deleted file mode 100644 index 06400dd..0000000 --- a/app/budget/migrations/0002_alter_luxpurchase_amount.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 4.0.6 on 2022-11-11 18:06 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('budget', '0001_initial'), - ] - - operations = [ - migrations.AlterField( - model_name='luxpurchase', - name='amount', - field=models.DecimalField(decimal_places=2, max_digits=6), - ), - ] diff --git a/app/budget/migrations/0003_alter_luxpurchase_category_alter_luxpurchase_source.py b/app/budget/migrations/0003_alter_luxpurchase_category_alter_luxpurchase_source.py deleted file mode 100644 index a880acf..0000000 --- a/app/budget/migrations/0003_alter_luxpurchase_category_alter_luxpurchase_source.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 4.0.6 on 2022-11-12 10:18 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('budget', '0002_alter_luxpurchase_amount'), - ] - - operations = [ - migrations.AlterField( - model_name='luxpurchase', - name='category', - field=models.IntegerField(choices=[(0, 'Grocery & Home'), (1, 'Gas'), (2, 'Bus'), (3, 'Lodging'), (4, 'Books'), (5, 'Clothes'), (6, 'Eating Out'), (7, 'Misc')], default=0), - ), - migrations.AlterField( - model_name='luxpurchase', - name='source', - field=models.IntegerField(choices=[(0, 'Walmart'), (1, 'Grocery Store'), (2, 'Gas Station'), (3, 'Amazon')], default=0), - ), - ] diff --git a/app/budget/migrations/0004_alter_luxpurchase_source.py b/app/budget/migrations/0004_alter_luxpurchase_source.py deleted file mode 100644 index 0eab270..0000000 --- a/app/budget/migrations/0004_alter_luxpurchase_source.py +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by Django 4.0.6 on 2022-11-12 10:46 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('budget', '0003_alter_luxpurchase_category_alter_luxpurchase_source'), - ] - - operations = [ - migrations.AlterField( - model_name='luxpurchase', - name='source', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='budget.luxsource'), - ), - ] diff --git a/app/budget/migrations/0005_luxspendingcategory_luxfixedmonthly.py b/app/budget/migrations/0005_luxspendingcategory_luxfixedmonthly.py deleted file mode 100644 index 66af470..0000000 --- a/app/budget/migrations/0005_luxspendingcategory_luxfixedmonthly.py +++ /dev/null @@ -1,33 +0,0 @@ -# Generated by Django 4.0.6 on 2022-11-12 12:52 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('budget', '0004_alter_luxpurchase_source'), - ] - - operations = [ - migrations.CreateModel( - name='LuxSpendingCategory', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=200)), - ('date_recorded', models.DateTimeField(auto_now_add=True)), - ], - ), - migrations.CreateModel( - name='LuxFixedMonthly', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=200)), - ('category', models.IntegerField(choices=[(0, 'Grocery & Home'), (1, 'Gas'), (2, 'Bus'), (3, 'Lodging'), (4, 'Books'), (5, 'Clothes'), (6, 'Eating Out'), (7, 'Misc')], default=0)), - ('date_recorded', models.DateTimeField(auto_now_add=True)), - ('cat', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='budget.luxspendingcategory')), - ('source', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='budget.luxsource')), - ], - ), - ] diff --git a/app/budget/migrations/0006_remove_luxfixedmonthly_cat_and_more.py b/app/budget/migrations/0006_remove_luxfixedmonthly_cat_and_more.py deleted file mode 100644 index 3631cc3..0000000 --- a/app/budget/migrations/0006_remove_luxfixedmonthly_cat_and_more.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 4.0.6 on 2022-11-12 12:53 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('budget', '0005_luxspendingcategory_luxfixedmonthly'), - ] - - operations = [ - migrations.RemoveField( - model_name='luxfixedmonthly', - name='cat', - ), - migrations.AlterField( - model_name='luxfixedmonthly', - name='category', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='budget.luxspendingcategory'), - ), - ] diff --git a/app/budget/migrations/0007_luxpurchase_cat.py b/app/budget/migrations/0007_luxpurchase_cat.py deleted file mode 100644 index 7a8e548..0000000 --- a/app/budget/migrations/0007_luxpurchase_cat.py +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by Django 4.0.6 on 2022-11-12 12:56 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('budget', '0006_remove_luxfixedmonthly_cat_and_more'), - ] - - operations = [ - migrations.AddField( - model_name='luxpurchase', - name='cat', - field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='budget.luxspendingcategory'), - ), - ] diff --git a/app/budget/migrations/0008_remove_luxpurchase_category.py b/app/budget/migrations/0008_remove_luxpurchase_category.py deleted file mode 100644 index 7e2a0b9..0000000 --- a/app/budget/migrations/0008_remove_luxpurchase_category.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 4.0.6 on 2022-11-12 13:15 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('budget', '0007_luxpurchase_cat'), - ] - - operations = [ - migrations.RemoveField( - model_name='luxpurchase', - name='category', - ), - ] diff --git a/app/budget/migrations/0009_rename_cat_luxpurchase_category.py b/app/budget/migrations/0009_rename_cat_luxpurchase_category.py deleted file mode 100644 index c0efeff..0000000 --- a/app/budget/migrations/0009_rename_cat_luxpurchase_category.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 4.0.6 on 2022-11-12 13:16 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('budget', '0008_remove_luxpurchase_category'), - ] - - operations = [ - migrations.RenameField( - model_name='luxpurchase', - old_name='cat', - new_name='category', - ), - ] diff --git a/app/budget/migrations/0010_luxfixedmonthly_amount.py b/app/budget/migrations/0010_luxfixedmonthly_amount.py deleted file mode 100644 index 15461d4..0000000 --- a/app/budget/migrations/0010_luxfixedmonthly_amount.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 4.0.6 on 2022-11-13 10:48 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('budget', '0009_rename_cat_luxpurchase_category'), - ] - - operations = [ - migrations.AddField( - model_name='luxfixedmonthly', - name='amount', - field=models.DecimalField(decimal_places=2, max_digits=6, null=True), - ), - ] diff --git a/app/budget/migrations/0011_luxpaymentmethod_alter_luxfixedmonthly_amount_and_more.py b/app/budget/migrations/0011_luxpaymentmethod_alter_luxfixedmonthly_amount_and_more.py deleted file mode 100644 index 4186c52..0000000 --- a/app/budget/migrations/0011_luxpaymentmethod_alter_luxfixedmonthly_amount_and_more.py +++ /dev/null @@ -1,31 +0,0 @@ -# Generated by Django 4.0.6 on 2022-11-13 11:11 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('budget', '0010_luxfixedmonthly_amount'), - ] - - operations = [ - migrations.CreateModel( - name='LuxPaymentMethod', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=200)), - ], - ), - migrations.AlterField( - model_name='luxfixedmonthly', - name='amount', - field=models.DecimalField(decimal_places=2, max_digits=6), - ), - migrations.AddField( - model_name='luxfixedmonthly', - name='payment_method', - field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='budget.luxpaymentmethod'), - ), - ] diff --git a/app/budget/migrations/__init__.py b/app/budget/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/budget/models.py b/app/budget/models.py deleted file mode 100644 index 512b019..0000000 --- a/app/budget/models.py +++ /dev/null @@ -1,80 +0,0 @@ -import calendar -import datetime -from django.db import models -from django.db.models import Sum -from django.urls import reverse -from django.utils import timezone - - -class LuxSource(models.Model): - name = models.CharField(max_length=200) - date_recorded = models.DateTimeField(auto_now_add=True) - - def __str__(self): - return self.name - - -class LuxSpendingCategory(models.Model): - name = models.CharField(max_length=200) - date_recorded = models.DateTimeField(auto_now_add=True) - - def __str__(self): - return self.name - - -class LuxPaymentMethod(models.Model): - name = models.CharField(max_length=200) - - def __str__(self): - return self.name - - -class LuxFixedMonthly(models.Model): - name = models.CharField(max_length=200) - amount = models.DecimalField(max_digits=6, decimal_places=2) - source = models.ForeignKey(LuxSource, on_delete=models.CASCADE) - category = models.ForeignKey(LuxSpendingCategory, on_delete=models.CASCADE) - payment_method = models.ForeignKey(LuxPaymentMethod, null=True, on_delete=models.CASCADE) - date_recorded = models.DateTimeField(auto_now_add=True) - - def __str__(self): - return self.name - - -class LuxPurchaseStatsManager(models.Manager): - - def get_monthly_spending(self, month=timezone.now().month): - last_day = calendar.monthrange(timezone.now().year, month)[1] - start_date = datetime.date(timezone.now().year, month, 1) - end_date = datetime.date(timezone.now().year, month, last_day) - return self.filter(date_recorded__range=(start_date, end_date)).aggregate(Sum('amount')) - - def get_monthly_spending_by_category(self, cat, number_of_months=1): - cat = LuxSpendingCategory.objects.get(name=cat) - today = timezone.now() - month = today.replace(day=1).month - start_month = month - number_of_months + 1 - start_date = datetime.date(timezone.now().year, start_month, 1) - last_day = calendar.monthrange(timezone.now().year, month)[1] - end_date = datetime.date(timezone.now().year, month, last_day) - return self.filter(date_recorded__range=(start_date, end_date)).filter(category=cat).aggregate(Sum('amount')) - - -class LuxPurchase(models.Model): - amount = models.DecimalField(max_digits=6, decimal_places=2) - source = models.ForeignKey(LuxSource, on_delete=models.CASCADE) - category = models.ForeignKey(LuxSpendingCategory, null=True, on_delete=models.CASCADE) - date_recorded = models.DateTimeField(auto_now_add=True) - - class Meta: - ordering = ('-date_recorded',) - - def __str__(self): - return "%s - %s" %(self.amount, self.source.name) - - def get_absolute_url(self): - return reverse("luxbudget:detail", kwargs={"pk": self.pk}) - - objects = models.Manager() # The default manager. - stats = LuxPurchaseStatsManager() - diff --git a/app/budget/templates/budget/base.html b/app/budget/templates/budget/base.html deleted file mode 100644 index 9d6bfd0..0000000 --- a/app/budget/templates/budget/base.html +++ /dev/null @@ -1,35 +0,0 @@ - - - {% block pagetitle %}Luxagraf - Trading{% endblock %} - - - - {%block stylesheet%}{%endblock%} - - - {%block extrahead%}{%endblock%} - - - - - {% block content %} - {% endblock %} - - {% block js %} - {% endblock %} - - diff --git a/app/budget/templates/budget/create_cat_form.html b/app/budget/templates/budget/create_cat_form.html deleted file mode 100644 index 03e996a..0000000 --- a/app/budget/templates/budget/create_cat_form.html +++ /dev/null @@ -1,26 +0,0 @@ -{% extends 'budget/base.html' %} -{% load typogrify_tags %} - {% block pagetitle %}Luxagraf - Record Purchase{% endblock %} - {% block content %} -
{% csrf_token %} - {% for field in form %} -
- {{ field.errors }} - {% if field.name == 'status'%} - {{ field }} - {% else %} - {{ field.label_tag }} {{ field }} - {% endif %} - {% if field.help_text %} -

{{ field.help_text|safe }}

- {% endif %} -
-{% endfor %} -
- -
-
- {% endblock %} - - {% block js %} - {% endblock %} diff --git a/app/budget/templates/budget/create_form.html b/app/budget/templates/budget/create_form.html deleted file mode 100644 index 2d38acf..0000000 --- a/app/budget/templates/budget/create_form.html +++ /dev/null @@ -1,26 +0,0 @@ -{% extends 'budget/base.html' %} -{% load typogrify_tags %} - {% block pagetitle %}Luxagraf - Record Purchase{% endblock %} - {% block content %} -
{% csrf_token %} - {% for field in form %} -
- {{ field.errors }} - {% if field.name == 'status'%} - {{ field }} - {% else %} - {{ field.label_tag }} {{ field }} - {% endif %} - {% if field.help_text %} -

{{ field.help_text|safe }}

- {% endif %} -
-{% endfor %} -
- -
-
- {% endblock %} - - {% block js %} - {% endblock %} diff --git a/app/budget/templates/budget/luxpurchase_list.html b/app/budget/templates/budget/luxpurchase_list.html deleted file mode 100644 index c03f14d..0000000 --- a/app/budget/templates/budget/luxpurchase_list.html +++ /dev/null @@ -1,58 +0,0 @@ -{% extends 'budget/base.html' %} -{% load typogrify_tags %} - {% block pagetitle %}Luxagraf - Record Purchase{% endblock %} - {% block content %} - Add New -

Recent Purchases

- - - - - - - - - - {% for object in object_list %} - - - - - - - {% endfor %} - - - - - - - - - - - - - - - - - - - - - -
DateStoreCategoryAmount
{{object.date_recorded|date:"m/j"}}{{object.source.name}}{{object.category.name}}${{object.amount}}
 
{{month}} Total:${{monthly_spending.amount__sum}}
{{month}} Food Total:${{food_total.amount__sum}}
{{month}} Lodging Total:${{lodge_total.amount__sum}}
- -

Previous Monthly Spending

- {{month_1}}: {{monthly_spending_1.amount__sum}} - {{month_2}}: {{monthly_spending_2.amount__sum}} - {{month_3}}: {{monthly_spending_3.amount__sum}} - - -

Spending by Category (Last 3 Months)

- - {{cat.amount__sum}} - {% endblock %} - - diff --git a/app/budget/templates/budget/update_form.html b/app/budget/templates/budget/update_form.html deleted file mode 100644 index b19efaa..0000000 --- a/app/budget/templates/budget/update_form.html +++ /dev/null @@ -1,20 +0,0 @@ -{% extends 'budget/base.html' %} -{% load typogrify_tags %} -{% block content %} -
{% csrf_token %} - {% for field in form %} -
- {{ field.errors }} - {% if field.name == 'status'%} - {{ field }} - {% else %} - {{ field.label_tag }} {{ field }} - {% endif %} - {% if field.help_text %} -

{{ field.help_text|safe }}

- {% endif %} -
-{% endfor %} - -
- {% endblock %} diff --git a/app/budget/urls.py b/app/budget/urls.py deleted file mode 100644 index ef7852f..0000000 --- a/app/budget/urls.py +++ /dev/null @@ -1,29 +0,0 @@ -from django.urls import path, re_path - -from . import views - -app_name = "luxbudget" - -urlpatterns = [ - path( - 'cat', - views.LuxSourceModelFormView.as_view(), - name='createcatview' - ), - path( - 'record', - views.PurchaseModelFormView.as_view(), - name='createview' - ), - path( - 'purchase/', - views.PurchaseUpdateView.as_view(), - name='detail' - ), - path( - '', - views.LuxPurchaseListView.as_view(), - {'page':1}, - name='list' - ), -] diff --git a/app/budget/views.py b/app/budget/views.py deleted file mode 100644 index 6a34b1e..0000000 --- a/app/budget/views.py +++ /dev/null @@ -1,57 +0,0 @@ -import datetime -from django.shortcuts import render -from django.views.generic.edit import CreateView, UpdateView -from django.utils import timezone -from utils.views import PaginatedListView -from .models import LuxPurchase, LuxSource - -class LuxSourceModelFormView(CreateView): - model = LuxSource - fields = ['name'] - success_url = '/spending/' - template_name = 'budget/create_cat_form.html' - - -class PurchaseModelFormView(CreateView): - model = LuxPurchase - fields = ['amount', 'source', 'category'] - success_url = '/spending/' - template_name = 'budget/create_form.html' - - -class PurchaseUpdateView(UpdateView): - model = LuxPurchase - fields = ['amount', 'source', 'category'] - success_url = '/spending/' - template_name = 'budget/update_form.html' - - -class LuxPurchaseListView(PaginatedListView): - model = LuxPurchase - - def get_queryset(self): - queryset = super(LuxPurchaseListView, self).get_queryset() - return queryset[:30] - - def get_context_data(self, **kwargs): - ''' - Get Monthly Spending for a nice bar chart - ''' - # Call the base implementation first to get a context - context = super(LuxPurchaseListView, self).get_context_data(**kwargs) - context['monthly_spending'] = LuxPurchase.stats.get_monthly_spending() - today = timezone.now() - first = today.replace(day=1) - month_1 = first - datetime.timedelta(days=1) - month_2 = month_1.replace(day=1) - datetime.timedelta(days=1) - month_3 = month_2.replace(day=1) - datetime.timedelta(days=1) - context['month'] = today.strftime('%h') - context['monthly_spending_1'] = LuxPurchase.stats.get_monthly_spending(month_1.month) - context['month_1'] = month_1.strftime('%h') - context['monthly_spending_2'] = LuxPurchase.stats.get_monthly_spending(month_2.month) - context['month_2'] = month_2.strftime('%h') - context['monthly_spending_3'] = LuxPurchase.stats.get_monthly_spending(month_3.month) - context['month_3'] = month_3.strftime('%h') - context['food_total'] = LuxPurchase.stats.get_monthly_spending_by_category("Grocery/Home", 1) - context['lodge_total'] = LuxPurchase.stats.get_monthly_spending_by_category("Lodging", 1) - return context diff --git a/app/builder/views.py b/app/builder/views.py index 211b585..6621bc2 100644 --- a/app/builder/views.py +++ b/app/builder/views.py @@ -2,7 +2,7 @@ from django.shortcuts import render from django.template import RequestContext #from builder.base import BuildWriting, BuildWritingFeed, BuildMap, BuildPhotos, BuildProjects, BuildSitemap #from jrnl.build import archive_builder, detail_builder, home_builder, rss_builder, map_builder -from resume.build import pub_builder, resume_builder +#from resume.build import pub_builder, resume_builder from books.build import builder as book_builder from sightings.build import builder as sightings_builder from pages.build import BuildPages, BuildHome diff --git a/app/resume/admin.py b/app/resume/admin.py deleted file mode 100644 index 8646cca..0000000 --- a/app/resume/admin.py +++ /dev/null @@ -1,59 +0,0 @@ -from django.contrib import admin - -from utils.widgets import LGEntryForm -from .models import Publisher, PubItem, Job, Resume - - -@admin.register(Job) -class JobAdmin(admin.ModelAdmin): - pass - - -@admin.register(Resume) -class ResumeAdmin(admin.ModelAdmin): - fieldsets = ( - ('', { - 'fields': ( - 'title', - 'profile', - 'skills', - 'jobs', - 'slug', - ), - 'classes': ( - 'show', - 'extrapretty', - 'wide' - ) - } - ), - ) - - -@admin.register(Publisher) -class PublisherAdmin(admin.ModelAdmin): - pass - - -@admin.register(PubItem) -class PubItemAdmin(admin.ModelAdmin): - form = LGEntryForm - list_display = ('title', 'pub_date', 'publisher', 'admin_link') - fieldsets = ( - ('', { - 'fields': ( - 'title', - 'body_markdown', - 'slug', - 'pub_date', - 'url', - 'publisher', - ), - 'classes': ( - 'show', - 'extrapretty', - 'wide' - ) - } - ), - ) diff --git a/app/resume/build.py b/app/resume/build.py deleted file mode 100644 index 4f051d5..0000000 --- a/app/resume/build.py +++ /dev/null @@ -1,75 +0,0 @@ -import os -from django.urls import reverse -from builder.base import BuildNew -from pages.models import Page - -from .models import Publisher - - -class BuildPubs(BuildNew): - - def build(self): - self.build_detail_view() - self.build_publisher_list() - self.build_list_view( - base_path=reverse("resume:list"), - paginate_by=9999 - ) - - def get_model_queryset(self): - return self.model.objects.all() - - def build_detail_view(self): - for obj in self.get_model_queryset(): - url = obj.get_absolute_url() - print(url) - path, slug = os.path.split(url) - path = '%s/' % path - # write html - response = self.client.get(url) - print(path, slug) - self.write_file(path, response.content, filename=slug) - - def build_publisher_list(self): - publishers = Publisher.objects.all() - for publisher in publishers: - self.build_list_view( - base_path=reverse("resume:list_by_publisher", kwargs={'publisher': publisher.slug, }), - paginate_by=9999 - ) - - -class BuildResume(BuildNew): - - def build(self): - self.build_pages() - - def get_model_queryset(self): - return self.model.objects.all() - - def build_pages(self): - ''' - build out /work/index.html and work/resume.html - ''' - pages = self.get_model_queryset().filter(app="resume", build=True) - for obj in pages: - path = "work/" - if obj.slug == "profile": - url = '/work/' - slug = "index" - else: - url = "/%s%s/" % (path, obj.slug) - slug = obj.slug - # write html - response = self.client.get(url, HTTP_HOST='127.0.0.1') - self.write_file(path, response.content, filename=slug) - - -def pub_builder(): - j = BuildPubs("resume", "pubitem") - j.build() - - -def resume_builder(): - j = BuildResume("pages", "page") - j.build() diff --git a/app/resume/migrations/0001_initial.py b/app/resume/migrations/0001_initial.py deleted file mode 100644 index 14c9348..0000000 --- a/app/resume/migrations/0001_initial.py +++ /dev/null @@ -1,49 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2015-12-07 21:04 -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='PubItem', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(max_length=200)), - ('slug', models.CharField(max_length=50)), - ('body_markdown', models.TextField(blank=True, null=True)), - ('body_html', models.TextField(blank=True, null=True)), - ('url', models.CharField(blank=True, max_length=200, null=True)), - ('pub_date', models.DateTimeField(verbose_name='Date published')), - ], - options={ - 'ordering': ('-pub_date',), - }, - ), - migrations.CreateModel( - name='Publisher', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=200)), - ('slug', models.SlugField()), - ('body_markdown', models.TextField(blank=True, null=True)), - ('body_html', models.TextField(blank=True, null=True)), - ('url', models.CharField(blank=True, max_length=200, null=True)), - ('payment_time', models.DecimalField(decimal_places=0, max_digits=2)), - ], - ), - migrations.AddField( - model_name='pubitem', - name='publisher', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='resume.Publisher'), - ), - ] diff --git a/app/resume/migrations/0002_auto_20151207_2105.py b/app/resume/migrations/0002_auto_20151207_2105.py deleted file mode 100644 index 7ac653f..0000000 --- a/app/resume/migrations/0002_auto_20151207_2105.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2015-12-07 21:05 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('resume', '0001_initial'), - ] - - operations = [ - migrations.AlterModelOptions( - name='publisher', - options={'ordering': ('-order',)}, - ), - migrations.AddField( - model_name='publisher', - name='order', - field=models.DecimalField(decimal_places=0, default=1, max_digits=1), - preserve_default=False, - ), - ] diff --git a/app/resume/migrations/0003_auto_20151211_1925.py b/app/resume/migrations/0003_auto_20151211_1925.py deleted file mode 100644 index 77e3049..0000000 --- a/app/resume/migrations/0003_auto_20151211_1925.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2015-12-11 19:25 -from __future__ import unicode_literals - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('resume', '0002_auto_20151207_2105'), - ] - - operations = [ - migrations.AlterModelOptions( - name='publisher', - options={'ordering': ('order',)}, - ), - ] diff --git a/app/resume/migrations/0004_job_resume.py b/app/resume/migrations/0004_job_resume.py deleted file mode 100644 index e056fec..0000000 --- a/app/resume/migrations/0004_job_resume.py +++ /dev/null @@ -1,37 +0,0 @@ -# Generated by Django 2.1.1 on 2019-01-12 12:45 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('resume', '0003_auto_20151211_1925'), - ] - - operations = [ - migrations.CreateModel( - name='Job', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(max_length=200)), - ('employer', models.CharField(max_length=200)), - ('date_start', models.DateField(verbose_name='Date Start')), - ('date_end', models.DateField(blank=True, null=True, verbose_name='Date End')), - ('body_markdown', models.TextField(blank=True, null=True)), - ], - options={ - 'ordering': ('-date_end',), - }, - ), - migrations.CreateModel( - name='Resume', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(max_length=200)), - ('profile', models.TextField()), - ('skills', models.TextField()), - ('experience', models.ManyToManyField(to='resume.Job')), - ], - ), - ] diff --git a/app/resume/migrations/0005_job_slug.py b/app/resume/migrations/0005_job_slug.py deleted file mode 100644 index d18baeb..0000000 --- a/app/resume/migrations/0005_job_slug.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.1.1 on 2019-01-12 12:56 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('resume', '0004_job_resume'), - ] - - operations = [ - migrations.AddField( - model_name='job', - name='slug', - field=models.CharField(blank=True, max_length=50), - ), - ] diff --git a/app/resume/migrations/0006_auto_20190112_1257.py b/app/resume/migrations/0006_auto_20190112_1257.py deleted file mode 100644 index 9ee8f1b..0000000 --- a/app/resume/migrations/0006_auto_20190112_1257.py +++ /dev/null @@ -1,22 +0,0 @@ -# Generated by Django 2.1.1 on 2019-01-12 12:57 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('resume', '0005_job_slug'), - ] - - operations = [ - migrations.RemoveField( - model_name='job', - name='slug', - ), - migrations.AddField( - model_name='resume', - name='slug', - field=models.CharField(blank=True, max_length=50), - ), - ] diff --git a/app/resume/migrations/0007_auto_20190113_1128.py b/app/resume/migrations/0007_auto_20190113_1128.py deleted file mode 100644 index a635258..0000000 --- a/app/resume/migrations/0007_auto_20190113_1128.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.1.1 on 2019-01-13 11:28 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('resume', '0006_auto_20190112_1257'), - ] - - operations = [ - migrations.AlterField( - model_name='job', - name='employer', - field=models.CharField(max_length=200, null=True), - ), - ] diff --git a/app/resume/migrations/0008_auto_20190113_1139.py b/app/resume/migrations/0008_auto_20190113_1139.py deleted file mode 100644 index 29d975d..0000000 --- a/app/resume/migrations/0008_auto_20190113_1139.py +++ /dev/null @@ -1,24 +0,0 @@ -# Generated by Django 2.1.1 on 2019-01-13 11:39 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('resume', '0007_auto_20190113_1128'), - ] - - operations = [ - migrations.RenameField( - model_name='resume', - old_name='experience', - new_name='jobs', - ), - migrations.AlterField( - model_name='job', - name='employer', - field=models.CharField(blank=True, default='', max_length=200), - preserve_default=False, - ), - ] diff --git a/app/resume/migrations/0009_job_body_html.py b/app/resume/migrations/0009_job_body_html.py deleted file mode 100644 index fdeea15..0000000 --- a/app/resume/migrations/0009_job_body_html.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.1.1 on 2019-01-13 11:46 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('resume', '0008_auto_20190113_1139'), - ] - - operations = [ - migrations.AddField( - model_name='job', - name='body_html', - field=models.TextField(blank=True, null=True), - ), - ] diff --git a/app/resume/migrations/0010_auto_20190113_1147.py b/app/resume/migrations/0010_auto_20190113_1147.py deleted file mode 100644 index 879bd55..0000000 --- a/app/resume/migrations/0010_auto_20190113_1147.py +++ /dev/null @@ -1,25 +0,0 @@ -# Generated by Django 2.1.1 on 2019-01-13 11:47 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('resume', '0009_job_body_html'), - ] - - operations = [ - migrations.AlterField( - model_name='job', - name='body_html', - field=models.TextField(blank=True, default=''), - preserve_default=False, - ), - migrations.AlterField( - model_name='job', - name='body_markdown', - field=models.TextField(blank=True, default=''), - preserve_default=False, - ), - ] diff --git a/app/resume/migrations/0011_auto_20190114_0227.py b/app/resume/migrations/0011_auto_20190114_0227.py deleted file mode 100644 index 7656c6e..0000000 --- a/app/resume/migrations/0011_auto_20190114_0227.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 2.1.1 on 2019-01-14 02:27 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('resume', '0010_auto_20190113_1147'), - ] - - operations = [ - migrations.AddField( - model_name='resume', - name='profile_html', - field=models.TextField(blank=True), - ), - migrations.AddField( - model_name='resume', - name='skills_html', - field=models.TextField(blank=True), - ), - ] diff --git a/app/resume/migrations/__init__.py b/app/resume/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/resume/models.py b/app/resume/models.py deleted file mode 100644 index bac3115..0000000 --- a/app/resume/models.py +++ /dev/null @@ -1,98 +0,0 @@ -from django.db import models -from django.utils.encoding import force_str -from django.urls import reverse -from django.template.defaultfilters import slugify - -from utils.util import markdown_to_html - - -class Publisher(models.Model): - name = models.CharField(max_length=200) - slug = models.SlugField(max_length=50) - body_markdown = models.TextField(null=True, blank=True) - body_html = models.TextField(null=True, blank=True) - url = models.CharField(max_length=200, blank=True, null=True) - payment_time = models.DecimalField(max_digits=2, decimal_places=0) - order = models.DecimalField(max_digits=1, decimal_places=0) - - class Meta: - ordering = ('order',) - - def __str__(self): - return self.name - - def save(self, *args, **kwargs): - if self.body_markdown: - self.body_html = markdown_to_html(self.body_markdown) - super(Publisher, self).save() - - -class PubItem(models.Model): - title = models.CharField(max_length=200) - slug = models.CharField(max_length=50) - body_markdown = models.TextField(null=True, blank=True) - body_html = models.TextField(null=True, blank=True) - url = models.CharField(max_length=200, blank=True, null=True) - pub_date = models.DateTimeField('Date published') - publisher = models.ForeignKey(Publisher, on_delete=models.CASCADE) - - class Meta: - ordering = ('-pub_date',) - - def __str__(self): - return self.title - - def get_absolute_url(self): - return reverse("resume:detail", kwargs={"publisher": self.publisher.slug, "slug": self.slug}) - - def admin_link(self): - return force_str('Visit Site' % (self.url)) - admin_link.allow_tags = True - admin_link.short_description = 'Live Article' - - def save(self, *args, **kwargs): - if self.body_markdown: - self.body_html = markdown_to_html(self.body_markdown) - super(PubItem, self).save() - - -class Job(models.Model): - title = models.CharField(max_length=200) - employer = models.CharField(max_length=200, blank=True) - date_start = models.DateField('Date Start') - date_end = models.DateField('Date End', null=True, blank=True) - body_markdown = models.TextField(blank=True) - body_html = models.TextField(blank=True) - - class Meta: - ordering = ('-date_end',) - - def __str__(self): - return '{} - {}'.format(self.title, self.employer) # py3.1+ only - - def save(self, *args, **kwargs): - if self.body_markdown: - self.body_html = markdown_to_html(self.body_markdown) - super(Job, self).save() - - -class Resume(models.Model): - title = models.CharField(max_length=200) - slug = models.CharField(max_length=50, blank=True) - profile = models.TextField() - profile_html = models.TextField(blank=True) - skills = models.TextField() - skills_html = models.TextField(blank=True) - jobs = models.ManyToManyField(Job) - - def __str__(self): - return self.title - - def save(self, *args, **kwargs): - if self._state.adding and not self.slug: - self.slug = slugify(self.title) - if self.skills: - self.skills_html = markdown_to_html(self.skills) - if self.profile: - self.profile_html = markdown_to_html(self.profile) - super(Resume, self).save() diff --git a/app/resume/urls.py b/app/resume/urls.py deleted file mode 100644 index de95866..0000000 --- a/app/resume/urls.py +++ /dev/null @@ -1,48 +0,0 @@ -from django.urls import path, re_path -from django.views.generic.base import RedirectView - -from . import views - -app_name = "resume" - -urlpatterns = [ - path( - r'pubs///', - views.ByPublisherListView.as_view(), - name='list_by_publisher', - ), - path( - r'pubs//', - views.ByPublisherListView.as_view(), - {'page': 1}, - name='list_by_publisher', - ), - path( - r'pubs//', - views.PublisherListView.as_view(), - name='list', - ), - path( - r'pubs/', - views.PublisherListView.as_view(), - {'page': 1}, - name="list" - ), - path( - r'pubs//', - views.PubItemDetailView.as_view(), - name='detail', - ), - path( - r'/', - views.PageView.as_view(), - {'path': 'work'}, - name="pages" - ), - path( - r'', - views.PageView.as_view(), - {'path': 'work', 'slug': 'profile'}, - name="pages" - ), -] diff --git a/app/resume/views.py b/app/resume/views.py deleted file mode 100644 index 3d0cd8d..0000000 --- a/app/resume/views.py +++ /dev/null @@ -1,60 +0,0 @@ -from django.views.generic.detail import DetailView -from django.views.generic.base import TemplateView -from django.shortcuts import get_object_or_404 -from utils.views import PaginatedListView - -from .models import PubItem, Publisher, Resume -from pages.models import Page - - -class PublisherListView(PaginatedListView): - model = Publisher - template_name = 'archives/resume-pubs.html' - - def get_queryset(self): - return PubItem.objects.all() - - def get_context_data(self, **kwargs): - # Call the base implementation first to get a context - context = super(PublisherListView, self).get_context_data(**kwargs) - context['pub_list'] = Publisher.objects.all() - return context - - -class ByPublisherListView(PaginatedListView): - template_name = 'archives/resume-pubs-by-pub.html' - - def get_queryset(self): - print(self.kwargs['publisher']) - return PubItem.objects.filter(publisher__slug=self.kwargs['publisher']) - - def get_context_data(self, **kwargs): - # Call the base implementation first to get a context - context = super(ByPublisherListView, self).get_context_data(**kwargs) - context['publisher'] = Publisher.objects.get(slug=self.kwargs['publisher']) - return context - - -class PubItemDetailView(DetailView): - model = PubItem - template_name = "details/pubs.html" - slug_field = "slug" - - -class PageView(DetailView): - model = Page - slug_field = "slug" - - def get_object(self, **kwargs): - print("calling page view") - return get_object_or_404(Page, path=self.kwargs['path'], slug=self.kwargs['slug']) - - def get_template_names(self): - return ["details/%s.html" % self.object.slug, 'details/page.html'] - - def get_context_data(self, **kwargs): - # Call the base implementation first to get a context - context = super(PageView, self).get_context_data(**kwargs) - if self.kwargs['slug'] == 'resume': - context['resume'] = Resume.objects.get(title='base') - return context diff --git a/bak/unused_apps/budget/0007_luxpurchase_cat.py b/bak/unused_apps/budget/0007_luxpurchase_cat.py new file mode 100644 index 0000000..b7bb553 --- /dev/null +++ b/bak/unused_apps/budget/0007_luxpurchase_cat.py @@ -0,0 +1,20 @@ +# Generated by Django 4.0.6 on 2022-11-12 12:53 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('budget', '0006_remove_luxfixedmonthly_cat_and_more'), + ] + + operations = [ + migrations.AddField( + model_name='luxpurchase', + name='cat', + field=models.ForeignKey(default='Grocery & Home', on_delete=django.db.models.deletion.CASCADE, to='budget.luxspendingcategory'), + preserve_default=False, + ), + ] diff --git a/bak/unused_apps/budget/admin.py b/bak/unused_apps/budget/admin.py new file mode 100644 index 0000000..0f578fb --- /dev/null +++ b/bak/unused_apps/budget/admin.py @@ -0,0 +1,32 @@ +from django.contrib import admin +from .models import LuxSource, LuxPurchase, LuxSpendingCategory, LuxFixedMonthly, LuxPaymentMethod + + +@admin.register(LuxSpendingCategory) +class SourceAdmin(admin.ModelAdmin): + list_display = ('name',) + + +@admin.register(LuxSource) +class SourceAdmin(admin.ModelAdmin): + list_display = ('name',) + + +@admin.register(LuxPurchase) +class PurchaseAdmin(admin.ModelAdmin): + list_display = ('source', 'amount', 'category' ) + search_fields = ['source', 'amount'] + list_filter = ('category',) + + class Media: + js = ('next-prev-links.js',) + + +@admin.register(LuxFixedMonthly) +class LuxFixedMonthlyAdmin(admin.ModelAdmin): + list_display = ('name', 'amount', 'category', 'payment_method') + + +@admin.register(LuxPaymentMethod) +class LuxPaymentMethodAdmin(admin.ModelAdmin): + list_display = ('name',) diff --git a/bak/unused_apps/budget/migrations/0001_initial.py b/bak/unused_apps/budget/migrations/0001_initial.py new file mode 100644 index 0000000..30bd5a1 --- /dev/null +++ b/bak/unused_apps/budget/migrations/0001_initial.py @@ -0,0 +1,36 @@ +# Generated by Django 4.0.6 on 2022-11-11 17:50 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='LuxSource', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=200)), + ('date_recorded', models.DateTimeField(auto_now_add=True)), + ], + ), + migrations.CreateModel( + name='LuxPurchase', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('amount', models.IntegerField()), + ('category', models.IntegerField(choices=[(0, 'Grocery and Home'), (1, 'Gas'), (2, 'Bus'), (3, 'Lodging'), (4, 'Books'), (5, 'Clothes'), (6, 'Eating Out'), (7, 'Misc')], default=0)), + ('date_recorded', models.DateTimeField(auto_now_add=True)), + ('source', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='budget.luxsource')), + ], + options={ + 'ordering': ('-date_recorded',), + }, + ), + ] diff --git a/bak/unused_apps/budget/migrations/0002_alter_luxpurchase_amount.py b/bak/unused_apps/budget/migrations/0002_alter_luxpurchase_amount.py new file mode 100644 index 0000000..06400dd --- /dev/null +++ b/bak/unused_apps/budget/migrations/0002_alter_luxpurchase_amount.py @@ -0,0 +1,18 @@ +# Generated by Django 4.0.6 on 2022-11-11 18:06 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('budget', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='luxpurchase', + name='amount', + field=models.DecimalField(decimal_places=2, max_digits=6), + ), + ] diff --git a/bak/unused_apps/budget/migrations/0003_alter_luxpurchase_category_alter_luxpurchase_source.py b/bak/unused_apps/budget/migrations/0003_alter_luxpurchase_category_alter_luxpurchase_source.py new file mode 100644 index 0000000..a880acf --- /dev/null +++ b/bak/unused_apps/budget/migrations/0003_alter_luxpurchase_category_alter_luxpurchase_source.py @@ -0,0 +1,23 @@ +# Generated by Django 4.0.6 on 2022-11-12 10:18 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('budget', '0002_alter_luxpurchase_amount'), + ] + + operations = [ + migrations.AlterField( + model_name='luxpurchase', + name='category', + field=models.IntegerField(choices=[(0, 'Grocery & Home'), (1, 'Gas'), (2, 'Bus'), (3, 'Lodging'), (4, 'Books'), (5, 'Clothes'), (6, 'Eating Out'), (7, 'Misc')], default=0), + ), + migrations.AlterField( + model_name='luxpurchase', + name='source', + field=models.IntegerField(choices=[(0, 'Walmart'), (1, 'Grocery Store'), (2, 'Gas Station'), (3, 'Amazon')], default=0), + ), + ] diff --git a/bak/unused_apps/budget/migrations/0004_alter_luxpurchase_source.py b/bak/unused_apps/budget/migrations/0004_alter_luxpurchase_source.py new file mode 100644 index 0000000..0eab270 --- /dev/null +++ b/bak/unused_apps/budget/migrations/0004_alter_luxpurchase_source.py @@ -0,0 +1,19 @@ +# Generated by Django 4.0.6 on 2022-11-12 10:46 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('budget', '0003_alter_luxpurchase_category_alter_luxpurchase_source'), + ] + + operations = [ + migrations.AlterField( + model_name='luxpurchase', + name='source', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='budget.luxsource'), + ), + ] diff --git a/bak/unused_apps/budget/migrations/0005_luxspendingcategory_luxfixedmonthly.py b/bak/unused_apps/budget/migrations/0005_luxspendingcategory_luxfixedmonthly.py new file mode 100644 index 0000000..66af470 --- /dev/null +++ b/bak/unused_apps/budget/migrations/0005_luxspendingcategory_luxfixedmonthly.py @@ -0,0 +1,33 @@ +# Generated by Django 4.0.6 on 2022-11-12 12:52 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('budget', '0004_alter_luxpurchase_source'), + ] + + operations = [ + migrations.CreateModel( + name='LuxSpendingCategory', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=200)), + ('date_recorded', models.DateTimeField(auto_now_add=True)), + ], + ), + migrations.CreateModel( + name='LuxFixedMonthly', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=200)), + ('category', models.IntegerField(choices=[(0, 'Grocery & Home'), (1, 'Gas'), (2, 'Bus'), (3, 'Lodging'), (4, 'Books'), (5, 'Clothes'), (6, 'Eating Out'), (7, 'Misc')], default=0)), + ('date_recorded', models.DateTimeField(auto_now_add=True)), + ('cat', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='budget.luxspendingcategory')), + ('source', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='budget.luxsource')), + ], + ), + ] diff --git a/bak/unused_apps/budget/migrations/0006_remove_luxfixedmonthly_cat_and_more.py b/bak/unused_apps/budget/migrations/0006_remove_luxfixedmonthly_cat_and_more.py new file mode 100644 index 0000000..3631cc3 --- /dev/null +++ b/bak/unused_apps/budget/migrations/0006_remove_luxfixedmonthly_cat_and_more.py @@ -0,0 +1,23 @@ +# Generated by Django 4.0.6 on 2022-11-12 12:53 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('budget', '0005_luxspendingcategory_luxfixedmonthly'), + ] + + operations = [ + migrations.RemoveField( + model_name='luxfixedmonthly', + name='cat', + ), + migrations.AlterField( + model_name='luxfixedmonthly', + name='category', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='budget.luxspendingcategory'), + ), + ] diff --git a/bak/unused_apps/budget/migrations/0007_luxpurchase_cat.py b/bak/unused_apps/budget/migrations/0007_luxpurchase_cat.py new file mode 100644 index 0000000..7a8e548 --- /dev/null +++ b/bak/unused_apps/budget/migrations/0007_luxpurchase_cat.py @@ -0,0 +1,19 @@ +# Generated by Django 4.0.6 on 2022-11-12 12:56 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('budget', '0006_remove_luxfixedmonthly_cat_and_more'), + ] + + operations = [ + migrations.AddField( + model_name='luxpurchase', + name='cat', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='budget.luxspendingcategory'), + ), + ] diff --git a/bak/unused_apps/budget/migrations/0008_remove_luxpurchase_category.py b/bak/unused_apps/budget/migrations/0008_remove_luxpurchase_category.py new file mode 100644 index 0000000..7e2a0b9 --- /dev/null +++ b/bak/unused_apps/budget/migrations/0008_remove_luxpurchase_category.py @@ -0,0 +1,17 @@ +# Generated by Django 4.0.6 on 2022-11-12 13:15 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('budget', '0007_luxpurchase_cat'), + ] + + operations = [ + migrations.RemoveField( + model_name='luxpurchase', + name='category', + ), + ] diff --git a/bak/unused_apps/budget/migrations/0009_rename_cat_luxpurchase_category.py b/bak/unused_apps/budget/migrations/0009_rename_cat_luxpurchase_category.py new file mode 100644 index 0000000..c0efeff --- /dev/null +++ b/bak/unused_apps/budget/migrations/0009_rename_cat_luxpurchase_category.py @@ -0,0 +1,18 @@ +# Generated by Django 4.0.6 on 2022-11-12 13:16 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('budget', '0008_remove_luxpurchase_category'), + ] + + operations = [ + migrations.RenameField( + model_name='luxpurchase', + old_name='cat', + new_name='category', + ), + ] diff --git a/bak/unused_apps/budget/migrations/0010_luxfixedmonthly_amount.py b/bak/unused_apps/budget/migrations/0010_luxfixedmonthly_amount.py new file mode 100644 index 0000000..15461d4 --- /dev/null +++ b/bak/unused_apps/budget/migrations/0010_luxfixedmonthly_amount.py @@ -0,0 +1,18 @@ +# Generated by Django 4.0.6 on 2022-11-13 10:48 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('budget', '0009_rename_cat_luxpurchase_category'), + ] + + operations = [ + migrations.AddField( + model_name='luxfixedmonthly', + name='amount', + field=models.DecimalField(decimal_places=2, max_digits=6, null=True), + ), + ] diff --git a/bak/unused_apps/budget/migrations/0011_luxpaymentmethod_alter_luxfixedmonthly_amount_and_more.py b/bak/unused_apps/budget/migrations/0011_luxpaymentmethod_alter_luxfixedmonthly_amount_and_more.py new file mode 100644 index 0000000..4186c52 --- /dev/null +++ b/bak/unused_apps/budget/migrations/0011_luxpaymentmethod_alter_luxfixedmonthly_amount_and_more.py @@ -0,0 +1,31 @@ +# Generated by Django 4.0.6 on 2022-11-13 11:11 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('budget', '0010_luxfixedmonthly_amount'), + ] + + operations = [ + migrations.CreateModel( + name='LuxPaymentMethod', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=200)), + ], + ), + migrations.AlterField( + model_name='luxfixedmonthly', + name='amount', + field=models.DecimalField(decimal_places=2, max_digits=6), + ), + migrations.AddField( + model_name='luxfixedmonthly', + name='payment_method', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='budget.luxpaymentmethod'), + ), + ] diff --git a/bak/unused_apps/budget/migrations/__init__.py b/bak/unused_apps/budget/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/bak/unused_apps/budget/models.py b/bak/unused_apps/budget/models.py new file mode 100644 index 0000000..512b019 --- /dev/null +++ b/bak/unused_apps/budget/models.py @@ -0,0 +1,80 @@ +import calendar +import datetime +from django.db import models +from django.db.models import Sum +from django.urls import reverse +from django.utils import timezone + + +class LuxSource(models.Model): + name = models.CharField(max_length=200) + date_recorded = models.DateTimeField(auto_now_add=True) + + def __str__(self): + return self.name + + +class LuxSpendingCategory(models.Model): + name = models.CharField(max_length=200) + date_recorded = models.DateTimeField(auto_now_add=True) + + def __str__(self): + return self.name + + +class LuxPaymentMethod(models.Model): + name = models.CharField(max_length=200) + + def __str__(self): + return self.name + + +class LuxFixedMonthly(models.Model): + name = models.CharField(max_length=200) + amount = models.DecimalField(max_digits=6, decimal_places=2) + source = models.ForeignKey(LuxSource, on_delete=models.CASCADE) + category = models.ForeignKey(LuxSpendingCategory, on_delete=models.CASCADE) + payment_method = models.ForeignKey(LuxPaymentMethod, null=True, on_delete=models.CASCADE) + date_recorded = models.DateTimeField(auto_now_add=True) + + def __str__(self): + return self.name + + +class LuxPurchaseStatsManager(models.Manager): + + def get_monthly_spending(self, month=timezone.now().month): + last_day = calendar.monthrange(timezone.now().year, month)[1] + start_date = datetime.date(timezone.now().year, month, 1) + end_date = datetime.date(timezone.now().year, month, last_day) + return self.filter(date_recorded__range=(start_date, end_date)).aggregate(Sum('amount')) + + def get_monthly_spending_by_category(self, cat, number_of_months=1): + cat = LuxSpendingCategory.objects.get(name=cat) + today = timezone.now() + month = today.replace(day=1).month + start_month = month - number_of_months + 1 + start_date = datetime.date(timezone.now().year, start_month, 1) + last_day = calendar.monthrange(timezone.now().year, month)[1] + end_date = datetime.date(timezone.now().year, month, last_day) + return self.filter(date_recorded__range=(start_date, end_date)).filter(category=cat).aggregate(Sum('amount')) + + +class LuxPurchase(models.Model): + amount = models.DecimalField(max_digits=6, decimal_places=2) + source = models.ForeignKey(LuxSource, on_delete=models.CASCADE) + category = models.ForeignKey(LuxSpendingCategory, null=True, on_delete=models.CASCADE) + date_recorded = models.DateTimeField(auto_now_add=True) + + class Meta: + ordering = ('-date_recorded',) + + def __str__(self): + return "%s - %s" %(self.amount, self.source.name) + + def get_absolute_url(self): + return reverse("luxbudget:detail", kwargs={"pk": self.pk}) + + objects = models.Manager() # The default manager. + stats = LuxPurchaseStatsManager() + diff --git a/bak/unused_apps/budget/templates/budget/base.html b/bak/unused_apps/budget/templates/budget/base.html new file mode 100644 index 0000000..9d6bfd0 --- /dev/null +++ b/bak/unused_apps/budget/templates/budget/base.html @@ -0,0 +1,35 @@ + + + {% block pagetitle %}Luxagraf - Trading{% endblock %} + + + + {%block stylesheet%}{%endblock%} + + + {%block extrahead%}{%endblock%} + + + + + {% block content %} + {% endblock %} + + {% block js %} + {% endblock %} + + diff --git a/bak/unused_apps/budget/templates/budget/create_cat_form.html b/bak/unused_apps/budget/templates/budget/create_cat_form.html new file mode 100644 index 0000000..03e996a --- /dev/null +++ b/bak/unused_apps/budget/templates/budget/create_cat_form.html @@ -0,0 +1,26 @@ +{% extends 'budget/base.html' %} +{% load typogrify_tags %} + {% block pagetitle %}Luxagraf - Record Purchase{% endblock %} + {% block content %} +
{% csrf_token %} + {% for field in form %} +
+ {{ field.errors }} + {% if field.name == 'status'%} + {{ field }} + {% else %} + {{ field.label_tag }} {{ field }} + {% endif %} + {% if field.help_text %} +

{{ field.help_text|safe }}

+ {% endif %} +
+{% endfor %} +
+ +
+
+ {% endblock %} + + {% block js %} + {% endblock %} diff --git a/bak/unused_apps/budget/templates/budget/create_form.html b/bak/unused_apps/budget/templates/budget/create_form.html new file mode 100644 index 0000000..2d38acf --- /dev/null +++ b/bak/unused_apps/budget/templates/budget/create_form.html @@ -0,0 +1,26 @@ +{% extends 'budget/base.html' %} +{% load typogrify_tags %} + {% block pagetitle %}Luxagraf - Record Purchase{% endblock %} + {% block content %} +
{% csrf_token %} + {% for field in form %} +
+ {{ field.errors }} + {% if field.name == 'status'%} + {{ field }} + {% else %} + {{ field.label_tag }} {{ field }} + {% endif %} + {% if field.help_text %} +

{{ field.help_text|safe }}

+ {% endif %} +
+{% endfor %} +
+ +
+
+ {% endblock %} + + {% block js %} + {% endblock %} diff --git a/bak/unused_apps/budget/templates/budget/luxpurchase_list.html b/bak/unused_apps/budget/templates/budget/luxpurchase_list.html new file mode 100644 index 0000000..c03f14d --- /dev/null +++ b/bak/unused_apps/budget/templates/budget/luxpurchase_list.html @@ -0,0 +1,58 @@ +{% extends 'budget/base.html' %} +{% load typogrify_tags %} + {% block pagetitle %}Luxagraf - Record Purchase{% endblock %} + {% block content %} + Add New +

Recent Purchases

+ + + + + + + + + + {% for object in object_list %} + + + + + + + {% endfor %} + + + + + + + + + + + + + + + + + + + + + +
DateStoreCategoryAmount
{{object.date_recorded|date:"m/j"}}{{object.source.name}}{{object.category.name}}${{object.amount}}
 
{{month}} Total:${{monthly_spending.amount__sum}}
{{month}} Food Total:${{food_total.amount__sum}}
{{month}} Lodging Total:${{lodge_total.amount__sum}}
+ +

Previous Monthly Spending

+ {{month_1}}: {{monthly_spending_1.amount__sum}} + {{month_2}}: {{monthly_spending_2.amount__sum}} + {{month_3}}: {{monthly_spending_3.amount__sum}} + + +

Spending by Category (Last 3 Months)

+ + {{cat.amount__sum}} + {% endblock %} + + diff --git a/bak/unused_apps/budget/templates/budget/update_form.html b/bak/unused_apps/budget/templates/budget/update_form.html new file mode 100644 index 0000000..b19efaa --- /dev/null +++ b/bak/unused_apps/budget/templates/budget/update_form.html @@ -0,0 +1,20 @@ +{% extends 'budget/base.html' %} +{% load typogrify_tags %} +{% block content %} +
{% csrf_token %} + {% for field in form %} +
+ {{ field.errors }} + {% if field.name == 'status'%} + {{ field }} + {% else %} + {{ field.label_tag }} {{ field }} + {% endif %} + {% if field.help_text %} +

{{ field.help_text|safe }}

+ {% endif %} +
+{% endfor %} + +
+ {% endblock %} diff --git a/bak/unused_apps/budget/urls.py b/bak/unused_apps/budget/urls.py new file mode 100644 index 0000000..ef7852f --- /dev/null +++ b/bak/unused_apps/budget/urls.py @@ -0,0 +1,29 @@ +from django.urls import path, re_path + +from . import views + +app_name = "luxbudget" + +urlpatterns = [ + path( + 'cat', + views.LuxSourceModelFormView.as_view(), + name='createcatview' + ), + path( + 'record', + views.PurchaseModelFormView.as_view(), + name='createview' + ), + path( + 'purchase/', + views.PurchaseUpdateView.as_view(), + name='detail' + ), + path( + '', + views.LuxPurchaseListView.as_view(), + {'page':1}, + name='list' + ), +] diff --git a/bak/unused_apps/budget/views.py b/bak/unused_apps/budget/views.py new file mode 100644 index 0000000..6a34b1e --- /dev/null +++ b/bak/unused_apps/budget/views.py @@ -0,0 +1,57 @@ +import datetime +from django.shortcuts import render +from django.views.generic.edit import CreateView, UpdateView +from django.utils import timezone +from utils.views import PaginatedListView +from .models import LuxPurchase, LuxSource + +class LuxSourceModelFormView(CreateView): + model = LuxSource + fields = ['name'] + success_url = '/spending/' + template_name = 'budget/create_cat_form.html' + + +class PurchaseModelFormView(CreateView): + model = LuxPurchase + fields = ['amount', 'source', 'category'] + success_url = '/spending/' + template_name = 'budget/create_form.html' + + +class PurchaseUpdateView(UpdateView): + model = LuxPurchase + fields = ['amount', 'source', 'category'] + success_url = '/spending/' + template_name = 'budget/update_form.html' + + +class LuxPurchaseListView(PaginatedListView): + model = LuxPurchase + + def get_queryset(self): + queryset = super(LuxPurchaseListView, self).get_queryset() + return queryset[:30] + + def get_context_data(self, **kwargs): + ''' + Get Monthly Spending for a nice bar chart + ''' + # Call the base implementation first to get a context + context = super(LuxPurchaseListView, self).get_context_data(**kwargs) + context['monthly_spending'] = LuxPurchase.stats.get_monthly_spending() + today = timezone.now() + first = today.replace(day=1) + month_1 = first - datetime.timedelta(days=1) + month_2 = month_1.replace(day=1) - datetime.timedelta(days=1) + month_3 = month_2.replace(day=1) - datetime.timedelta(days=1) + context['month'] = today.strftime('%h') + context['monthly_spending_1'] = LuxPurchase.stats.get_monthly_spending(month_1.month) + context['month_1'] = month_1.strftime('%h') + context['monthly_spending_2'] = LuxPurchase.stats.get_monthly_spending(month_2.month) + context['month_2'] = month_2.strftime('%h') + context['monthly_spending_3'] = LuxPurchase.stats.get_monthly_spending(month_3.month) + context['month_3'] = month_3.strftime('%h') + context['food_total'] = LuxPurchase.stats.get_monthly_spending_by_category("Grocery/Home", 1) + context['lodge_total'] = LuxPurchase.stats.get_monthly_spending_by_category("Lodging", 1) + return context diff --git a/bak/unused_apps/resume/admin.py b/bak/unused_apps/resume/admin.py new file mode 100644 index 0000000..8646cca --- /dev/null +++ b/bak/unused_apps/resume/admin.py @@ -0,0 +1,59 @@ +from django.contrib import admin + +from utils.widgets import LGEntryForm +from .models import Publisher, PubItem, Job, Resume + + +@admin.register(Job) +class JobAdmin(admin.ModelAdmin): + pass + + +@admin.register(Resume) +class ResumeAdmin(admin.ModelAdmin): + fieldsets = ( + ('', { + 'fields': ( + 'title', + 'profile', + 'skills', + 'jobs', + 'slug', + ), + 'classes': ( + 'show', + 'extrapretty', + 'wide' + ) + } + ), + ) + + +@admin.register(Publisher) +class PublisherAdmin(admin.ModelAdmin): + pass + + +@admin.register(PubItem) +class PubItemAdmin(admin.ModelAdmin): + form = LGEntryForm + list_display = ('title', 'pub_date', 'publisher', 'admin_link') + fieldsets = ( + ('', { + 'fields': ( + 'title', + 'body_markdown', + 'slug', + 'pub_date', + 'url', + 'publisher', + ), + 'classes': ( + 'show', + 'extrapretty', + 'wide' + ) + } + ), + ) diff --git a/bak/unused_apps/resume/build.py b/bak/unused_apps/resume/build.py new file mode 100644 index 0000000..4f051d5 --- /dev/null +++ b/bak/unused_apps/resume/build.py @@ -0,0 +1,75 @@ +import os +from django.urls import reverse +from builder.base import BuildNew +from pages.models import Page + +from .models import Publisher + + +class BuildPubs(BuildNew): + + def build(self): + self.build_detail_view() + self.build_publisher_list() + self.build_list_view( + base_path=reverse("resume:list"), + paginate_by=9999 + ) + + def get_model_queryset(self): + return self.model.objects.all() + + def build_detail_view(self): + for obj in self.get_model_queryset(): + url = obj.get_absolute_url() + print(url) + path, slug = os.path.split(url) + path = '%s/' % path + # write html + response = self.client.get(url) + print(path, slug) + self.write_file(path, response.content, filename=slug) + + def build_publisher_list(self): + publishers = Publisher.objects.all() + for publisher in publishers: + self.build_list_view( + base_path=reverse("resume:list_by_publisher", kwargs={'publisher': publisher.slug, }), + paginate_by=9999 + ) + + +class BuildResume(BuildNew): + + def build(self): + self.build_pages() + + def get_model_queryset(self): + return self.model.objects.all() + + def build_pages(self): + ''' + build out /work/index.html and work/resume.html + ''' + pages = self.get_model_queryset().filter(app="resume", build=True) + for obj in pages: + path = "work/" + if obj.slug == "profile": + url = '/work/' + slug = "index" + else: + url = "/%s%s/" % (path, obj.slug) + slug = obj.slug + # write html + response = self.client.get(url, HTTP_HOST='127.0.0.1') + self.write_file(path, response.content, filename=slug) + + +def pub_builder(): + j = BuildPubs("resume", "pubitem") + j.build() + + +def resume_builder(): + j = BuildResume("pages", "page") + j.build() diff --git a/bak/unused_apps/resume/migrations/0001_initial.py b/bak/unused_apps/resume/migrations/0001_initial.py new file mode 100644 index 0000000..14c9348 --- /dev/null +++ b/bak/unused_apps/resume/migrations/0001_initial.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9 on 2015-12-07 21:04 +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='PubItem', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(max_length=200)), + ('slug', models.CharField(max_length=50)), + ('body_markdown', models.TextField(blank=True, null=True)), + ('body_html', models.TextField(blank=True, null=True)), + ('url', models.CharField(blank=True, max_length=200, null=True)), + ('pub_date', models.DateTimeField(verbose_name='Date published')), + ], + options={ + 'ordering': ('-pub_date',), + }, + ), + migrations.CreateModel( + name='Publisher', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=200)), + ('slug', models.SlugField()), + ('body_markdown', models.TextField(blank=True, null=True)), + ('body_html', models.TextField(blank=True, null=True)), + ('url', models.CharField(blank=True, max_length=200, null=True)), + ('payment_time', models.DecimalField(decimal_places=0, max_digits=2)), + ], + ), + migrations.AddField( + model_name='pubitem', + name='publisher', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='resume.Publisher'), + ), + ] diff --git a/bak/unused_apps/resume/migrations/0002_auto_20151207_2105.py b/bak/unused_apps/resume/migrations/0002_auto_20151207_2105.py new file mode 100644 index 0000000..7ac653f --- /dev/null +++ b/bak/unused_apps/resume/migrations/0002_auto_20151207_2105.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9 on 2015-12-07 21:05 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('resume', '0001_initial'), + ] + + operations = [ + migrations.AlterModelOptions( + name='publisher', + options={'ordering': ('-order',)}, + ), + migrations.AddField( + model_name='publisher', + name='order', + field=models.DecimalField(decimal_places=0, default=1, max_digits=1), + preserve_default=False, + ), + ] diff --git a/bak/unused_apps/resume/migrations/0003_auto_20151211_1925.py b/bak/unused_apps/resume/migrations/0003_auto_20151211_1925.py new file mode 100644 index 0000000..77e3049 --- /dev/null +++ b/bak/unused_apps/resume/migrations/0003_auto_20151211_1925.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9 on 2015-12-11 19:25 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('resume', '0002_auto_20151207_2105'), + ] + + operations = [ + migrations.AlterModelOptions( + name='publisher', + options={'ordering': ('order',)}, + ), + ] diff --git a/bak/unused_apps/resume/migrations/0004_job_resume.py b/bak/unused_apps/resume/migrations/0004_job_resume.py new file mode 100644 index 0000000..e056fec --- /dev/null +++ b/bak/unused_apps/resume/migrations/0004_job_resume.py @@ -0,0 +1,37 @@ +# Generated by Django 2.1.1 on 2019-01-12 12:45 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('resume', '0003_auto_20151211_1925'), + ] + + operations = [ + migrations.CreateModel( + name='Job', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(max_length=200)), + ('employer', models.CharField(max_length=200)), + ('date_start', models.DateField(verbose_name='Date Start')), + ('date_end', models.DateField(blank=True, null=True, verbose_name='Date End')), + ('body_markdown', models.TextField(blank=True, null=True)), + ], + options={ + 'ordering': ('-date_end',), + }, + ), + migrations.CreateModel( + name='Resume', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(max_length=200)), + ('profile', models.TextField()), + ('skills', models.TextField()), + ('experience', models.ManyToManyField(to='resume.Job')), + ], + ), + ] diff --git a/bak/unused_apps/resume/migrations/0005_job_slug.py b/bak/unused_apps/resume/migrations/0005_job_slug.py new file mode 100644 index 0000000..d18baeb --- /dev/null +++ b/bak/unused_apps/resume/migrations/0005_job_slug.py @@ -0,0 +1,18 @@ +# Generated by Django 2.1.1 on 2019-01-12 12:56 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('resume', '0004_job_resume'), + ] + + operations = [ + migrations.AddField( + model_name='job', + name='slug', + field=models.CharField(blank=True, max_length=50), + ), + ] diff --git a/bak/unused_apps/resume/migrations/0006_auto_20190112_1257.py b/bak/unused_apps/resume/migrations/0006_auto_20190112_1257.py new file mode 100644 index 0000000..9ee8f1b --- /dev/null +++ b/bak/unused_apps/resume/migrations/0006_auto_20190112_1257.py @@ -0,0 +1,22 @@ +# Generated by Django 2.1.1 on 2019-01-12 12:57 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('resume', '0005_job_slug'), + ] + + operations = [ + migrations.RemoveField( + model_name='job', + name='slug', + ), + migrations.AddField( + model_name='resume', + name='slug', + field=models.CharField(blank=True, max_length=50), + ), + ] diff --git a/bak/unused_apps/resume/migrations/0007_auto_20190113_1128.py b/bak/unused_apps/resume/migrations/0007_auto_20190113_1128.py new file mode 100644 index 0000000..a635258 --- /dev/null +++ b/bak/unused_apps/resume/migrations/0007_auto_20190113_1128.py @@ -0,0 +1,18 @@ +# Generated by Django 2.1.1 on 2019-01-13 11:28 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('resume', '0006_auto_20190112_1257'), + ] + + operations = [ + migrations.AlterField( + model_name='job', + name='employer', + field=models.CharField(max_length=200, null=True), + ), + ] diff --git a/bak/unused_apps/resume/migrations/0008_auto_20190113_1139.py b/bak/unused_apps/resume/migrations/0008_auto_20190113_1139.py new file mode 100644 index 0000000..29d975d --- /dev/null +++ b/bak/unused_apps/resume/migrations/0008_auto_20190113_1139.py @@ -0,0 +1,24 @@ +# Generated by Django 2.1.1 on 2019-01-13 11:39 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('resume', '0007_auto_20190113_1128'), + ] + + operations = [ + migrations.RenameField( + model_name='resume', + old_name='experience', + new_name='jobs', + ), + migrations.AlterField( + model_name='job', + name='employer', + field=models.CharField(blank=True, default='', max_length=200), + preserve_default=False, + ), + ] diff --git a/bak/unused_apps/resume/migrations/0009_job_body_html.py b/bak/unused_apps/resume/migrations/0009_job_body_html.py new file mode 100644 index 0000000..fdeea15 --- /dev/null +++ b/bak/unused_apps/resume/migrations/0009_job_body_html.py @@ -0,0 +1,18 @@ +# Generated by Django 2.1.1 on 2019-01-13 11:46 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('resume', '0008_auto_20190113_1139'), + ] + + operations = [ + migrations.AddField( + model_name='job', + name='body_html', + field=models.TextField(blank=True, null=True), + ), + ] diff --git a/bak/unused_apps/resume/migrations/0010_auto_20190113_1147.py b/bak/unused_apps/resume/migrations/0010_auto_20190113_1147.py new file mode 100644 index 0000000..879bd55 --- /dev/null +++ b/bak/unused_apps/resume/migrations/0010_auto_20190113_1147.py @@ -0,0 +1,25 @@ +# Generated by Django 2.1.1 on 2019-01-13 11:47 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('resume', '0009_job_body_html'), + ] + + operations = [ + migrations.AlterField( + model_name='job', + name='body_html', + field=models.TextField(blank=True, default=''), + preserve_default=False, + ), + migrations.AlterField( + model_name='job', + name='body_markdown', + field=models.TextField(blank=True, default=''), + preserve_default=False, + ), + ] diff --git a/bak/unused_apps/resume/migrations/0011_auto_20190114_0227.py b/bak/unused_apps/resume/migrations/0011_auto_20190114_0227.py new file mode 100644 index 0000000..7656c6e --- /dev/null +++ b/bak/unused_apps/resume/migrations/0011_auto_20190114_0227.py @@ -0,0 +1,23 @@ +# Generated by Django 2.1.1 on 2019-01-14 02:27 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('resume', '0010_auto_20190113_1147'), + ] + + operations = [ + migrations.AddField( + model_name='resume', + name='profile_html', + field=models.TextField(blank=True), + ), + migrations.AddField( + model_name='resume', + name='skills_html', + field=models.TextField(blank=True), + ), + ] diff --git a/bak/unused_apps/resume/migrations/__init__.py b/bak/unused_apps/resume/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/bak/unused_apps/resume/models.py b/bak/unused_apps/resume/models.py new file mode 100644 index 0000000..bac3115 --- /dev/null +++ b/bak/unused_apps/resume/models.py @@ -0,0 +1,98 @@ +from django.db import models +from django.utils.encoding import force_str +from django.urls import reverse +from django.template.defaultfilters import slugify + +from utils.util import markdown_to_html + + +class Publisher(models.Model): + name = models.CharField(max_length=200) + slug = models.SlugField(max_length=50) + body_markdown = models.TextField(null=True, blank=True) + body_html = models.TextField(null=True, blank=True) + url = models.CharField(max_length=200, blank=True, null=True) + payment_time = models.DecimalField(max_digits=2, decimal_places=0) + order = models.DecimalField(max_digits=1, decimal_places=0) + + class Meta: + ordering = ('order',) + + def __str__(self): + return self.name + + def save(self, *args, **kwargs): + if self.body_markdown: + self.body_html = markdown_to_html(self.body_markdown) + super(Publisher, self).save() + + +class PubItem(models.Model): + title = models.CharField(max_length=200) + slug = models.CharField(max_length=50) + body_markdown = models.TextField(null=True, blank=True) + body_html = models.TextField(null=True, blank=True) + url = models.CharField(max_length=200, blank=True, null=True) + pub_date = models.DateTimeField('Date published') + publisher = models.ForeignKey(Publisher, on_delete=models.CASCADE) + + class Meta: + ordering = ('-pub_date',) + + def __str__(self): + return self.title + + def get_absolute_url(self): + return reverse("resume:detail", kwargs={"publisher": self.publisher.slug, "slug": self.slug}) + + def admin_link(self): + return force_str('Visit Site' % (self.url)) + admin_link.allow_tags = True + admin_link.short_description = 'Live Article' + + def save(self, *args, **kwargs): + if self.body_markdown: + self.body_html = markdown_to_html(self.body_markdown) + super(PubItem, self).save() + + +class Job(models.Model): + title = models.CharField(max_length=200) + employer = models.CharField(max_length=200, blank=True) + date_start = models.DateField('Date Start') + date_end = models.DateField('Date End', null=True, blank=True) + body_markdown = models.TextField(blank=True) + body_html = models.TextField(blank=True) + + class Meta: + ordering = ('-date_end',) + + def __str__(self): + return '{} - {}'.format(self.title, self.employer) # py3.1+ only + + def save(self, *args, **kwargs): + if self.body_markdown: + self.body_html = markdown_to_html(self.body_markdown) + super(Job, self).save() + + +class Resume(models.Model): + title = models.CharField(max_length=200) + slug = models.CharField(max_length=50, blank=True) + profile = models.TextField() + profile_html = models.TextField(blank=True) + skills = models.TextField() + skills_html = models.TextField(blank=True) + jobs = models.ManyToManyField(Job) + + def __str__(self): + return self.title + + def save(self, *args, **kwargs): + if self._state.adding and not self.slug: + self.slug = slugify(self.title) + if self.skills: + self.skills_html = markdown_to_html(self.skills) + if self.profile: + self.profile_html = markdown_to_html(self.profile) + super(Resume, self).save() diff --git a/bak/unused_apps/resume/urls.py b/bak/unused_apps/resume/urls.py new file mode 100644 index 0000000..de95866 --- /dev/null +++ b/bak/unused_apps/resume/urls.py @@ -0,0 +1,48 @@ +from django.urls import path, re_path +from django.views.generic.base import RedirectView + +from . import views + +app_name = "resume" + +urlpatterns = [ + path( + r'pubs///', + views.ByPublisherListView.as_view(), + name='list_by_publisher', + ), + path( + r'pubs//', + views.ByPublisherListView.as_view(), + {'page': 1}, + name='list_by_publisher', + ), + path( + r'pubs//', + views.PublisherListView.as_view(), + name='list', + ), + path( + r'pubs/', + views.PublisherListView.as_view(), + {'page': 1}, + name="list" + ), + path( + r'pubs//', + views.PubItemDetailView.as_view(), + name='detail', + ), + path( + r'/', + views.PageView.as_view(), + {'path': 'work'}, + name="pages" + ), + path( + r'', + views.PageView.as_view(), + {'path': 'work', 'slug': 'profile'}, + name="pages" + ), +] diff --git a/bak/unused_apps/resume/views.py b/bak/unused_apps/resume/views.py new file mode 100644 index 0000000..3d0cd8d --- /dev/null +++ b/bak/unused_apps/resume/views.py @@ -0,0 +1,60 @@ +from django.views.generic.detail import DetailView +from django.views.generic.base import TemplateView +from django.shortcuts import get_object_or_404 +from utils.views import PaginatedListView + +from .models import PubItem, Publisher, Resume +from pages.models import Page + + +class PublisherListView(PaginatedListView): + model = Publisher + template_name = 'archives/resume-pubs.html' + + def get_queryset(self): + return PubItem.objects.all() + + def get_context_data(self, **kwargs): + # Call the base implementation first to get a context + context = super(PublisherListView, self).get_context_data(**kwargs) + context['pub_list'] = Publisher.objects.all() + return context + + +class ByPublisherListView(PaginatedListView): + template_name = 'archives/resume-pubs-by-pub.html' + + def get_queryset(self): + print(self.kwargs['publisher']) + return PubItem.objects.filter(publisher__slug=self.kwargs['publisher']) + + def get_context_data(self, **kwargs): + # Call the base implementation first to get a context + context = super(ByPublisherListView, self).get_context_data(**kwargs) + context['publisher'] = Publisher.objects.get(slug=self.kwargs['publisher']) + return context + + +class PubItemDetailView(DetailView): + model = PubItem + template_name = "details/pubs.html" + slug_field = "slug" + + +class PageView(DetailView): + model = Page + slug_field = "slug" + + def get_object(self, **kwargs): + print("calling page view") + return get_object_or_404(Page, path=self.kwargs['path'], slug=self.kwargs['slug']) + + def get_template_names(self): + return ["details/%s.html" % self.object.slug, 'details/page.html'] + + def get_context_data(self, **kwargs): + # Call the base implementation first to get a context + context = super(PageView, self).get_context_data(**kwargs) + if self.kwargs['slug'] == 'resume': + context['resume'] = Resume.objects.get(title='base') + return context diff --git a/config/base_urls.py b/config/base_urls.py index 0677a15..2b7d43d 100644 --- a/config/base_urls.py +++ b/config/base_urls.py @@ -27,37 +27,44 @@ sitemaps = { } urlpatterns = [ - re_path(r'^admin/build/.*', builder.views.do_build), - path(r'admin/data/', include('utils.urls')), + # old unused urls #path(r'admin/income/invoice/monthlyview//invoice/', DownloadMonthlyInvoiceView.as_view(), name="download-invoice"), #path(r'admin/income/invoice/monthlyview//', MonthlyInvoiceView.as_view(), name="monthly-invoice"), + #path(r'spending/', include('budget.urls')), + #path(r'projects/', include('projects.urls')), + #path(r'expenses/', include('expenses.urls', namespace='expenses')), + #path(r'film/', include('posts.urls.film_urls')), + #re_path(r'^film/$', RedirectView.as_view(url='/films/')), + #path(r'films/', include('posts.urls.film_urls', namespace='films')), + #path(r'review/', include('posts.urls.review_urls')), + #re_path(r'^review/$', RedirectView.as_view(url='/reviews/')), + #path(r'reviews/', include('posts.urls.review_urls', namespace='review-list')), + #path(r'how-to/', include('posts.urls.craft_urls')), + #re_path(r'^how-to/$', RedirectView.as_view(url='/how-to/')), + #path(r'how-tos/', include('posts.urls.craft_urls', namespace='craft')), + #path(r'people/', include('people.urls')), + #path(r'work/', include('resume.urls', namespace='resume')), + #path(r'//', PageDetailView.as_view()), + re_path(r'^admin/build/.*', builder.views.do_build), + path(r'admin/data/', include('utils.urls')), path(r'admin/', admin.site.urls), path(r'trading/', include('trading.urls')), path(r'gtd/', include('gtd.urls')), - path(r'spending/', include('budget.urls')), path(r'planner/', include('planner.urls')), path(r'luximages/insert/', utils.views.insert_image), path(r'feed.xml', JrnlRSSFeedView(),name="feed"), path(r'sitemap.xml', sitemap, {'sitemaps': sitemaps}), path(r'links/', include('links.urls')), path(r'jrnl/', include('posts.urls.jrnl_urls', namespace='jrnl')), - #path(r'projects/', include('projects.urls')), path(r'walk/', include('locations.walk_urls')), path(r'walks/', include('locations.walk_urls')), path(r'locations/', include('locations.urls')), - #path(r'expenses/', include('expenses.urls', namespace='expenses')), path(r'newsletter/', include('lttr.urls')), path(r'photos/', include('media.urls')), path(r'images/', include('posts.urls.photo_essay_urls', namespace='photo-essay-list')), - #path(r'film/', include('posts.urls.film_urls')), - #re_path(r'^film/$', RedirectView.as_view(url='/films/')), - #path(r'films/', include('posts.urls.film_urls', namespace='films')), re_path(r'^trip/$', RedirectView.as_view(url='/trips/')), path(r'trip/', include('posts.urls.trip_urls')), path(r'trips/', include('posts.urls.trip_urls', namespace='trips')), - #path(r'review/', include('posts.urls.review_urls')), - #re_path(r'^review/$', RedirectView.as_view(url='/reviews/')), - #path(r'reviews/', include('posts.urls.review_urls', namespace='review-list')), re_path(r'^guide/$', RedirectView.as_view(url='/guides/')), path(r'guides/', include('posts.urls.guide_urls', namespace='guides')), path(r'guide/', include('posts.urls.guide_urls')), @@ -66,22 +73,16 @@ urlpatterns = [ path(r'essays/', include('posts.urls.essay_urls', namespace='essay-list')), path(r'range/', include('posts.urls.range_urls', namespace='range')), path(r'friends/', include('posts.urls.friends_urls', namespace='friends')), - #path(r'how-to/', include('posts.urls.craft_urls')), - #re_path(r'^how-to/$', RedirectView.as_view(url='/how-to/')), - #path(r'how-tos/', include('posts.urls.craft_urls', namespace='craft')), path(r'book-notes/', include('books.urls')), - #path(r'people/', include('people.urls')), path(r'dialogues/', include('sightings.urls', namespace='sightings')), path(r'field-notes/', include('posts.urls.field_note_urls', namespace='fieldnote')), path(r'src/', include('posts.urls.src_urls', namespace='src')), - path(r'work/', include('resume.urls', namespace='resume')), path(r'map', include('locations.urls', namespace='map')), path(r'map/', include('locations.urls', namespace='map')), path(r'', HomePageList.as_view(), {'pk':1,}, name="homepage"), path(r'comments/', include('django_comments.urls')), path(r'.txt', PageDetailTXTView.as_view()), path(r'', include('pages.urls', namespace='pages')), - #path(r'//', PageDetailView.as_view()), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) -- cgit v1.2.3