Ilsaf
?
SNIR
there is a way of using multi models in a form. and build how it save everything when i click submit?
SNIR
on submit form, can we pass value of each field with the request.POST ?
Дауран
Guys I have such issue in my Django admin , so I can't delete any users from Django admin , how can I solve such issue
Дауран
There are 4 users , I can't delete them
Mirco
Anonymous
Anonymous
And why don't you store all contexts in a variable and pass to return
Anonymous
In this if we call get_queryset it creates instance of the class ...wt will exactly return.....and how we will get data as...no method we r calling???
Anonymous
class PersonQuerySet(models.QuerySet):
def authors(self):
return self.filter(role='A')
def editors(self):
return self.filter(role='E')
class PersonManager(models.Manager):
def get_queryset(self):
return PersonQuerySet(self.model, using=self._db)
def authors(self):
return self.get_queryset().authors()
def editors(self):
return self.get_queryset().editors()
Sweetie
I had a perfectly running django project.
But today it started getting stuck at collectstatic
On the production env it does not get ahead of collectstatic command and remain freezed forever.
While the collectstatic command runs fine when I run it locally.
My static dir and all are correct as the project was working fine with static files since last few months.
Dan
Hey men I created a project on Django, pushed it on github on Ubuntu 20. I made pipenv also. Now, when downloading it on to my Windows computer, I try executing 'pipenv shell' but it says 'Failed to create virtual environment'. It causes Filenotfounderror - can't find python way. Can you please help me with it? Thanks
Dan
Mirco
Mirco
Dan
О, thanks, im dummy)
Isaías
Hello. What do you use to document api?
Chandan
Does anyone know how to rectify
'Class has no objects member error' because of pylint
in Django ,I am using vscode on windows
If I fetchall in Postgresql, there is only one result, but there are 2 records in the database. What could be the reason?
def topadders(self,chat_id):
cur = DB().connect()
cur.execute("SELECT * FROM table WHERE group_id = '"+str(chat_id)+"' ORDER BY soni DESC LIMIT 20;")
curr = cur.fetchall()
for row in curr:
return row
#psycopg2 #py
Anonymous
Can we deploy or host our dajango project on GoDaddy or C panel?
Nagadeep Sharma
Nagadeep Sharma
imacat
Hi. Is the async support in Django 3.1 deals the same thing as the ASGI capability in Daphne?
I mean, if I turn from ASGI/Daphne to Apache mod_wsgi, will the async support in Django 3.1 be turned off?
Doragonsureiyā
imacat
Yes
Well, thanks. I shall turn from Daphne to mod_wsgi, since the 3.1 async support breaks my code and I cannot find a simple way to fix it.
Anonymous
Can i build django rest api with windows 7?
Anonymous
Anonymous
Ferhad
S
How To Resolve This Error
from django.core.urlresolvers import reverse
ModuleNotFoundError: No module named 'django.core.urlresolvers'
Anonymous
Which version of django ur using
Ram Kumar Shukla
imacat
Yes
I shall try to turn to mod_wsgi tonight first, and then study how to adapt async in Django 3.1. It does not make sense if I have to adapt codes that I can only test and verify on the production server.
Kusuma
Hi, how can I use fontawesome pro in django-fontawesome-5 in models? I have follow https://pypi.org/project/django-fontawesome-5/ but my pro icon is not detected in django admin, only detected on the templates.. please help
Kusuma
my setting
FONTAWESOME_5_CSS = '/static/fontawesome/css/fontawesomepro.css'
FONTAWESOME_5_CSS_ADMIN = '/static/fontawesome/css/fontawesomepro.css'
S
Django 3.1
Anonymous
Is there a way to block django superuser from doing things that a normal(non-staff/non-SU) can do?
Anonymous
They're from java(spring hibernate) background, maybe there's such problem in java frameworks but not in django?
Anonymous
Mirco
Obviously 😛
Anonymous
Do anyone have knowledge of mongodb?
Mr. D @
hey,
what do prefer to use with django?
Nginx with Gunicorn OR openlitespeed (or apache..)?
with openlitespeed there is not need for gunicorn and some benchmarks shows its faster.
what do your think?
Sh
Assalamu alaikum.
I read this article
Task Queues: Another example is when a database query would take too long during the HTTP request-response cycle. The query could be performed in the background on a fixed interval with the results stored in the database. When an HTTP request comes in that needs those results a query would simply fetch the precalculated result instead of re-executing the longer query. This precalculation scenario is a form of caching enabled by task queues.
Any examples for that?
Andrej
Mirco
buy it
Mirco
piracy is not supported here
Daniele
there's plenty of free resources to learn django.
personally I've bought a course on udemy for a few sheckels - ended up following a course on youtube (by "the net ninja", if admin allows me to link it, I'll pass it on).
ozxx
You can find it on lib genesis if available
Mehmet
Sh
Mehmet
It is up to your needs actually. If your result set is high dimensional, you may use OLAP cubes or relational backend. If it is pointer-based data such as the calculated rank of every single user, you may use NoSql solution or cache backend such as Redis.
Sh
Biagio
Just one question: is there a django framework that allows me to have a backend just like WordPress? Or simply let me skip some development phases?
Enes
Enes
Im from turkey we are siblings :)
Mehmet
Mehmet how did you learn Django? I want to learn but i cant find any source extremely
I have learned Django after professional development experience in Java Spring MVC/Spring Boot on some enterprise projects for insurance companies in Turkey. I have only used https://www.tutorialspoint.com/django/index.htm in order to get used to Django's design patterns. Following that all I did was re-implementing some of my personal projects in Django and using stackoverflow to solve my basic problems, reading up Medium articles to learn pythonic ways of handling advanced webapp issues such as task queueing, authentication authorization pipelines, Db performance tweaking, caching strategies. I love reading articles on metrobusses in Istanbul and all I did was reading. I personally cannot integrate myself into a tech stack without using it in a real project with time/cost/scope constraints 😂
ozxx
Mehmet
It is against the rules of the group to promote a page I guess. I write a blog in Turkish about python.
Enes
Wow that's good mehmet. I am also in Istanbul. But i wasn't thought you are in Turkey
Enes
You have a history of programming. This is an advantage for you. You are luck
Enes
Anonymous
can anybody send examples of lazyload, infinity scroll or endless pagination?
Anonymous
every example that i try to find on the internet doesn't work
Дауран
guys i have serious errors such as (TypeError at /admin/auth/user/ ) when i wanted to delete some users from django Admin even I have attempt to remove with shell but it didnt help me
Anonymous
Anyone idea about how to remove duplicate in django sample history.
I didn't update any thing,but i click on send button, everytime same data come.
Anonymous
Anyone tell me answer
Firdaus
Anonymous
Anonymous
But it's not working.
S