Doragonsureiyā
hello for django anybody knows any tutorial for full project tutorial? thankyou
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Bug_23¶
Hello, my django crontab runs when I use manage.py but fail to run in background. Need some help Thanks
Anonymous
Hello, I tried integrating TinyMCE into my django admin area but for some reason it keeps throwing back the text I type in, with html tags. Help would be appreciated
Anonymous
Hi everyone. I have a problem when I try to update the database with the checkbox. It works, but this appears. Failed to load resource: the server responded with a status of 500 (Internal Server Error). How can I solve that?
Anonymous
Hi guys, someone could share a project that uses graphics. please
âshîsh
Hi guys, someone could share a project that uses graphics. please
Why don't u try Hello world with orange background 🐸
Anonymous
how can I pass foreign key id in post request in drf?
Just pass the integer or id of the foreign key
M
How to embed img from external hosting in Django Template? I have tried to pass Url as URLField, still I'm getting scr unknown https://stackoverflow.com/questions/66049046/how-to-embed-img-from-external-hosting-in-django-template?r=SearchResults
Anonymous
what's the difference if i use 'blogs.apps.BlogConfig' in INSTALLED_APPS vs simply 'blog' both seem to work what's preferred?
Anonymous
Is there anyone, who can give me a free course on django major projects? Please.... I have to submit a project in my college
Nekot
what's the difference if i use 'blogs.apps.BlogConfig' in INSTALLED_APPS vs simply 'blog' both seem to work what's preferred?
first way is preferred. if you use just 'blog' you need to also speciffy IIRC DEFAULT_APP_CONFIG in __init__.py otherwise app would work but without your custom app config that means if you try for example to load signals in ready() it won't work
Anonymous
I have two models (user and trip ) how can i fetch the user through trip id
Charanjit Singh
In trip model add a field parent_id = models.ForeignKey(User,on_delete = models.Cascade)
Anonymous
Hello, I tried integrating TinyMCE into my django admin area but for some reason it keeps throwing back the text I type in, with html tags. How do I fix this?
Krishna
How i can send multiple fields in message od send mail
Anonymous
was making a user login/logout and i got this error: File "C:\Users\LENOVO\Desktop\mysite\main\views.py", line 33 form = UserCreationForm ^ IndentationError: unindent does not match any outer indentation level
Anonymous
where did i go wrong?
Spartan
Anyone have idea how to stream video from amazon s3 in Flask?
Anonymous
It's better to ask Alexa 😄
Anonymous
Just kidding
Anonymous
form = UserCreationForm()
i tried,but it was still giving the same error
Charanjit Singh
You have to send cofe
Anonymous
Krishna
I want to send multiple inputs from user to mails When it tried to add those in sendmail message it gives multivalue key error.... Inshort i want to send information inputed by user like name, email, number, age, message. But cant add those all fileds in sendmails message... Anyone know how i can do it?
Anonymous
hello! I'm using django-modeltranslation. How can I write drf serializer for this? can anyone help me please
Akhil
Hi all, I'm getting page not found error, I'm trying url mapping .. In project level urls.py added [path("first_app/", include('first_app.urls)), path("admin/", admin.site.urls),] In urlpatterns list And under first_app folder I have created urls.py and added below line in urlpatterns list [ path('',views.index, name='index'), ]
Krishna
def thanku(request): if request.method == 'POST': name = request.POST['name'] number = request.POST['number'] email = request.POST['email'] messages = request.POST['message'] Message = {'name':name, 'number':number, 'email':email, 'messages': messages} send_mail('Contact Form', Message, settings.EMAIL_HOST_USER, ['xxxxx@demo.com'], fail_silently = False, ) return render(request, "thanku.html") After submitting form I get error of : 'dict' object has no attribute 'splitlines'
Tobi
hi, say I have this model class Event(models.Model): ... metrics = models.OneToOneField("evmetrics.Metrics", on_delete=models.PROTECT, default=Metrics.objects.create) I want to be sure of what I'm writing here, for each new Event object created, a new Metrics object will be create and link to the event by a OneToOne relationship, is there any chance this is really bad code or this could be a problem ?
Shukhrat
Hello
Shukhrat
I have uploaded my django website to the server and sometimes get error for few images like content length mismatch. However, if you open image in a new window you can load image. How to solve this issue? Apache 2.4.9, Django 3.1, Python 3.6
papunjay
Any one help me to get first job... I am 2019 pass out cse branch... I did the many project in Django
Enes
Hi. I create a form and form data comes with request.post but in form class clean method, I printed cleaned data but it comes empty. Can anybody help?
Anonymous
Can someone help me? I installed django, but when i try to create a project using django-admjn startproject, i got error that django-admin it is not a command
âshîsh
Can someone help me? I installed django, but when i try to create a project using django-admjn startproject, i got error that django-admin it is not a command
Either Django is not correctly install or Django is installed in virtual environment & you are trying from global CMD
Unknown
https://pastebin.com/HVGUYwnH I have syntax error near From file_path. Please help me. I am new to this.
常雄 高橋
Hi, advise good and free courses on Python. Thanks in advance
Akhil
Make sure you've already included your app first_app in INSTALLED_APP list in settings.py.
Yes, got it🤜🤛 Thank you @miraikara39, it's working now.
Akhil
I want to create a online airplane booking system can anyone can help me with it
Anonymous
yes
Anonymous
i did that project
Abhishek
Can someone share free notes?
Vadym
Hi, advise good and free courses on Python. Thanks in advance
This a good basic course about web development with Python from Harvard CS50 https://www.youtube.com/playlist?list=PLhQjrBD2T382hIW-IsOVuXP1uMzEvmcE5
Anonymous
Just pass the integer or id of the foreign key
I didn't understand how can you write the line
Anonymous
how in signal post_save you can take object request?
Nani
Bro anyone had finished django project on attendance system
First name (optional)
Hello guys. is there a way to pass a field to a function and use it to query database in django ? I mean like: def search(model, field, token): model.objects.filter(field=token)
First name (optional)
Mirco
it's not gonna work.
Because you pass wrongly params
First name (optional)
field parameter won't be called in .filter(field=)
Mirco
field parameter won't be called in .filter(field=)
It's better you show how you call search()
First name (optional)
It's better you show how you call search()
search(Orders, 'tracking_id', 'XXXX')
Mirco
search(Orders, 'tracking_id', 'XXXX')
You cannot pass model name in that way
Mirco
You can create a dictionary by mapping as keys the name of the model as string and value the model class
Mirco
And then pass it as string into the search
First name (optional)
And then pass it as string into the search
can you give me an example in code ?
Mirco
models = { "Order" : Order } Inside your search you can do model = models.get("what_u_pass") And the model.objects.filter if model is not None
Shubham
hello please anyone can help me in django crud... I am begginer...
First name (optional)
my problem is with field
Mirco
this is not what I asked ...
So explain better the error or show it
Mirco
And you will receive a better answer
First name (optional)
And you will receive a better answer
I meant how can I pass field to model filter. from a function def search(model, field, token): model.objects.filter(field=token) ^^^ ^^^ as I want change it everytime e.x: I want to search whether a tracking_id exist in a model or not. and the field name is different in models. in Orders model it's tracking_id, in Payments it's payment_id and... so it should be: search(model_obj, 'tracking_id', 'XXXX') —> for Orders search(model_obj, 'payment_id', 'ZZZZ') —> for Payments