Multiple Update Tasks

2022-05-25 Thread Trippy Samurai
I have my Django website where i can have tasks created and subtasks under tasks i have mark complete option which is working fine i need them to be completed in batch like selecting multiple tasks at once and complete them. **serializers.py**: class TaskCompleteSerializer(serializers.Model

file upload to folder based on selected category on form

2022-04-08 Thread Trippy Samurai
Hello, In my website i am uploading the documents and has title, category(choice field) and file upload on my website, here the file upload stores normally on the admin but how can i store the file inside the seperate folder based on the selected category for ex if the file i am uploading belong

Generalize search criterion django and drf

2022-04-04 Thread Trippy Samurai
I have ListView where i display some results on my website and i have search parameter which gives the result based on title and number here i should ignore the exact spelling and show the results for both i.e search criterion to be able to ignore "." "et al." and similar terms so that when sea

Re: django queryset - Get the data particular to current year only

2022-04-04 Thread Trippy Samurai
Thanks for the reply Brother but it's already solved On Sunday, 3 April 2022 at 12:05:39 UTC+5:30 sutharl...@gmail.com wrote: > I think this is related to your query > https://stackoverflow.com/a/28101722/8882295 > > On Thu, 31 Mar 2022 at 11:22, Trippy Samurai > w

django queryset - Get the data particular to current year only

2022-03-30 Thread Trippy Samurai
I have my query written to get some thing from database and display on my website that query is getting all the data from db but what if i want to get the data particular to current year only def get(self, request, *args, **kwargs): filt

Show particular records at the bottom page

2022-03-27 Thread Trippy Samurai
Hello all, I have a view that show the records,These records have certain statuses i want to show a particular status to be at the bottom of the list in website how can acheive this my view is drf APIView. -- You received this message because you are subscribed to the Google Groups "Django use

django download view downloading only .xls instead of file with extension on model

2022-02-26 Thread Trippy Samurai
https://stackoverflow.com/questions/71277673/django-download-view-downloading-only-xls-instead-of-file-with-extension-on-mod -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send a

django restrict choice options in dropdown according to the user type

2021-12-10 Thread Trippy Samurai
Hi, I have two user types usertype a and usertype b i have a form to update the task with fields name,info and status i have STATUS_CHOICES = ( ('A','A'), ('B','B'), ('C','C') ) the user type a should c only ('A','A'),('B','B'), in dropdown and usertype b should have (C,C) as dropdown how do i

'WSGIRequest' object has no attribute 'get'

2021-11-22 Thread Trippy Samurai
Getting error while working with template view views.py class DeveloperTicketView(TemplateView): def get_template_names(self): if self.request.get('status') == 'Opened': template_name = 'app/open_tickets.html' elif self.request.get('status') == 'Accepted': template_name = 'app/dev_accepted_tic

Re: Multiple Templates in single list view

2021-11-22 Thread Trippy Samurai
Its done bro model is configured already i didn't just posted the models.py file On Monday, 22 November 2021 at 21:18:12 UTC+5:30 ram.asf...@gmail.com wrote: > will update asap > > On Mon, Nov 22, 2021 at 1:22 PM David Nugent wrote: > >> Well, there are several ways you can deal with that. >> >

Re: Multiple Templates in single list view

2021-11-22 Thread Trippy Samurai
Anyone plz review my code i am struggling to figure out what the issue here is On Monday, 22 November 2021 at 16:35:32 UTC+5:30 Trippy Samurai wrote: > Thanks David for the idea i appreciate it i have gone with last way of > doing things but it doesnt render anything on data > > Pl

Re: Multiple Templates in single list view

2021-11-22 Thread Trippy Samurai
Thanks David for the idea i appreciate it i have gone with last way of doing things but it doesnt render anything on data Pls correct my code below *views.py:* class DeveloperTicketView(TemplateView): template_name = 'app/ticket_view.html' ticket = Ticket.objects.all() extra_content = {'tick

Re: Multiple Templates in single list view

2021-11-21 Thread Trippy Samurai
uot;) > context["completed_tickets"] = Ticket.objects.filter(status="COMPLETED") > return context > ``` > > On Mon, 22 Nov 2021 at 12:19, Trippy Samurai > wrote: > >> Hi Elena Thanks for the reply i have three different html pages to >> display open tick

Re: Multiple Templates in single list view

2021-11-21 Thread Trippy Samurai
bout what outcome you're trying to achieve? > > > --- > Elena Williams > Github: elena <http://github.com/elena/> > > > On Mon, 22 Nov 2021 at 15:20, Trippy Samurai > wrote: > >> Any one plz >> >> >> On Sunday, 21 November 2021 at 15

Re: Multiple Templates in single list view

2021-11-21 Thread Trippy Samurai
Any one plz On Sunday, 21 November 2021 at 15:09:39 UTC+5:30 Trippy Samurai wrote: > Hello, > I have different views for displaying different templates how do i write > them into one single Listview so that i can take care of DRY > > > [image: Screenshot 2021-11-21

change function based view into class based view

2021-11-16 Thread Trippy Samurai
Hello guys, I have to change the function based views to class based views please check the github question i have posted please answer if any knows plz https://stackoverflow.com/questions/69986690/change-the-function-based-views-to-class-based-generic-viewsupdate-view -- You received this me

Re: How to approach

2021-11-15 Thread Trippy Samurai
each user logged in . How do i acheive this On Monday, 15 November 2021 at 21:17:50 UTC+5:30 Trippy Samurai wrote: > Hi elgato, > Thanks for your reply brother > > I need to change the function based views into class based and generic > views, previously i have implemented different

Re: Celery & Docker Setup

2021-11-10 Thread Trippy Samurai
Thanks edchels for the link considering the views is it possible to add? On Wednesday, 10 November 2021 at 15:52:14 UTC+5:30 edchels...@gmail.com wrote: > Checkout this tutorial > > https://realpython.com/asynchronous-tasks-with-django-and-celery/ > > On Wed, 10 Nov 2021 a

Celery & Docker Setup

2021-11-10 Thread Trippy Samurai
Hello, I have around 18 views in my views.py file how do i integrate with celery,Please help me if anyone's aware *Views*.*py:* from django import forms from django.contrib import auth from django.http import request from django.http.response import HttpResponse, HttpResponseRedirect from django

Re: How to approach

2021-11-05 Thread Trippy Samurai
nse('account not active') else: print ('someone failed login') print ('email: {} and password: {}'.format(username,password)) return HttpResponse('invalid login') else: return render(request,'app/pm-signin.html',{}) On Friday, 5 November 20

How to approach

2021-11-04 Thread Trippy Samurai
Hi there, I am new to django and have a problem statement am not quite sure how to approach this,Please help me, Phase 1 Objectives: 1. Use the existing project setup you have already created You may completely reset Django models/database/codebase if needed but make sure you keep c