Re: Post multiple data

2023-08-08 Thread Prashanth Patelc
I'm not able to send multiple data in front -end . On Tue, Aug 8, 2023, 5:21 PM Mz Gz wrote: > Check the object sent from frontend using developer tools in browser. > > If the object is sent correctly to backend. > > Just access is from POST dict > > On Tue, 8 Aug 2023, 1:1

Re: Logout time

2023-07-31 Thread Prashanth Patelc
elta module in python, > > >>> CODE <<< > from datetime import datetime, timedelta > login_time = datetime.now() > logout_time = login_time + timedelta(hours=8) > >>> CODE <<< > > > > > > > > > > On Fri, 28 Jul 2023 at

Re: Problems in Django login authentication

2023-07-29 Thread Prashanth Patelc
Use default django user model from django.contrib.auth.models import User # Create your models here. class Registration (models.Model): author = models.ForeignKey(User, on_delete=models.CASCADE) # write your fields here In settings.py AUTH_USER_MODEL = app name . Modelname On Sun, Jul

Logout time

2023-07-28 Thread Prashanth Patelc
Hi all, How to get logout time based on login time in python? I'm storing hour in one column Eg ; hour 8 Based on 8 Calculate logout time My login time 10:00:00 I need 6: 00:00 (based 8) -- You received this message because you are subscribed to the Google Groups "Django users"

Re: DAILY,MONTHLY AND ANNUAL REPORTS

2023-07-21 Thread Prashanth Patelc
Write a condition based on paidon date filed like filter date , If date is today get last 7days report and get last month report. On Fri, Jul 21, 2023, 11:12 PM Abdou KARAMBIZI wrote: > Hello Friends, > > How can I get weekly,Monthly and annual reports? from the following model. > I want to get

Django forms data save using ajax

2023-04-15 Thread Prashanth Patelc
Hi all, How to save employees information using ajax with django form , id should automatic generation ? -- 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 an email to

User creation

2023-03-27 Thread Prashanth Patelc
Hi all, I'm creating new user fields like email username firstname after creating user I need to send password creation email to end user ? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

Update in django value

2023-03-07 Thread Prashanth Patelc
How to update single record particular value in django.. h_date=Holiday.objects.filter(start_date=month_start,end_date=month_end).values_list('date',flat=True) for h_date in holiday: Model.objects.filter(emp=request.user). update(date =h_date,in_time=None) This above query is updating all

How to write query user between dates no leaves?

2023-02-24 Thread Prashanth Patelc
How to write orm query? User don't have any leave between two dates in django ? leave_data = EmployeeLeaves.objects.filter(~Q(approval_status='Approved'),~Q(approval_status='Cancelled'),~Q(approval_status='Rejected'), from_date__gte=month_first_date, to_date__lte=month_last_day,

Fwd: How to create orm query if data is exist or not ?

2023-02-23 Thread Prashanth Patelc
-- Forwarded message - From: Prashanth Patelc Date: Thu, Feb 23, 2023 at 5:11 PM Subject: How to create orm query if data is exist or not ? To: Hi all, How to create orm query with data exist or not ? How to check if approval_status Pending and Rejected with same user

How to create orm query if data is exist or not ?

2023-02-23 Thread Prashanth Patelc
Hi all, How to create orm query with data exist or not ? How to check if approval_status Pending and Rejected with same user contains from_date approval_status User 2023-01-20 - ApprovedNewUser 2023-01-12 - Rejected NewUser

Orm query

2023-02-17 Thread Prashanth Patelc
Hi all, This is my model if model contain previous month dates I need to and store the data If user is new previous data is not available I need to store directly to db . How to write orm query? Attendance.object.filter(user=emp,date=enddate,crea_date=strdate) If dates is not available in

Re: How to fetch 10000 above record within second in django?

2023-01-17 Thread Prashanth Patelc
ously, restrict the number of fields returned using "values" >> and/or use "select_related" or "prefetch_related" to get related data >> in one or two queries, rather than having Django getting that data on >> (potentially) multiple queries per record

Re: How to fetch 10000 above record within second in django?

2023-01-16 Thread Prashanth Patelc
I'm using orm query fetching all data and showing into html templates , it's taking more time for get the data , On Tue, Jan 17, 2023, 12:40 PM Clive Bruton wrote: > > On 17 Jan 2023, at 05:01, Prashanth Patelc wrote: > > > I written query it's taking more time like

How to fetch 10000 above record within second in django?

2023-01-16 Thread Prashanth Patelc
Hi all, How to fetch the data from db (mysql) above 1 records within second, I written query it's taking more time like 38 seconds, how to to fetch the lac of records within seconds any example in django using orm or MySQL query ? -- You received this message because you are subscribed to

