Sloth
Abd Al Rhman
Hey, i'm making a blog project and I was making a model for posts. Now that i finished the model, i'm facing problem with migrating it. Code is here: https://dpaste.org/SWXbP
Sayidbek
Sayidbek
I think bug lays on 27th line
Abd Al Rhman
What error is saying
blog.Post.status: (fields.EOO9) 'man_length' is too small to fit the longest_value in 'choices'
Abd Al Rhman
Yeah, it looks so, the problem is with the max_length?
🌸
How to resolve fields.E304 error
Sayidbek
Abd Al Rhman
Yes, tried it and it worked! 🎉🔥
Abd Al Rhman
But why tho?
wayne
How to make a Django system for sending applications to a section of the site that will be visible only to administrators and using this section it will be possible to change the status of the application, the status will be in the section that is visible to the user, where the list of sent applications and the status of the application itself will be located?
Doragonsureiyā
Maxim
wayne
surprised
Maxim
surprised
so why are you asking questions you know the answers to
wayne
What makes you think I asked you a question whose answer I know?
Maxim
Hamid Ahmad
I want to learn Django
Doragonsureiyā
I want to learn Django
Looking for Django tutorials? you can follow these three recommended ones:
* Official documentation and tutorial
* Tutorial from MDN
* Tutorial from django-girls
pratik
Any one solve django error
pratik
Authentic error
T4P4N
its authentic so we cant do anything, if its replica then maybe
😅乛 𝐃𝐚𝐫𝐤𝐊𝐧𝐢𝐠𝐡𝐭 🚩™
Oauth doc..
Maxim
😅乛 𝐃𝐚𝐫𝐤𝐊𝐧𝐢𝐠𝐡𝐭 🚩™
😅乛 𝐃𝐚𝐫𝐤𝐊𝐧𝐢𝐠𝐡𝐭 🚩™
How to give permission admin and user
Wan
please help me, how to fix ValueError: Field 'id' expected a number but got 'Tahun'.
Wan
i want to get name, not id
Wan
@
yes
Try username='Tahun'
Wan
Wan
<a href="{% url 'editmylist' datalist.nama %}"
Wan
path(r'edit/<str:getnama>', myviews.edit_list, name="editmylist"),
SpawnDude
Hello, i use cloudflare with django, but the problem is, POST requests is not working
It gives forbidden csrf 403
Any idea please?
@
@
Wan
yeah, the context is in another function
rr4v
Anybody could help me on how to implement in django a nexted table? I mean, I followed a tutorial to make a recipes APP, to store recipes in a database. Now I would like to add a new feature, to include in each recipe a new table consisting in a table of ingredients, in which each record store ["name of the ingredient", "weight", "price"]...Any suggestions?
rr4v
SpawnDude Try including {% csrf_token %} in your POST form
Neo
rr4v
@neo but I would like to add ingredients dinamically, when creating the recipe
Neo
or you can simply shove them all into a json field
Neo
but this is how its going to be if you are using a relational database
rr4v
rr4v
I was following this tutorial: https://www.youtube.com/playlist?list=PLQbt1tI_yQHg5HYpdUqit1wkc4BOPTkpx
rr4v
the author use listview to show all the recipes from the model
rr4v
Neo
SpawnDude
SpawnDude
rr4v
rr4v
https://drive.google.com/file/d/1bKxORe42dS1HObglStYS9JmgvgpNACY_/view?usp=sharing
rr4v
how to iterate through a json object like this? {'item1': {'nombre': 'cable 4 nucleos', 'cantidad': 4, 'precio': 58.44}, 'item2': {'nombre': 'bateria 12V', 'cantidad': 2, 'precio': 158.44}, 'item3': {'nombre': 'cable 8 nucleos', 'cantidad': 2, 'precio': 289.3}}
rr4v
(in a template)
rr4v
I tried:
{% for i in object.item %}
<h6>{{object.item.i.nombre}}</h6>
{% endfor%}
rr4v
but it doesn't work
Maxim
rr4v
it doesn't work, since i is a key value of the json data
rr4v
not the json element itself
rr4v
but thanks for the suggestion anyway
rr4v
I am showing the render from a DetailView class. Maybe it would be easier if I could send the data as something different than a json, but I don't know how to do that with DetailVIew class anyway
Ali
Hi guys,
How can filter the categories if status true i can to select in my products
Categories is foreignkey fields in my products model
I need filter categories if categories status is true i can select category when i create new product or updated
Marc
products = Products.objects.filter(category__status=True)
returns a queryset
Shivaay
how to resolve this error in jinja templating in css
" { expectedcss(css-lcurlyexpected) "
Shivaay
https://django.fun/en/qa/423395/
same error here but not answered