Maset
..
Don't know but do some Google search. U hv to implement in django backend
..
Again I hv never implemented but giving suggestion. Please don't take suggestion as holy grail
IZUKU
..
Use q filter in views
It may not help him. For example I type "new yorc". It's clearly spelling mistake but once tried to read it sounds like "new York" so it should return New York in result. Hope I understood the requirement
IZUKU
Franky
Hi, is it possible to prepopulate a field of a table with the value of a field from another (table)? eg: prepopulated_fields = {"description": ("AnagraficaMag.desc_art",)} 😔
Mihail
Which part do you have a problem with?
I am trying to do something like this to have any changes in admin panel, but don't have any success yet.
def get_formsets_with_inlines(self, request, obj=None):
if obj:
ProvidersStockFormset = inlineformset_factory(Offer, ProvidersStock, fields=['stock_raw_string'])
formset = ProvidersStockFormset(obj, initial=[
{'stock_raw_string': 'data'}
])
yield formset, ProvidersStockInline
Dembe
Hello some know this kind of error in Django 3.2..
EXCEPTION TYPE:
ERROR during template rendering
Exception Value: maximum recursion depth exceded while calling a Python object
The error line has written this :<link rel="stylesheet" href="{% static 'dist/css/adminlte.min.css'%}">
a
code?
jaxx
Anyone using HTMX here., I need help please
Doragonsureiyā
Anyone using HTMX here., I need help please
Your question is not related to Django.
If it's a Python related question go to @Python group, otherwise please move to @PythonOfftopic group and ask there.
jaxx
jaxx
you're asking about HTMX, not django
Sorry, I'll make myself clear about this.
I'm doing cart management using django and im using htmx to update the cart.. that's why i asked anyone using htmx.
Sorry for my incomplete question.
cj
HTMX can be used with any other web framework, if you have a question about django, ask it directly, avoid asking things like "anyone using XYZ"
cj
Cute
Hi Good Afternoon….!!
As i am trying to do load testing using locust.io ….i am facing issue how to do it perfectly can anyone help me if u guys know please
𝐀𝐥𝐢𝐫𝐞𝐳𝐚 𝐀𝐥𝐢𝐩𝐨𝐮𝐫
Hi
Im starting django
Can anyone introduce me best youtube course?
Kavya
I can't able to implement
{%extends 'base.html' %}
In temple.
It generate error. Anyony can help?
Mirco
change the signature, python standard is SNAKE_CASE for functions
AMIR
Евгений
Hello, maybe who know?
I installed SSL to my server and after that catch admin auth and all form error - Forbidden (403 ) CSRF verification failed. Request aborted.
I check settings.py and all form included csrf tokens and i use
'django.middleware.csrf.CsrfViewMiddleware',
'django.middleware.csrf.CsrfResponseMiddleware',
CSRF_TRUSTED_ORIGINS = ['http://wherefilmed.org/','https://wherefilmed.org/']
Mirco
Again, it's not a python standard
So whoever is telling you this bullshit, it's not a good pythonista
Alex
why creating list after fetching data?
Masoud
django.db.utils.OperationalError: could not connect to server: Operation timed out
Is the server running on host "db" (172.18.0.2) and accepting
TCP/IP connections on port 5432? Hi 👋 i have this error 👆 and i set port in settings.py and i don't no why it didn't work.
Alex
s@123
anybody can build this
s@123
eCommerce warranty system using NFTs
The objective is to replace the physical warranty and have block chain based warranty using NFT which will ensure
authenticity and security.
● Converting ownership authenticity and product warranty cards into decaying NFTs.
● For instance, allow brands and retailers to introduce an NFT for each of their products, which allows
customers to receive the physical product along with a digital version of it.
● Customers can then use the digital NFT to verify the authenticity of their product, prove their ownership of
their product, and transfer ownership of them upon resale.
● The brand/retailer should also be able to tie the digital NFT to its warranty program, allowing owners to track
repairs and replacements to the original item.
● Decay the NFT once the warranty is over.
● You can use the Polygon blockchain to deploy your solution and demo the final product as a web prototype
s@123
or you can you explain me briefly how I can build ith with Django backend and web3.py and solidity
Maxim
s@123
how to build dapp with django backend
AℤℐℤℬℰᏦ ☝️
Is any body know video to learn django drf ?
Fab 🌈 🐇🕸
sorl_thumbnail cropping automatically generates unusable thumbnails if the users upload any image. Did you ever approach this situation? Do you have your users decide where to crop?
yusof
hey
i have polymorphic base model its parent of other models like (courses, teachers,...)
now i wanna get the teacher model out of polymorphic model.
anyone know what gonna happen to records ?
Jerome
Harry gorilla
Page not found (404)
No Module matches the given query.
Request Method: GET
Request URL: http://127.0.0.1:8000/course/module/6/content/image/create/
Raised by: courses.views.ContentCreateUpdateView
Anyone understands how to solve this error? I can't find similar errors on the internet
Alex
Harry gorilla
Ak
Happy to Help
Guys someone has links to good django projects?
Happy to Help
Youtube/github/blog any link will do
Alen
For DRF development which is good , APIView or Viewsets ?
Is there any advantage or flaws over each other?
Fan / Ac
each has its own use
Alen
each has its own use
I am a beginner.
When I went through some documentation /tutorials ,i only understood that it somehow generate same result but in different way. Is that it or is there more. Can you elaborate or direct me to any sources
Fan / Ac
check this post
I would say viewset have more specific use which can be used in some specific cases to reduce our code
https://www.reddit.com/r/django/comments/sm07s2/drf_when_to_use_viewsets_vs_generic_views_vs/?utm_medium=android_app&utm_source=share
Alen
Fan / Ac
you are welcome :)
Anonymous
how to solve cyclic import (circular model import issue)
NightE
Hey there
Can I use this code even though I am using pure css
CRISPY_TEMPLATE_PACK = 'bootstrap4'
Kenechi
Figure
NightE
Thanks
Carlitos
I need to compare dates, with timezone. I have this date as string:
2022-07-13T20:28:38-07:00
when I add to a DateTimeField (tz aware) I get this on db:
2022-07-14 03:28:38.000000 +00:00
How can I convert the first string to the second to compare if it changed?
Naggafin
Naggafin
it might be beneficial to read up on datetime stuff in the python standard library docs: https://docs.python.org/3/library/datetime.html
Firdaus
Firdaus
Settings | Django documentation | Django
https://docs.djangoproject.com/en/4.0/ref/settings/#std-setting-TIME_ZONE
Carlitos
Thank you for your answers but seems that my question need more details. I will ask tomorrow I’m out for today.
Sibiselva
How to download a media file from 3rd party url , with django. Currently iam trying anchor tag and pass the link on href but it takes to new tab and start playing the media
Alex
Navroz
import environ
File ..././././environ.py raise ValueError, "No frame marked with %s." % fname
How to fix this?
Sibiselva
..
I've tried download attribute , not solved
It's nothing to do with django. It's pure HTML and browser feature. If a video is in HTML video tag it will not download but browser will play it. Do it's not a bug it's a modern browser feature
Sibiselva
..
Same goes for pdf files
Anonymous
Why we use heroku?
Alex
Hello guys. I started learning Django and DRF recently. I made frontend and backend with Django and after that i decided to make rest api using DRF, does that mean I need to rewrite views etc? Its look like hard coding. I saw a lot of vids about Django and DRF but none of them shows how to collaborate Django backend with DRF :( I hope someone can help me with advice or maybe useful links.
() { :;}; echo Nickolas
AℤℐℤℬℰᏦ ☝️
How to install packages from requirements.txt without version ??????????????????????????
() { :;}; echo Nickolas
Alex
() { :;}; echo Nickolas
As i understand you could work only with symbiosis of react + drf and it will work?
You're not limited to react/angular/vue but you do need a front end framework to query the API.
You could ofc also build a desktop app-like application with electron or whatever the flavor is you prefer but the gist of it is you'll be performing REST based HTTP calls towards your DRF application.
Think of DRF as your backend "with no interface" (im ignoring the built-in interface it has)