Mirco
garrip91
Anonymous
the value of list_display refers to is_staffdate_joined which is not callable anyone?
Anonymous
anyone?
Doragonsureiyā
anyone?
Maybe anyone is here, yes, but they are not obliged to read everyone's message here neither to reply to everyone's message, if someone wants to reply to your message, they will do that, just don't try to draw attention to your message writing "anyone?" every 5 minutes, that will lead you to be warned for SPAM/Flood, just be patient or use Google/DuckDuckGo to research about your question instead of wasting time here waiting for people to do your work.
Have a nice day 😊
Dennoh
garrip91
@pyflare Is it good idea for me: https://pastebin.com/etWdqKkG ?
Mirco
garrip91
Why not ?
I'm interested in your opinion
Asaduzzaman
I created a middleware for app title,slogan etc( generally it comes from a model). When i developed local server it was worked. But when i deployed on my vps machine it isn’t working. Anyone idea how can i solve that issue?
Mike
Hello anobody can for few words explain whats is it rest-framework for django and why its good? thankyou
Mirco
Mirco
Driptamine
Yo, how to solve
psycopg2.errors.InsufficientPrivilege: permission denied for table django_migrations
fn
How project tree is structured if I have 3 apps: home, login and dashboard app?
Each app redirects to each other.
User opens Home app, clicks sign in button and opens Login app, after successful authentication opens Dashboard app, that's it.
Is it true to create app to each page?
ken
hi. an interesting scenario:
(dunno even if this is recommended)
Is it possible to store a queryset (not the results, the queryset itself) in some string (or as some variable) w/o making a DB call, to reuse for later.
scenario is, there are multiple models that have a similar structure, and a large part of their queryset is similar and I have a common python function for db query (DRY ?).
Bunty chhatri wala..
Hey..
I want to filter a query based on search by another user.
eg: a user can search another users posts.
search = request.POST['search']
query= Post.objects.filter( status= 'published' , user= search)
But it is showing an error..
*Invalid literal for int() with base 10: 'rishabh'*
Here user is a foreign key.
Rohan
Rohan
I am guessing user column in Post table is id ref to user id and User table has name field
Krishna
when I'm trying to do Debug=False my admin site css and js not rendering
in browsers developer mode it's showing error of mimetype [" Refused to apply style from 'https://site.com/static/admin/css/nav_sidebar.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled. "], I added " mimetypes.types_map['.css'] = 'text/css' " but its not working
mukul
Sopan
Hello anobody can for few words explain whats is it rest-framework for django and why its good? thankyou
The site says:
------
Django REST framework is a powerful and flexible toolkit for building Web APIs.
Some reasons you might want to use REST framework:
• The Web browsable API is a huge usability win for your developers.
• Authentication policies including packages for OAuth1a and OAuth2.
• Serialization that supports both ORM and non-ORM data sources.
• Customizable all the way down - just use regular function-based views if you don't need the more powerful features.
• Extensive documentation, and great community support.
• Used and trusted by internationally recognised companies including Mozilla, Red Hat, Heroku, and Eventbrite.
---------
and if you implement rightly, then you may get paid (..like us)
ARBAAB
hello everyone...
can anyone help me with how to create custom message in django
Doragonsureiyā
hello everyone...
can anyone help me with how to create custom message in django
Don't ask meta questions like:
"Any user of $x here?"
"Anyone used technology $y?"
"Hello, I need help on $z"
Just ask about your problem directly! With ~80,000 people here, the probability that someone will help is pretty high.
How to ask smart questions: http://catb.org/~esr/faqs/smart-questions.html
Shubham
Do anybody have an idea about implementating Paytym payment integration in DRF for multivendor system, where customer/client can pay for the service directly?
Bunty chhatri wala..
Sopan
You need a mentor to guide you - what and where to go from here!
Akash
Cookies persist on Staging environment but not on localhost ! (react-FE, django-BE)
Both have path set to /
Stuck debugging the issue since yesterday, any help is appreciated !
IND_
hey guys any good resources to learn django 3.x
Anonymous
Im trying to create a school management system but I dont know how to create different users Student, Teacher, Admin, how to proceed with the models
Mirco
Akash
If i have added CSRF token to middleware and have certain POST request where I want to verify for CSRF, do I need to add decorator for that view ?
Driptamine
why do we always have to type these commands:
python manage.py migrate admin zero
python manage.py migrate auth zero
python manage.py migrate contenttypes zero
python manage.py migrate sessions zero
cj
cj
and I don't see a reason to run those commands tho 🤔
Driptamine
I'm always noticing this irritating migration issues
Dennoh
Driptamine
really frustrating
cj
as those are django-core migrations, you shouldn't worry about them
Driptamine
because after typing:
django-admin startproject project_name .
and
python manage.py startapp app_name
I'm getting this error:
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration admin.0001_initial is applied before its dependency accounts.0001_initial on database 'default'.
cj
if you really HAVE TO run those, you're doing something wrong or you broke something
Driptamine
but whats wrong with 2 basic commands?
cj
nothing wrong, it looks like you did something wrong or you're trying to use some out-dated package or something like that
Dennoh
Dennoh
cj
Dennoh
cj
neither the second one
Pratik
cj
Driptamine
Pratik
django-admin startproject demo then cd demo then python manage.py startapp demoapp try this
cj
the problem is not in the commands he used to create the project and the app
cj
Dennoh
cj
the problem he has on the migrations is caused by something else —he didn't explain yet—
cj
not by the commands he's running to create project/apps ... come one guys! open your eyes
Dennoh
😂😂😂
cj
cj
he doesn't have problems creating a project neither an app
Driptamine
exactly
Dennoh
cj
he has problems with migrations, which is caused most probably because he's using some old/unmaintained package or he's doing something else with some other apps he already has in his project...
which he didn't explain yet —and I don't know if he will—
Dennoh
cj
see? 🤷🏻♂️ he's not telling all the info, that's why it's hard to help him
Dennoh
cj
Driptamine
didn't wanna flood😝😝😝
Pratik