After uploading image is not displaying in production server.

2021-05-31 Thread Salima Begum
Hi all, In my project after depl;oying into production server When i have uploaded images it saves into media folder but not displaying image in template. As well as when we go to the admin site and to display an image when I click on the url of the image it is throwing an error like. url not found

Custom Text filter field in django admin site.

2021-05-31 Thread Ayush Bisht
# admin.py class InputFilter(admin.SimpleListFilter): template = 'patient/input_filter.html' def lookups(self, request, model_admin): # Dummy, required to show the filter. return ((),) class PatientProfilePastDataFilter(InputFilter): parameter_name = 'patient' tit

how to input list [] dynamic in python

2021-05-31 Thread paidjoo indo
hello i having question, because i still learn python for me, so can help me the question is how about if input like in below 1 ) input: 3 , return [1, 2, 3] 2) input: 2, return [2, 4, 3] 3) input: 6, return [3, 6, 6, 4, 5, 6] 4) input: 1, return [4, 6, 6, 4, 5, 6] 5) input: 1, return [5, 6, 6

Re: how to input list [] dynamic in python

2021-05-31 Thread paidjoo indo
how about if input like in below 1 ) input: 3 , return [1, 2, 3] then continue dynamic 2) input: 2, return [2, 4, 3] then continue dynamic 3) input: 6, return [3, 6, 6, 4, 5, 6] then continue dynamic 4) input: 1, return [4, 6, 6, 4, 5, 6] then continue dynamic 5) input: 1, return [5, 6, 6, 4,

Re: PayPal Integration

2021-05-31 Thread Eric 247ERICPOINTCOM
Thank you Sharif, I have integrated successfully with paypal after going through the paypal developer docs, and tested it with sandbox.paypal and it is working great. However I would like your help, to now be able to submit the form automatically after making the payment with paypal. I have tried

Re: PayPal Integration

2021-05-31 Thread Sharif Mehedi
Glad to be of help. It'd be easier for me to help you if I had a sneak peek at your code snippet, with which you are trying to do that. Sharif On Monday, May 31, 2021, 5:56:44 PM GMT+6, Eric 247ERICPOINTCOM wrote: ThankΒ you Sharif, I have integrated successfully with paypal after going

Re: how to input list [] dynamic in python

2021-05-31 Thread Derek
This does look a programming exercise in a class... if you ask these questions in future, be warned people here will probably ask to see your attempt at writing code first (otherwise you are not really learning to be a programmer). But, OK, it seemed interesting to me,so here is one approach:

Re: Filtering fields in http response data from http request url ?

2021-05-31 Thread Sam Chaffy
Using django rest framework, create a serializer class and specify the right field you want to display at the end. Please check this link https://www.django-rest-framework.org/api-guide/serializers/ On Sun, May 30, 2021 at 10:03 PM Mottaz Hegaze wrote: > Using Django Rest Framework , you can

os module import error

2021-05-31 Thread James Ndubuisi
Good afternoon. It seems on creating the Django project using django-admin startproject command , the os module isn't imported by default, causing an error. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: os module import error

2021-05-31 Thread Antonis Christofides
Hi! Could you show exactly which command(s) you are running, and the exact error message? Regards, Antonis Christofides +30-6979924665 (mobile) On 31/05/2021 17.57, James Ndubuisi wrote: Good afternoon. It seems on creating the Django project using django-admin startproject command , the o

Re: os module import error

2021-05-31 Thread Avi shah
you could just add "import os" in settings.py file On Mon, May 31, 2021 at 8:32 PM James Ndubuisi wrote: > Good afternoon. > It seems on creating the Django project using django-admin startproject > command , the os module isn't imported by default, causing an error. > > -- > You received this m

Re: CSS not linking with HTML

2021-05-31 Thread sukhy gill
I deleted my project and will start project again from begining and then will let you know the progress. Regards On Sun, May 30, 2021, 16:48 Mehdi Ismail you want to mention (provide screenshot) of the error? > > On Sunday, 30 May 2021 at 09:14:22 UTC+5:30 sukhy.g...@gmail.com wrote: > >> Getting

Re: CSS not linking with HTML

2021-05-31 Thread Chelsea Fan
Good luck On Mon, 31 May 2021, 6:31 pm sukhy gill, wrote: > I deleted my project and will start project again from begining and then > will let you know the progress. > Regards > > On Sun, May 30, 2021, 16:48 Mehdi Ismail >> you want to mention (provide screenshot) of the error? >> >> On S

Re: CSS not linking with HTML

2021-05-31 Thread sukhy gill
Thanku so much all of you for your valuable guidance to me πŸ™πŸ™πŸ™πŸ™‚πŸ™‚ On Mon, May 31, 2021, 21:07 Chelsea Fan Good luck > > On Mon, 31 May 2021, 6:31 pm sukhy gill, wrote: > >> I deleted my project and will start project again from begining and then >> will let you know the progress. >> Regards

IntegrityError at /userapp/detail/ NOT NULL constraint failed: userapp_profile.babyinfo_id

2021-05-31 Thread Hugh Frost
Hii all, I hv been struck in last 4 days please fix this error , i'm new to django -- 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...@googl

Re: CSS not linking with HTML

2021-05-31 Thread Chelsea Fan
You are welcome)) On Mon, 31 May 2021, 6:44 pm sukhy gill, wrote: > Thanku so much all of you for your valuable guidance to me πŸ™πŸ™πŸ™πŸ™‚πŸ™‚ > > On Mon, May 31, 2021, 21:07 Chelsea Fan wrote: > >> Good luck >> >> On Mon, 31 May 2021, 6:31 pm sukhy gill, >> wrote: >> >>> I deleted my project and w

