From 45d3c43735f47e11bbe717b73f05f471750a39f2 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Wed, 21 Aug 2024 12:10:14 -0500 Subject: added a dedicated REI deals system --- app/gtd/templates/gtd/reideal_code.html | 91 +++++++++++++++++++++++++++++++++ app/gtd/urls.py | 5 ++ app/gtd/views.py | 9 ++-- 3 files changed, 102 insertions(+), 3 deletions(-) create mode 100644 app/gtd/templates/gtd/reideal_code.html diff --git a/app/gtd/templates/gtd/reideal_code.html b/app/gtd/templates/gtd/reideal_code.html new file mode 100644 index 0000000..165fedf --- /dev/null +++ b/app/gtd/templates/gtd/reideal_code.html @@ -0,0 +1,91 @@ + + + + + +

+ + + + + diff --git a/app/gtd/urls.py b/app/gtd/urls.py index fb62846..dd794fb 100644 --- a/app/gtd/urls.py +++ b/app/gtd/urls.py @@ -10,6 +10,11 @@ urlpatterns = [ views.WiredGenerateDealCodeView.as_view(), name="code" ), + path( + r'reideal', + views.WiredGenerateREIDealCodeView.as_view(), + name="reicode" + ), path( r'todo', views.GTDNoteTODOView.as_view(), diff --git a/app/gtd/views.py b/app/gtd/views.py index 709766e..cdbd29e 100644 --- a/app/gtd/views.py +++ b/app/gtd/views.py @@ -223,7 +223,7 @@ class WiredPostListView(ListView): template_name = 'gtd/wiredpost_table.html' def get_queryset(self): - return WiredPost.objects.all().order_by("-needs_update") + return WiredPost.objects.filter(post_type=1,author="Scott Gilbertson").order_by("-needs_update") class WiredPostUpdateOverdueView(RedirectView): @@ -296,6 +296,10 @@ class WiredGenerateDealCodeView(TemplateView): template_name = "gtd/deal_code.html" +class WiredGenerateREIDealCodeView(TemplateView): + template_name = "gtd/reideal_code.html" + + class GTDNoteDeleteView(DeleteView): # specify the model you want to use model = GTDNote @@ -349,7 +353,7 @@ class UpdateDateView(RedirectView): query_string = True def get_redirect_url(self, *args, **kwargs): - for post in WiredPost.objects.all(): + for post in WiredPost.objects.filter(post_type=1,author="Scott Gilbertson"): if post.url: content = requests.get(post.url) soup = BeautifulSoup(content.text, 'html.parser') @@ -358,4 +362,3 @@ class UpdateDateView(RedirectView): post.date_last_pub = time post.save() return super().get_redirect_url(*args, **kwargs) - -- cgit v1.2.3-70-g09d2