Kamlesh
Using in django dude
I am also working on same project....
Nematullah
Hello i need to export data to pdf do you have any example of reportlab library which exporting data to pdf in Django
Kamlesh
https://docs.djangoproject.com/en/3.0/howto/outputting-pdf/
ishak
When I write unit tests, variable of took a model object keeps old data like below. What is the best practice to update it. class Test() def setUp(): self.user = User.objects.get() def test_someting(): self.client.post() # change user' info # in here "self.user" has old data # I should do this everytime for get new info self.user = User.objects.get()
Hu
hi, i have a problem with django, i was created a tabele to coment on the post, and i used the forenkey to ther coment tabele now i wan to costumes the user who can coment on the posts i want only the user whe logged in at the admin django Can add coment but at ther every one can add coment!! how can i solve this problem?!! thanks 👇
ROG 💻
Why could this error be when using Crispy Forms?
ROG 💻
AttributeError at /pets/add/ 'BoundWidget' object has no attribute 'field'
A
I got error while run code in python manage.py makemigrations in terminal
कामेश
have you migrated your table
A
no
A
while i migrate it on that time error display
कामेश
then first run command make migration then migrate
A
@kameshshekhar while run makemigration command in terminal on that time above error display
कामेश
share your full code either on github or any other online platform
A
okay i will share full code in github
George
!paste
Doragonsureiyā
To share code or error tracebacks please use an online pasting service, here is a list of suggested sites: - https://del.dog - https://dpaste.org - https://linkode.org - https://hastebin.com - https://bin.kv2.dev
Gk
Hi I am beginner with Django I have a slider and have title subtitle and image for it in carousel I don’t know what is wrong with it - have 3 images in it but when I upload 3 different images it created 3 slider below each other - what I exactly want is to put 3 different images and title - subtitle - please help
Kamlesh
I have that
Can u share..??
Gini
I am beginner can anyone help me in building stock market web app with python and django.
Gini
How to get data from yahoo finance into django
Gk
How should I sent my template code here
Doragonsureiyā
How should I sent my template code here
To share code or error tracebacks please use an online pasting service, here is a list of suggested sites: - https://del.dog - https://dpaste.org - https://linkode.org - https://hastebin.com - https://bin.kv2.dev
Izbash
No no
So far as I see, django works correctly, but to develop carousel you need JS code for it (I can't even imagine how develop carousel only with html/css ) or if you don't know JS, u can search for JS lib
Gk
Sorry I don’t know how dpaste work i apologies admin if I did something wrong sharing this code
Gil
Did you got it ?
His reply is good. You only paste html, where is javascript code?
Gk
I didn’t used any Javascript
Gk
Created template just searched on google - then created a model for slider and pass it on home.html
Gk
M using Bootstrap
Gk
Yes sure please
Sh
Willing to take up freelancing projects w.r.t to Django or any projects which require initial project setup. Please do let me know
Anonymous
Hi, How to get user's device information in django. I wanted to retreive user's operating system and version, device type and Name if possible, and browser name For example: { os: Linux 4.4 Web browser: Chrome type: PC }
Anonymous
I have tried this library django-user-agents => https://pypi.org/project/django-user-agents/ it is not working in some time
Doragonsureiyā
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 firsts results
Ghorz
i think it does
😂 Best answer
Ghorz
getsaleor.io
b
hey guys, im getting this error dont know what it means
b
AttributeError at /default-email/15/ 'int' object has no attribute '_meta'
b
anyone?
Muslim
anyone?
Read it
b
AttributeError: 'int' object has no attribute '_meta'
b
this is the error and I don't know where it comes from
b
I'm trying to edit the form and pass the I'd to save it
Muslim
AttributeError: 'int' object has no attribute '_meta'
Check ur view by url and find place by traceback
b
I did several times
b
can I share the view?
Govind
I think you should check your model
b
model is fine too
b
it was working
b
maybe it has to do with URL and view but I don't get it
Muslim
I did several times
What does that mean? Stack trace is stack trace
Muslim
One time is all u need
Muslim
U’re just lazy to look into ur code and read what is wrong
b
dude it's been over an hour I'm only looking in my code
b
I'm trying
b
the last thing I did is text here
b
in view
b
def defaultEmailView(request, uid): item = SetUser.objects.get(id=uid) form = SetUserEmailForm(instance = item) if request.method == 'POST': form = SetUserEmailForm(request.POST, instance = uid) if form.is_valid(): form.save() return render(request, 'set_user.html') context = { 'item' : item, 'form' : form } return render(request, 'default_email.html', context)
b
if i remove this
b
if request.method == 'POST': form = SetUserEmailForm(request.POST, instance = uid) if form.is_valid(): form.save() return render(request, 'set_user.html')
b
then it works
b
but i dont understand whats the problem
Anonymous
How to edit select option values in Django forms?
sm
I have created countdown timer with Django templates which showed on HTML templates when the page refreshed data on an HTML page is an update but it also reset countdown timer. I don't want that is there any way to stop refreshing script or update data without refreshing.
Tommaso
Hi, I am building a django app. I would like to show data from a django model into an interactive lineplot chart (I mean a chart that shows data labels and numbers when the user hovers on the chart with the cursor) in my template. What's the best way to do it? Is it better to use chart.js or to use dash, plotly or similar python libs and integrate them in django?
Gini
How to read stock data from django
Anonymous
Anyone can suggest me best django rest api course or tutorial