Bandar
Maxim
Kareem
Kareem
That tells u a list of the stuff you much check before you deployment also search on internet for more additional information because there is a lot of stuff you may add in the Middleware section as well as if you have cookies or tokens, also testing is a thing too
Bandar
Abel
HEllo guys how can i connect View with Url
𝒮𝒽𝒶𝓏
DIY tutorial on how to create a live streaming application using django
Anuj
The MEDIA_URL and STATIC_URL settings must have different values
facing this issue
.
salawu
Is there any api on pypi for advance email sending and auto reply messages in Django project
Kiro
class CinemaSerializer(serializers.ModelSerializer):
long = serializers.DecimalField(max_digits=9, decimal_places=6, required=False)
lat = serializers.DecimalField(max_digits=9, decimal_places=6, required=False)
max_distance = serializers.DecimalField(max_digits=9, decimal_places=6, required=False)
class Meta:
model = models.Cinema
fields = "all"
I need to use this serializer in a view in two cases: one where I'm adding a cinema, so I send a post request and I don't include the three declared fields set to required=False, and the other case where I'm getting the cinemas and I need the request to include the 3 fields so I can search based on those
Kiro
Is this the best way to do this?
Kiro
Just thought that, using a get request, I'd embed those fields in the url
Does the serializer read data from url?
HOOMAN
HOOMAN
__ &_
Doragonsureiyā
all
• Use a backtick (`) on both ends of your single line:
print("hello world")
• For more lines, use three backticks (```) before the first line, and after the last:
def hello(name):
print(f"hello {name}")
• You can also select text when typing, and select markdown formatting.
ManDo
Hi. I am trying to use Subquery with 2 tables in 2 different databases. But it is not work.
I have Tabel1 in database1 and Table2 in database2
My query set:
subquery = Table2.objects.filter(field2=OuterRef(‘field1’)).values(‘id’)[:1]
mainquery = Table1.objects.annotate(newfield=Subquery(subquery, using=‘database2’))
But the error is: Table ‘database1.model_database1_table1’ does not exist
Where is my mistake?
Shamnad
Shamnad
Shivani
How to filter data between two dates when 1 I'd store database in many time and send amount but how can I find how much amount is send between two dates
Abhi
How to solve multivaluedictkey error
Kritesh
Hello guys I am really very big prblm for long time please help me any1
Kritesh
I have integrated django as backend and react is frontend together so it will be like if hit my server 127.0.0.1 it will display react page ok
Kritesh
So I am stuck that how would I access react routes so that I can go to rest of pages by django
Duong Chan Troi
can anyone tell me why i cant apply css to separate elements in other html?
Duong Chan Troi
Kritesh
{% extend '. /base.html' %}
Duong Chan Troi
Yes. But the individual elements that base.html does not have, it does not apply css
Duong Chan Troi
Kritesh
Duong Chan Troi
Looks like people are less active
Yug
Sorry I can't help with react
Ukasha
Duong Chan Troi
Why can't I load static when debug is off?
Duong Chan Troi
Oh
Duong Chan Troi
Cant even load css
Duong Chan Troi
salawu
Replit
Oh, sorry I know nothing about Replit
Duong Chan Troi
repl.it
salawu
But you can try pythonanywhere, it is free and easy to deploy Django project
Duong Chan Troi
Okay
salawu
Suryo Adhy Chandra
hello... i am newbie in django.
why i cant use nginx server to serve as a reverse proxy server for django.
my static file not loaded.
thanks for your help
Mirco
Suryo Adhy Chandra
Sea
Anyone here know how to do that with the Smart-Selects with the Cities-Light in django
01110010
Cant even load css
I use WhiteNoise to serve static files
Read more here
https://whitenoise.readthedocs.io/en/latest/index.html
Thierry
Bjr
mirodil
How to get (Parent) objects by filtering its child model?
class TvProgram(TimeStampedModel):
name = models.CharField(max_length=512)
class TvProgramSchedule(TimeStampedModel):
tvprogram = models.ForeignKey(
to=TvProgram, on_delete=models.CASCADE
)
schedule = models.DateTimeField()
I want to get Tvprograms (Parent) which its children's schedules are only for the 7 days, In my case I am getting tvprograms with its all children.
Is there a way to retrieve all the Parent objects that are in the filtered querysets?
vishal
Best tutorials for django
Doragonsureiyā
Best tutorials for django
Looking for Django tutorials? you can follow these three recommended ones:
* Official documentation and tutorial
* Tutorial from MDN
* Tutorial from django-girls
ManDo
why is ‘using’ not work when I use it in subquery?
chowmin
How to sent code in this group?
Doragonsureiyā
How to sent code in this group?
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://linkode.org, https://nekobin.com (or your favorite one)
chowmin
https://linkode.org/#oExt3QWNJgPW4iqxiMwq3
The .update() method does not support writable nested fields by default.
Write an explicit .update() method for serializer servey_quiz_form.serializers.editresponseserializers.ResponseSerializer, or set read_only=True on nested serializer fields. I'm getting this error
Vadim
Hello, there is a django server, POST requests come to it. How to write them to the database?[18/Apr/2023 12:47:18] "POST / HTTP/1.1" 200 20
[18/Apr/2023 12:47:28] "POST / HTTP/1.1" 200 20
[18/Apr/2023 12:47:38] "POST / HTTP/1.1" 200 20
[18/Apr/2023 12:47:46] "POST / HTTP/1.1" 200 20
[18/Apr/2023 12:47:50] "POST / HTTP/1.1" 200 20
Igor
Oxytocin
Hi guys
My user group doesnt have permission for post method and the class returns false to view(generics.create apiview), but my user can create object!
If you know the reason please help me
Oxytocin
.
Anonymous
i have a service in django but i want to create async telegram bot and therefore i want to make my django service async. How can i make this? Use django async or another framework
Vadim
I'm trying to get a POST request, but when outputting to CMD, the following message occurs "TypeError: MultiValueDict.get() missing 1 required positional argument: 'key'", if I specify the "Key" argument, it indicates that the type is NONE.
VIEWS itself looks like this:
def current_datetime(request):
if request.method == 'POST':
print("Test text")
print(request.POST.get('key'))
return HttpResponse('Test text')
Ing. Mario Tamayo
Sagar
Can anyone guide me
How to save selected data from dropdown in modelselect2widget in form?
Aleh
Can anyone help me
What do I have to do to get the admin interface to display properly after DEBUG=False?
I already do collect static but still have:
[django.request:241] log 9 140677998938952 Not Found: /static/admin/js/nav_sidebar.js
! ermurat
Aleh
yeah. I think I get it. I need to set up web server properly
.
Asad
Pip install Xhtml2pdf package is not supported on shared hosting, I want to generate and print pdf reports. Any alternative solution?