Re: IntegrityError at /userapp/detail/ NOT NULL constraint failed: userapp_profile.babyinfo_id

2021-05-31 Thread Kasper Laudrup
On 31/05/2021 18.46, Hugh Frost wrote: > Hii all, > I hv been struck in last 4 days please fix this error , i'm new to django > Instead of telling people how many days you've spent trying to fix the error, try spend some time on explaining what you've spent the days on doing and what you're trying

Re: IntegrityError at /userapp/detail/ NOT NULL constraint failed: userapp_profile.babyinfo_id

2021-05-31 Thread Hugh Frost
Hey bro, i try to combine two model forms in single view django views but i dnt knw how to work with this please check my below code and help me! On Monday, May 31, 2021 at 11:15:29 PM UTC+5:30 Kasper Laudrup wrote: > On 31/05/2021 18.46, Hugh Frost wrote: > > Hii all, > > I hv been struck in

Re: Help with a huge database query.

2021-05-31 Thread 'odrzen' via Django users
If I use the values() or values_list() the request in database has a long waiting time and some time I also got a MemoryError (because 4GB RAM is not enough). My examples: Apple.objects.select_related('Orange').filter(state='fresh').values_list( # Fields I don't want: 'field1', 'field2', 'field3

Using jsonb_array_elements with querysets

2021-05-31 Thread Jameel A.
I’m trying to use the jsonb_array_elements Postgres function with querysets but I am running into issues. I defined a custom Func as: class JsonbArrayElements(Func): function = 'jsonb_array_elements' While this does seem to result in proper sql when used in an annotation, the issue comes w

How does django-admin work?

2021-05-31 Thread J Lee
I'm new to Django, and I've just been dazzled by the magic of Django. My main question is how does Django add django-admin to my path automatically and how does django-admin startproject create my files? It may be wy over my head, but I welcome any and all response. I would like to learn fr

SVG widget for the Admin

2021-05-31 Thread Mike Dewhirst
I collect the svg source for an image from a public API and store it in a models.TextField. I have no difficulty displaying it in a normal view and my own template. Nothing special, it just emerges. I don't even need a 'safe' filter. However, I really want to display such images in the Admin.

Re: How does django-admin work?

2021-05-31 Thread Thomas Lockhart
Welcome to Django! Django does not add django-admin to your path. Rather, when Django is installed it (sometimes) happens to be installed into a place which is already in your path. Otherwise, you need to add it to your path or use a packaging system such as anaconda which helps do that for you

Inlined hierarchy models in django admin site.

2021-05-31 Thread Ayush Bisht
class Patient(models.Model): patient_id = models.CharField(max_length=60) class PatientVaccineStatus(models.Model): patient = models.ForeignKey(Patient, related_name="patient_vaccine_status") class Vaccine(models.Model) vaccine = models.ForeignKey(PatientVaccineStatus, related_