George
this only skleton how django projects looks like right?
a django project but more organized than default, yes
George
Hi, I nees help. I'm trying to implement some asynchronous tasks with celery and I'm stuck. Here is the code: pastebin.com/flNYmNmm In the original Python script I use asyncio library to do the task, but I need to implement it on Django, any idea about how to convert it and make it work? With the current script I get the error: There is no current event loop in thread 3
Anonymous
Hey guys I created some js files. I wanna my html and js filers be render in some secret way , I don’t wanna some one can copy my scripts. I can do that with render template in view, after that send file to frontend. But i wanna be able to use js script in frontend also to change the UI
Anonymous
Are there any django hackathons, if ye swhere can one find them?
Archie
has someone an example how to mock socket with db using pytest?
Abdellah
Hey I'm trying to create a website can anyone help me
Abdellah
I am a beginner I don't know anything I want a video or a book
Holla
after trying to make python manage.py makemigration myapp
Holla
there is a model field with error it seems okey to me here it is
Holla
emp_code = models.CharField(max_length=3)
Holla
fixed it
Anonymous
hi guys After i override the save behaviour for a model in admin.py how do i make it work in the forms.py to
Anonymous
whats the question?
How i can run html and js and users can not see what i am using
Luis
hi guys After i override the save behaviour for a model in admin.py how do i make it work in the forms.py to
Option 1: copy & paste. Bad option, but save_model belongs to Admin only. Option 2: define the behaviour un form, and use the same form un Admin.
Anonymous
hey guys can anybody help me? CSS file doesn't work in extends(or child template) I have my project in my virtual env. I made a website. But i have just made the better vershion of the website design. The strange thing is. The old pages work good. But new one django doesn't see maybe the problem with env or i don't know
Holla
def employee_list(request): return render(request,"Employee_Register/employee_list.html") def employee_form(request): return render(request,"Employee_Register/employee_form.html")
Holla
its saying that the template of employee_list doesnt not exist while the emolyee_form is working fine
sebastian
hi, I am asking for help with a problem i am having. I perform a load per form that consults some apis and must return a json with a function that takes an average. when you load data by form it exits else status 404 I share code from views.py https://pastebin.com/nH73Vy2q
kamaraj
form - method returns None in the html page
kamaraj
views.py file
kamaraj
def welcome(request): # a=request.POST['num1'] # b=request.POST['num2'] # c=int(a)+int(b) a=request.POST.get('us') b=request.POST.get('ps') print(a) print(b) return render(request,"welcome.html",{"res":b}) #LOOKS GOOD
kamaraj
how to get data from the form inside div tag -input field?
Anonymous
How to get template variable value in JavaScript????
Anonymous
Like I have to acces the entered value in {{form.product}}
Anonymous
In JavaScript
Anonymous
Please help
Anonymous
Like I have to acces the entered value in {{form.product}}
<script> let products =[] </script> {% for item in form.product %} <script> products +=[...products, “{{item}}”] // or products.append(“{{item}}”) </script> {% endfor %}
Anonymous
But Maybe its not best way
Anonymous
Hmm
Anonymous
Should I have to acces these values in backend
Anonymous
Ask again
Anonymous
One minute
Anonymous
Anonymous
{{ form.field.value|default:”” }}
Bro I have send you the pics of code
Anonymous
Resolve the issue please
Cheap
dpaste.com/3HWCWPS this paste is from django’s official doccumentation, what action is done of form.is_valid() is false and how to tackle it properly?
Doragonsureiyā
dpaste.com/3HWCWPS this paste is from django’s official doccumentation, what action is done of form.is_valid() is false and how to tackle it properly?
Please, provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you. Include details such as libraries, platforms, modules, etc.
Imran 257
Hi, This is Imrankhan I want django e-commerce website tutorial or GitHub. Please send link Thank you..
Maz
I am a beginner I don't know anything I want a video or a book
Wait right there, the doctor will be with you shortly. 🤣
Amit
Hi, This is Imrankhan I want django e-commerce website tutorial or GitHub. Please send link Thank you..
Go and search durgasoft django on YouTube. It will clear all the basics of django.
Alberto
Hi, I need some help. I'm trying to implement some asynchronous tasks with celery and I'm stuck. Here is the code: pastebin.com/flNYmNmm In the original Python script I use asyncio library to do the task, but I need to implement it on Django, any idea about how to convert it and make it work? With the current script I get the error: There is no current event loop in thread 3
Bershawi
hello guys I'm searching for a job in Django if anyone could help
Bershawi
Mirco
This isn't a job platform sorry
Bershawi
👍
Alberto
Hi, I need some help, I'm using celery to handle some emails tasks: pastebin.com/3TCxe4w2 But I get an error (on celery, Django works well): DatabaseError objects created in a thread can only be used in that same thread. The object with the alias "default" was created in thread x and this is thread y What's wrong?
OnlyGod
Hey anyone, wants to learn more about using django foreignkeys in django models. check out this post : https://medium.com/@OnlyNfK/using-foreign-keys-in-django-models-826a03b902e7?source=friends_link&sk=a0dd49e0ae14bfc1e16ac2a2ee02b66d
Alberto
first you should have configured in your settings.py all stuffs that celery need anyway, advice: instead of render use from django.template.loader import render_to_string
Yes, I use render_to_string on the tasks functions, each return an email send and then, on vews.oy I return the template, but putting it all together works fine, I just want to improve it using celery
Alberto
I saw that error happen when using Windows, don't understand why but that is. But I have connected celery to redis using Heroku so this should be fixed, shouldn't it?
Lelouch
Error : cannot import name 'path' from 'django.urls' Help tried many attempts but cant fix
__
Can anyone help me with writing a custom signup in django rest auth
__
I am having trouble with it
JoKer
Django rest-auth allauth custom user registration returns this insted of user detail DoesNotExist at /rest-auth/register/ Site matching query does not exist. Request Method: POST Request URL: http://127.0.0.1:8000/rest-auth/register/ Django Version: 3.0.5 Exception Type: DoesNotExist Exception Value: Site matching query does not exist. Exception Location: /home/abhiram/training/1.1 basic rest api auth/env/lib/python3.8/site-packages/django/db/models/query.py in get, line 415 Python Executable: /home/abhiram/training/1.1 basic rest api auth/env/bin/python3 Python Version: 3.8.2 Python Path: ['/home/abhiram/training/1.1 basic rest api auth/acc_setup', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/home/abhiram/training/1.1 basic rest api ' 'auth/env/lib/python3.8/site-packages'] how to solve it
Gil
Better if you use online code paste tools
Anonymous
I wanna add events on calendar(not full calendar) via Ajax.. which kind of view do u suggest me? Class based views or function based? I wanna write as less jquery code as i can
George
Try django-q
okay, thank you :))))
📱 𝐿𝒶𝓈𝑒𝓇𝑔𝒶𝓂𝑒𝓇
https://stackoverflow.com/q/61574966/9874392?sfb=2
📱 𝐿𝒶𝓈𝑒𝓇𝑔𝒶𝓂𝑒𝓇
Please help I am stucked on custom filter tag it's not working in template
Anonymous
Hey guys please help me out...have anyone of you done any disease prediction projects or appointment booking projects...then please help me out
Anonymous
Hello everyone!🖐
Anonymous
Have anyone marketplace cod