cj
Do you think it is a very bad idea to promote django in this way? Possibly postgresql can be used, but large amounts of data will be stored on the server. Which do you consider the most suitable?
it's very bad idea to use Python and SQL Server at all... also PostgreSQL is kinda better than SQL Server if you're planning to have a loooooooooooot of data to play with
rtg
👍
rtg
Excellent! PostgreSQL in Ubuntu 20.04LTS will be data server. Thanks!
Anonymous
can i share link of the my question from stack overflow here ?
Hossein.A
put inserted between (" text ";) What?
bala
Can someone tell me the AJAX call for deleting a data in HTML (template)
Nαψαภ
hello members__ I am deploying Django app on Heroku.. getting error ...
Nαψαภ
{% for post in object_list %} 15 <div class="container alert-light"> 16 <div class="d-flex bd-highlight"> 17 18 19 <h3><a href="{% url 'article' post.pk %}">{{post.title}}</a></h3>
Nαψαภ
relation "theblog_post" does not exist LINE 1: ...reation_date", "theblog_post"."publish_date" FROM "theblog_p...
Nαψαภ
theblog is app name
ask
https://dpaste.org/pNUW#L4 hi how can I set default value for DealerUser user_price_type such as price_type from Dealer model?
Alex
https://dpaste.org/pNUW#L4 hi how can I set default value for DealerUser user_price_type such as price_type from Dealer model?
It should work as is. You only need to be sure that there is a price_type with id 1. You can create it by a data migration
Alex
https://docs.djangoproject.com/en/4.0/topics/migrations/#data-migrations
ask
https://dpaste.org/PELA it should works like that
Alex
https://dpaste.org/PELA it should works like that
Then you have to implement a factory and use it in your business logic https://en.wikipedia.org/wiki/Abstract_factory_pattern
ask
okay, will try. thank you do you have an example of it?
yusof
hey guys, i used self.model_set in my model class method to get relation records with reverse. but its not optimize with queries. i have lots of similar queries. how can i use select or prefetch to optimize it? thanks
Alex
okay, will try. thank you do you have an example of it?
there are tons of examples in search https://refactoring.guru/design-patterns/abstract-factory/python/example
Ashish
Is this the right forum to try and hire a Django developer?
Doragonsureiyā
Is this the right forum to try and hire a Django developer?
Rule 🔟: Job-related offers are only allowed in the offtopic group. To not be considered spam, Job offers must include: • Skillset/techstack • Contact information • Brief job description • Pay figure • And can only be posted in @PythonOfftopic.
Ashish
Thanks
Tinsae
what is celery in django
Rohan
what is celery in django
What is google on internet?
lubaskinc0de
at / __init__() takes either a Q object or lookups as keyword arguments
main.c
who has already use django_unircon ? i have some questions plz
Axror
Hello guys. I am using django-rest-swagger. And swagger authorization not working. How can I solve this issue?
Doragonsureiyā
who has already use django_unircon ? i have some questions plz
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z!" Just ask directly! The better you are at explaining the problem, the more likely you are to get help. Asking smart questions
Ehsan
I want to open my website with server ip, and after i do that my images dont open becuase their link they are with domain not ip, how i change domain to ip for link of media files?
Gigil
Could someone share doc or tutorial on how to embed powerbi report user owns data method in django
Gigil
I already got app owns data now looking for user owns data
Arjun
Hello friends, Django admin is not loading css i am looking for solution
Naveen
Arjun
Thanks naveen, Default admin css.
Naveen
Check setting static url
Alex
what is celery in django
It's actually a good question. I would call it a framework for background workes. So idea is that - you can allocate a few process that will hang in the background and periodically send them tasks from your main app. You send these tasks via a broker - usually some queue like rabbitmq. That's mostly the main story. Beside that, celery also manages those background process (called workers) - it tracks their status and can shut them down and etc.
Arjun
STATIC_URL = '/static/'
S
Hello Dynamic PDF genrator in my server This error generated error running wkhtmltopdf, command: ['--cache-dir', '/tmp/pydf_cache', '-', '-'] response: "/home/sagarjaya/public_html/venv/lib/python3.7/site-packages/pydf/bin/wkhtmltopdf: error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory" Please how to fixed this error
S
install libjpeg
already installed
Yura
Hi. Please help to find way to filter by annotation values ``` queryset = ( Auditorial .objects .annotate(label=models.Func(models.F('labels'), function='unnest')) .order_by('label') .values_list('label', flat=True) .filter(label__icontains='rec') # Does not work =( ) ```
Yura
I neeed to return “choices” of array field “label” by query
Yura
put filter() before values_list()
I put, but problem still not sloved queryset = ( Auditorial .objects .annotate(label=models.Func(models.F('labels'), function='unnest', output_field=models.CharField())) .filter(label__icontains='rec') .order_by('label') .values_list('label', flat=True) )
Hadise
Hi As you know jango has a admin panel by defualt Is the same In other framwork of languages ?Like .net
charlie
Does any other framework have?
Hossein
Hossein
there's alot of frameworks out there so i can't know for sure
Hadise
Does any other framework have?
I think Laravel has a pane admin but its not free
Hossein
I think Laravel has a pane admin but its not free
it's not built-in like django, right?
Yura
How can I write this query using Django ORM: SELECT label from ( SELECT DISTINCT on (label) unnest("auditorial"."labels") AS "label" FROM "auditorial" ) as subQ WHERE upper(label) LIKE upper('%rec%') ORDER BY label If i have this model: class Auditorial(models.Model): labels = ArrayField( models.CharField(max_length=64, blank=True) )
Hadise
as far as i know .net doesn't have an admin panel by default
So Is it wise that built a panel admin with django?
Hossein
Hossein
u wanna build a new one or?
Hadise
django already has an admin panel
Yeah i know but i wanna to built a cms wihe django And im confused that is true or not
Hossein
Yeah i know but i wanna to built a cms wihe django And im confused that is true or not
you can extend django's admin panel or u can build a website entirely from scratch
Hadise
use wagtail
I wanna to build my own cms with django😅
cj
I wanna to build my own cms with django😅
again: use wagtail ¯\_(ツ)_/¯
Hadise
TnQ guys😢
H-Soft
How to install FontAwesome with pip install
Alex
How to install FontAwesome with pip install
That's unrelated to django. It's not how it intended to work. Either link it from cdn, or use frontend tools to maintain dependencies.
Saleque
how could I make django social auth api?
Doragonsureiyā
how could I make django social auth api?
Step 1: Open a browser Step 2: Write down https://google.com or https://duck.com and press Enter Step 3: In the search box, write down the same words you asked here Step 4: Read the first results
Mani
Hi, In one of my projects, i'm getting fatal too many clients using postgresql but in the meantime, my project max connection age is 0, so if connection are closed after each request, why i'm getting this error?
Anonymous
Hi, guy I have problem about how to perform calculation and generate table in database through Django rest_framework API my table look like: payment_date =models.DateTime(auto_now=True) item_name =models.CharField(max_length=255) cash_amount =model.DecimalField(max_digit=10,decimal_places=2) total_tax =models.DecimalField(max_digit=5,decimal_places=2) Item_number =models.Integer() hint: my problem is I want to perform calculation on (total_tax column from cash_amount which came from a request and save to database ) Am using ModelViewSet approach to create API so what can I do?
Alex|Web developer
hello
Alex|Web developer
in which file can one write the slugify function in views?
Doragonsureiyā
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain: - what you're doing - what you're expecting - what you're using - where you're running the script - what Python version you're using - what packages and their versions you're using - and the most important thing: show the code YOU wrote (read rule 5️⃣ for that) and more details, that way your chances to get help will increase
Fan / Ac
django already have this, you just need to extend the User model and add user role and implement access as you needed