Re: I con't able to view the image in the webpage.

2022-11-03 Thread 'Kasper Laudrup' via Django users

On 03/11/2022 06.01, MaheshKumar wrote:

i cont able to view the image in the webpage,  found an error on path.



Well that sucks. I'm sure it's a nice image.

Don't worry though, there are many other webpages with many more nice 
images you can look at instead.


Hope that helps.

Kind regards,
Kasper Laudrup

--
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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e48da2a4-0896-f883-ad35-cb658dd66d4f%40stacktrace.dk.


Multistape data send to database

2022-11-03 Thread shiva singh
hello Everyone can anyone give a idea to how can send multistape form data 
into data base with validation 

-- 
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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f845417e-ba17-4ce8-8d25-b30bcc2c818fn%40googlegroups.com.


Re: I am unable to view images in webpage which is given in html

2022-11-03 Thread muwaga micheal
Can you share the code?

On Wednesday, November 2, 2022 at 3:11:37 PM UTC+3 MaheshKumar wrote:

> I have given the photos in the database but it does not displays in the 
> webpage.
>
> [image: Screenshot (25).png]
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5f21b5c2-9001-4683-a645-eecaab4dff19n%40googlegroups.com.


Using django 4.1 code in django 3.2

2022-11-03 Thread Lakshyaraj Dash
Is there any problem if I deploy my django app written with django 4.1 in
django 3.2 on render ?
Please help

-- 
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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAF7qQgBaYBz4CdMjOoabrmaS%3D-iZAO3Pp4%2BcSG8fZZ%2BENdXTXw%40mail.gmail.com.


Re: Using django 4.1 code in django 3.2

2022-11-03 Thread 'Steven Mapes' via Django users
It'll depend on whether your code is 3.2 compatible or not so you'd need to 
test it and check dependencies first

On Thursday, 3 November 2022 at 09:28:40 UTC Kasper Laudrup wrote:

> On 03/11/2022 10.18, Lakshyaraj Dash wrote:
> > Is there any problem if I deploy my django app written with django 4.1 
> > in django 3.2 on render ?
>
> Yes.
>
> Kind regards,
> Kasper Laudrup
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/cb156148-ba0d-4460-bb54-cacc4cba9660n%40googlegroups.com.


Re: Using django 4.1 code in django 3.2

2022-11-03 Thread subin
Please let me know if that sounds okay.

On Thu, Nov 3, 2022 at 2:56 PM 'Steven Mapes' via Django users <
django-users@googlegroups.com> wrote:

> It'll depend on whether your code is 3.2 compatible or not so you'd need
> to test it and check dependencies first
>
> On Thursday, 3 November 2022 at 09:28:40 UTC Kasper Laudrup wrote:
>
>> On 03/11/2022 10.18, Lakshyaraj Dash wrote:
>> > Is there any problem if I deploy my django app written with django 4.1
>> > in django 3.2 on render ?
>>
>> Yes.
>>
>> Kind regards,
>> Kasper Laudrup
>>
> --
> 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 django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/cb156148-ba0d-4460-bb54-cacc4cba9660n%40googlegroups.com
> 
> .
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJnMy6ca7AuoG1aRFZxzT45R1zcva_3cOv%2B7xUP%3Dj5Hv8w-Kqw%40mail.gmail.com.


Re: Using django 4.1 code in django 3.2

2022-11-03 Thread subin
I will look forward to meeting you on July 11

On Thu, Nov 3, 2022 at 10:18 AM Lakshyaraj Dash <
dashlakshyaraj2...@gmail.com> wrote:

> Is there any problem if I deploy my django app written with django 4.1 in
> django 3.2 on render ?
> Please help
>
> --
> 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 django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAF7qQgBaYBz4CdMjOoabrmaS%3D-iZAO3Pp4%2BcSG8fZZ%2BENdXTXw%40mail.gmail.com
> 
> .
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJnMy6cKamZTQsh89-J6utYEtfuFVMir_UDWU48fTg%3DK-K8i9w%40mail.gmail.com.


Re: Error: pg_config executable not found. (psycopg2 for postgres in docker not successfully installed)

