Dima
JAIVIGNESH
Form feed means entering a data or displaying a data
Please let me know
Anonymous
Dima
board = Board.objects.get(id=board_id)
cards = board.card_set.values()
Then i get this values
<QuerySet [{'id': 1, 'created_at': datetime.datetime(2021, 3, 2, 8, 13, 38, 749198, tzinfo=<UTC>), 'board_id': 1}, {'id':
2, 'created_at': datetime.datetime(2021, 3, 2, 8, 14, 3, 326147, tzinfo=<UTC>), 'board_id': 1}]>
But i need all items inheritanced from Card(model) - not the Card
faran
board = Board.objects.get(id=board_id)
cards = board.card_set.values()
Then i get this values
<QuerySet [{'id': 1, 'created_at': datetime.datetime(2021, 3, 2, 8, 13, 38, 749198, tzinfo=<UTC>), 'board_id': 1}, {'id':
2, 'created_at': datetime.datetime(2021, 3, 2, 8, 14, 3, 326147, tzinfo=<UTC>), 'board_id': 1}]>
But i need all items inheritanced from Card(model) - not the Card
please put the full code in paste bin based on whats in pastebin only board inherit from the card .
and what exactly you want to do . get all cards with the given board or get all boards with the given card because you said something lately but now you saying diffrent thing.
Deleted
https://stackoverflow.com/questions/66436071/raise-ldapinvalidservererror-ldap3-core-exceptions-ldapinvalidservererror
Deleted
please help with this, thanks
Dima
Dima
Dima
faran
I have many types of cards
its not a good choice to make a seprated model for each of them you should make a main card as you have and then add a type field and set a relation to the type model and make as much types as you want thats the good logic for it . what you have now is not correct. and also the logic of model told clearly in documentation read it.
Dima
faran
Neo
hi, which is the better way to use user, roles and permissions for a online web application which has app admin(who adds administrators like user manager, category manager, content managers)
sim
class ContactView(View):
def get(self, request, *args, **kwargs):
form = ContactForm()
return render(request, 'contacts/contact.html')
sim
can anyone explain 2nd line
Sam
guys any recommendations on starting Django?
Mirco
Doragonsureiyā
guys any recommendations on starting Django?
Looking for Django tutorials? you can follow these three recommended ones:
* Official documentation and tutorial
* Tutorial from MDN
* Tutorial from django-girls
Sam
nice thanks👍
Sam
is the book "Django for beginners" any good ?
Mirco
Sam
👍
Faisal
Anonymous
how can i solve this error===========> 'DIRS': [os.path.join(BASE_DIR, 'templates')]
NameError: name 'os' is not defined
Umar
Ashutosh
Xudoyberdi
Anonymous
Umar
Aryan
Hey! Anybody can tell me how can j add seo to a django webapp??
Vaibhav
Anybody got any idea about this
First of all only take user id from request then search it through default user model manager, then take gender and other parameters from manager instance.
Aryan
Vaibhav
Please answer this also
https://medium.com/@bedjango/4-seo-tips-to-position-your-website-using-django-96999d373222
Aryan
Thank you for your help ❤
Ivan
Guys, need help, please.
I have 4 models:
Lesson
Image
Video
File
Text
Logic: lesson has images, videos, files and texts by M2M fields.
How to make custom ordering theses elements (also I should change ordering in future)?
Umar
Charanjit Singh
Hi I have developed quiz application and facing issue after launching it..I have used paginator module to display questions one after another.It was working perfectly in development stage but after deploying it to server. only 1st question is being displayed.I have also used random module to randomly select the question
faran
hi
first time using jsonfield. and I heard alot about the problems like query and ... . and in my case I can use EAV technology as alternative .any experience in jsonfield or eav ? any advice?
Anonymous
Yeah i just installed Django project
It work find when intergrade to django app. It's not support
Error display Window error 123 module not found.
Guys please help me and rectify that problem
thenils
how to do filtering on search querylist
Doragonsureiyā
how to do filtering on search querylist
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
Doragonsureiyā
how to do filtering on search querylist
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
Vaibhav
Vaibhav
Umar
Ivan
Which type of ordering are you taking about..?
For example: if I have model Lesson and model Video, I can sort videos by ID. But if I have Image ,Video ,File, Text and I need to sort like
Video id=1
Text id=2
Photo id=3
Text id=1
Ivan
So I dont know how to make ordering for all these models
[Image,
Video,
File,
Text]
Vaibhav
Use order_by..
Check document for reference.
Vaibhav
Ivan
It is not working in this case..
Fabian
RuntimeWarning: DateTimeField User.last_login received a naive datetime (2021-03-02 17:03:39.824728) while time zone support is active.
what does this warning means?
Fabian
...
cj
...
are you blocked from using Google? 🤔
xzenon
Enigma
hey whatsup
can anyone help me?
i want to add sth in my product models that alows only zip or rar files to get upload... sth like ImageField for images
Enigma
Anonymous
Hello everyone! I am writing to you about a small problem that I cannot solve. I'm doing microservices (each one has its own database) with django, which works very well. The only downside is that I am trying to add records of one of the services from the admin view (one of the services is the one that contains admin) and I get the error: cannot assign (a foreignkey): the current database router prevents this relation From the specific service shell, when I create the record, it does it perfectly. Could anyone help me? Thanks 😁
cj
Enigma
there's FileField
I know but if i use that field user can upload all type of files i only want to let the user to upload rar or zip formts
cj
Anonymous
hey, how can I try a server error (error 500) in localhost?
cj
for example if you want to save only PDF, you have:
file = request.FILES.get("fileName")
if file.content_type == "application/pdf":
...
Anonymous
i mean, how can I force that errror
Charly
Anonymous
i want to check if the template for that error is working
Anonymous
youre right, lol
cj
Enigma
cj
because it's crashed