How Filter rows in django?

2023-01-08 Thread Prashanth Patelc
Hi , How to filter table rows in django using html , bootstrap and js? Example : I have table called some , contains 50 rows a , b, c, d, e ,,,more If I select a,b row need to show both rows data only also remaining as per selection need to show ? -- You received this message because you

How to extract data in text.file and convert excel in python or pandas ?

2022-12-30 Thread Prashanth Patelc
Hi all, How to conver below text file data into xl file using pandas or python script? Host address all related values host address decimal and also remaining all .. Show in Excel data header below related values. Text file data : --- Host address - 123457 Host address

How to convert text file data into Excel file?

2022-12-29 Thread Prashanth Patelc
Hi all, How to conver below text file data into xl file using pandas or python script? Host address all related values host address decimal and also remaining all .. Show in Excel data header below related values. Text file data : --- Host address - 123457 Host address

How to convert 24 hours time to 12 hours ?

2022-07-22 Thread Prashanth Patelc
how to use time in pandas (convert 24 hours time to 12 hours) Login time table == userid logindate logintime 22022-13-07 18:30:00.490337 Logout time table == userid logindate logintime 22022-14-07

Sockets

2022-07-20 Thread Prashanth Patelc
Hi users, without serializers , can I use sockets? How to use sockets in django rest api( notification purpose), front-end is Vue js. any tutorials or any blogs sample codes please share with me. Thanks -- You received this message because you are subscribed to the Google Groups "Django

CICD Pipeline(Heroku)Yml, error

2022-06-02 Thread Prashanth Patelc
I am hosting my app in Heroku using CICD Pipeline I am getting this error .Please help to solve this issue. Already up to date. 43 Everything up-to-date 44

How to test urls

2022-03-23 Thread Prashanth Patelc
Hi all, how test the urls in django rest , i need each url response how to write one file for each url response need to write a URL in our application, which will return working or something as a response ? * not test cases -- You received this message because you are subscribed to the

DJANGO_SETTINGS_MODULE error

2022-03-23 Thread Prashanth Patelc
*I am getting this error * *please solve any one thanks in advance.* django.core.exceptions.ImproperlyConfigured: Requested setting REST_FRAMEWORK, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before

Re: Got an error creating the test database: database "" already exists

2022-03-17 Thread Prashanth Patelc
Check your settings.py once Add auth_user='app.UserModel' Or 1) delete database and migrations 2) create new db 3) python manage.py makemigration 4) python manage.py migrate On Thu, Mar 17, 2022, 9:35 AM Avinash Alanjakar wrote: > > Their are lots of pre-bulit apps in django so you need to

Re: How to create dynamic models in django??

2022-02-28 Thread Prashanth Patelc
Any example? On Mon, Feb 28, 2022, 5:27 PM Clive Bruton wrote: > > On 27 Feb 2022, at 17:54, Steve Smith wrote: > > > ...the documentation on Formsets is scarce in my opinion and to get > > them to work is a lot of trial and error... > > To massively simplify formsets try django-extra-views > >

How to create dynamic models in django??

2022-02-26 Thread Prashanth Patelc
How to create dynamic models in django rest framework? Is there any chance to create dynamic models with APIs Any examples please send me thanks in advance.. 1) Requirement is need create table name and fields in frontend 2) we are getting the data and store in to the db create db structure 3)

how to use migrations in runtime for models creation?

2022-02-23 Thread Prashanth Patelc
hey , im working on dynamic models , im receiving model name and fields in front-end eg: class Users(models.Model): name=models.Charfield(max_length=30) last_name=models.Charfield(max_length=30) ,,, after this i dont need to save into the models.py i need to store the

How to validate xl data

2022-02-13 Thread Prashanth Patelc
i am working on xl sheets , when im uploading the xl sheet it is storing into the models but i need before storing into the models validate the data eg: username : ,must be str not int reference id : ,must be int not str email : ,contains @gmail.com , not strt not int i need to validate like

create super user

2022-01-24 Thread Prashanth Patelc
im getting this error == match = date_re.match(value) TypeError: expected string or bytes-like object this is my user profile model === class UserManager(BaseUserManager): use_in_migrations = True def _create_user(self, email, password,

Database design

2022-01-23 Thread Prashanth Patelc
Dear Django users, I need some information regarding Django models, I would like to know is there any way to create Django models through frontend or can we create models by super admin. Kindly share any tutorials or any examples available. Example: we are create models in django like below

Models

2022-01-21 Thread Prashanth Patelc
Dear Django users, I need some information regarding Django models, I would like to know is there any way to create Django models through frontend or can we create models by super admin. Kindly share any tutorials or any examples available. Example: we are create models in django like below