2022-11-03 Thread Adeyemi Deji
Also, i tried psycopg2-binary ànd still add the same error issue but when i
updated the Dokerfile, things got normal.

On Mon, 31 Oct 2022, 19:51 'Kasper Laudrup' via Django users, <
django-users@googlegroups.com> wrote:

> On 31/10/2022 19.32, Adeyemi Deji wrote:
> >
> > Hello, fam!
> >
> > Found a solution to the problem. Updated the Dockerfile. Check below
> >
>
> Great to hear you figured it out and thanks for sharing. Out of
> curiosity, any reason why you chose to build the psycopg2 package from
> source instead of using a prebuilt binary?
>
> I would assume using the prebuilt binary would have been simpler and of
> course make it much faster to build your container than building your
> own package from source.
>
> Thanks and kind regards,
> Kasper Laudrup
>
> --
> 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 django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/fa5906c5-929f-a2b8-91e2-72d8b0fb8194%40stacktrace.dk
> .
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEO1Grrh2TneJ3cBW0wq%3DV%3DeMDdMbp-PWk-nuXNrjHU6-oSh3g%40mail.gmail.com.


Re: I am unable to hash my password.

2022-11-03 Thread ritik sahoo
your super_staff is not active (blank=True)

On Thu, Nov 3, 2022 at 12:06 PM Saksham Khanal 
wrote:

> Here you go
> On Wednesday, 2 November 2022 at 9:12:54 pm UTC+5:45 hubak...@gmail.com
> wrote:
>
>> Hi  Saksham, please let us see your user model.py and views.py.
>>
>> On Wed, Nov 2, 2022 at 2:52 PM Saksham Khanal 
>> wrote:
>>
>>> when I try to new register new user form the API,the saved user doesn't
>>> have it's password hashed which is creating a problem while logging in.You
>>> can see the difference between admin and new_user.To create a user model I
>>> have inherited a Abstract user class.You can also check my register
>>> serializer
>>> [image: Django_group.png][image: Django_group1.png]
>>>
>>> --
>>> 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 django-users...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/d9adde23-46cd-40bf-babc-ced3d4b9d9ban%40googlegroups.com
>>> 
>>> .
>>>
>> --
> 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 django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/a358b0a3-b544-4cc5-98fa-394468b662e2n%40googlegroups.com
> 
> .
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJwehCtx1z_1FNAfn%2Bh%3DgOsM9BD6EO270Oh8y%3DrPvT0eiH2q-w%40mail.gmail.com.


Django Channels tests: Task x got Future y attached to a different event loop

2022-11-03 Thread Jens de Ruiter
Hi everyone, I have a question regarding Django Channels testing.
I've asked the question before on StackOverflow, so more info can be found 
here: 
https://stackoverflow.com/questions/74154013/django-channels-tests-task-x-got-future-y-attached-to-a-different-event-loop

Any help would be greatly appreciated :).

Jens

-- 
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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/859dfa39-e323-41c8-bccd-4e49d523fabcn%40googlegroups.com.


Re: got error in terminal, ubuntu

2022-11-03 Thread Jana (Codi Coop)
Make sure you've installed Django on your system, or you virtual environment if 
you're using one. If you've installed Django on your virtual environment, the 
problem might be that you haven't activated it.

Django's website has some instructions on this: 
https://docs.djangoproject.com/en/4.1/topics/install/#how-to-install-django

--- Original Message ---
El dimecres, 2 de novembre 2022 a les 6:43 AM, AKHIL KORE 
 va escriure:

