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
Anonymous
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
Anonymous
Anonymous
Anonymous
I have two models (user and trip ) how can i fetch the user through trip id
Kms
Nekot
Charanjit Singh
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
Anonymous
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
Charanjit Singh
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
Krishna
Dennoh
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
Dennoh
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
Anonymous
Anonymous
âshîsh
Unknown
https://pastebin.com/HVGUYwnH I have syntax error near From file_path. Please help me. I am new to this.
david john
david john
常雄 高橋
Hi, advise good and free courses on Python. Thanks in advance
Akhil
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?
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)
Mirco
First name (optional)
Mirco
First name (optional)
First name (optional)
field parameter won't be called in .filter(field=)
Mirco
Mirco
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)
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)
First name (optional)
my problem is with field
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