> (myprojectenv) user@DIPL-PC290:~/myprojectdir$ django-admin.py startproject 
> myproject ~/myprojectdir
> django-admin.py: command not found
>
> --
> 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 django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> [https://groups.google.com/d/msgid/django-users/CAB11hN_4ZsBELy%2B%3D8AyuZTT-FXizppJZ22fjY5r1pGgP%3DT4gGw%40mail.gmail.com](https://groups.google.com/d/msgid/django-users/CAB11hN_4ZsBELy%2B%3D8AyuZTT-FXizppJZ22fjY5r1pGgP%3DT4gGw%40mail.gmail.com?utm_medium=email&utm_source=footer).

-- 
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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1FivC2eimA853AikWSmvdiGIhZaEAQr4u9G_jY9RAKDMHujZ3CoFRAi0DsISlHCSkMDwckT5d1CYtmDVjk51MpdfkjoCisemNRrxYCUoa6k%3D%40codi.coop.


Re: Multistape data send to database

2022-11-03 Thread ritik sahoo
you can use filter attribute to send data to database or by using
objects.filter you can get the multiple data from your database
you will pass the data in URL(Dynamic URL) ()

On Thu, Nov 3, 2022 at 2:44 PM shiva singh  wrote:

> hello Everyone can anyone give a idea to how can send multistape form data
> into data base with validation
>
> --
> 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 django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/f845417e-ba17-4ce8-8d25-b30bcc2c818fn%40googlegroups.com
> 
> .
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJwehCtRdDQ-uZe-t%2BQV8UvaMh1TyOWUq%2B6A00jB6LD2pPs4LA%40mail.gmail.com.


Most efficient method for fetching data

2022-11-03 Thread Dhanya Aleena
Which among the below is the most efficient method to get the *recent 
transactions*?

*1##using subquery*
transactions = list(
Transaction.objects.filter(
pk__in=Subquery(
Transaction.objects.filter(user=self.request.user)
.order_by("-merchant", "-date_of_payment")
.distinct("merchant")
.values("pk")
 )
).order_by("-date_of_payment")

*2##using one query and sorting* 
transactions = (
Transaction.objects.filter(user=self.request.user)
.order_by("-merchant", "-date_of_payment")
.distinct("merchant")
)
recent_transactions = sorted(
transactions, key=operator.attrgetter("date_of_payment"), 
reverse=True
)
   
*3##using two queries*
transactions = 
Transaction.objects.filter(user=self.request.user).order_by("-merchant", 
"-date_of_payment").distinct("merchant")
recent_transactions = 
Transaction.objects.filter(id__in=transactions).order_by('-date_of_payment')

-- 
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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/43a65961-4998-4520-b73f-1ed1cba14ae8n%40googlegroups.com.


Re: I am unable to view images in webpage which is given in html

2022-11-03 Thread Mario Shaya
employeedetail.empPhoto.url

Le jeudi 3 novembre 2022 à 22:13:41 UTC+3, subtitle indo a écrit :

> Sorry to write again so quickly.
>
> On Thu, Nov 3, 2022 at 10:15 AM muwaga micheal  wrote:
>
>> Can you share the code?
>>
>> On Wednesday, November 2, 2022 at 3:11:37 PM UTC+3 MaheshKumar wrote:
>>
>>> I have given the photos in the database but it does not displays in the 
>>> webpage.
>>>
>>> [image: Screenshot (25).png]
>>>
>> -- 
>>
> 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 django-users...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/5f21b5c2-9001-4683-a645-eecaab4dff19n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f763285e-c308-42f2-8074-def703c5d49dn%40googlegroups.com.


Re: I was facing Type Error

2022-11-03 Thread Mario Shaya
could you show your code?

Le jeudi 3 novembre 2022 à 22:48:22 UTC+3, subtitle indo a écrit :

> Please let me know if that is okay.
>
> On Wed, Nov 2, 2022 at 6:37 AM MaheshKumar  wrote:
>
>> Today i created the project to create an database and then to display 
>> those datas in database in list format.
>>
>> Now i was facing this type error
>>
>> [image: Screenshot (22).png][image: Screenshot (21).png]
>>
>> -- 
>>
> 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 django-users...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/b972fd37-88f2-4e04-8c9d-1f38370dcbadn%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/fcb7038d-a691-437f-9cc2-b481d25875ban%40googlegroups.com.


Re: I am unable to view images in webpage which is given in html

2022-11-03 Thread ritik sahoo
First you check,you may not be include TEMPLATE_TAG in your settings.py file

On Fri, 4 Nov, 2022, 8:02 am Mario Shaya,  wrote:

> employeedetail.empPhoto.url
>
> Le jeudi 3 novembre 2022 à 22:13:41 UTC+3, subtitle indo a écrit :
>
>> Sorry to write again so quickly.
>>
>> On Thu, Nov 3, 2022 at 10:15 AM muwaga micheal 
>> wrote:
>>
>>> Can you share the code?
>>>
>>> On Wednesday, November 2, 2022 at 3:11:37 PM UTC+3 MaheshKumar wrote:
>>>
 I have given the photos in the database but it does not displays in the
 webpage.

 [image: Screenshot (25).png]

>>> --
>>>
>> 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 django-users...@googlegroups.com.
>>>
>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/5f21b5c2-9001-4683-a645-eecaab4dff19n%40googlegroups.com
>>> 
>>> .
>>>
>> --
> 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 django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/f763285e-c308-42f2-8074-def703c5d49dn%40googlegroups.com
> 
> .
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJwehCt86wW_OneVXjo0OF1T_WhxDGx29EUONM83oO9gsNC4sw%40mail.gmail.com.


Re: How to use choices in model field

2022-11-03 Thread Aaryan R Soni
Thanks, that worked, Thanks for your help

On Wed, Nov 2, 2022, 9:57 PM Julio Cojom  wrote:

> When you change the status to Verified, you are only changing the object
> instance in memory, to save it to the database, you need to call the method
> save.
>
> verification.save() at the end should make it work
>
> El El mié, 2 de nov. de 2022 a la(s) 10:23, Aaryan R Soni <
> aaryanrson...@gnu.ac.in> escribió:
>
>> Okay, but still the problem is that how do I set the value of status
>> field, as I have written in the code, verification.status = 'Verified' it
>> is not giving any error but it is not working either
>>
>> On Wed, Nov 2, 2022, 9:51 PM kateregga julius 
>> wrote:
>>
>>> Don't use square blackest [ ]
>>>
>>> status_choices=(('Unverified','Unverified'),('Verified','Verified'))
>>>
>>> On Wed, Nov 2, 2022, 5:52 PM Aaryan R Soni 
>>> wrote:
>>>
 Hey guys, i am facing some issues using choices in models.CharField. I
 am creating a model which has username and status, where status is my
 choice field. it has 2 values, 'Unverified' and 'Verified'.

 class user_stutus(models.Model):
 status_choices=[('Unverified','Unverified'),('Verified','Verified'
 )]
 uname=models.OneToOneField(User,on_delete=models.CASCADE)
 status=models.CharField(max_length=11,choices=status_choices
 ,default='Unverified')

 def verifyCode(request):
 global errors,session
 if request.method == 'POST':
 code = request.POST['code']
 user=User.objects.get(email=session['email'])
 print('user',user)
 print('request',session['email'])
 if session['code'] != code:
 errors['code'] = 'Verification code did not match!'
 return redirect('/user/user-verify/')
 verification = user_stutus.objects.get(username=user)

 *verification.status = 'Verified'#here i am changing its value and
 facing the issue.*
 return redirect('/user/user-login/')

 can someone give me any solution for this?
 Thank you!



 *DISCLAIMER*

 Any views or opinions presented in this email are solely those of the
 author and do not necessarily represent those of the Ganpat University.





 *DISCLAIMER*

 Any views or opinions presented in this email are solely those of the
 author and do not necessarily represent those of the Ganpat University.



 --
 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 django-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/6ee9dae8-2879-4c3d-a921-238b36fcb975n%40googlegroups.com
 
 .

>>> --
>>> 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 django-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAMVv_-E9uO8A7tJH04mHpkS-LeCwdJVKnMXtppZKkqp6JM2K5Q%40mail.gmail.com
>>> 
>>> .
>>>
>>
>>
>>
>> *DISCLAIMER*
>>
>> Any views or opinions presented in this email are solely those of the
>> author and do not necessarily represent those of the Ganpat University.
>>
>>
>>
>>
>>
>> *DISCLAIMER*
>>
>> Any views or opinions presented in this email are solely those of the
>> author and do not necessarily represent those of the Ganpat University.
>>
>>
>>
>> --
>> 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 django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAK5JjLSs9yNckAOEw0ygcXMFTkZRTZmZwAp_tPVA2n81kPzY6Q%40mail.gmail.com
>> 
>> .
>>
> --
> 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 django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAHRQUH%3Dsb9jK0WgPf2FOUR9KebUUrsrcagG7%3DkhqPMJ_Kk0x4w%40mail.gmail.com
>