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
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
Yeah, it looks so, the problem is with the max_length?
Max length should be 9 (published), not 2
Abd Al Rhman
Yes, tried it and it worked! 🎉🔥
Abd Al Rhman
But why tho?
Doragonsureiyā
How to resolve fields.E304 error
Read this please: http://catb.org/~esr/faqs/smart-questions.html#intro
🌸
Read this please: http://catb.org/~esr/faqs/smart-questions.html#intro
I tried some ways reading posts on stackoverflow, it didn't work out
Maxim
I tried some ways reading posts on stackoverflow, it didn't work out
It's about the fact that your description doesn't contain enough information to help you
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?
wayne
Just read the documentation and do
What do I need to study specifically to do this?
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
What makes you think I asked you a question whose answer I know?
i got that from the sarcastic response to the answer
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..
Jerome
You can use heroku.com
Until november.. Then free deploy will no longer be available
😅乛 𝐃𝐚𝐫𝐤𝐊𝐧𝐢𝐠𝐡𝐭 🚩™
?
Authentication
😅乛 𝐃𝐚𝐫𝐤𝐊𝐧𝐢𝐠𝐡𝐭 🚩™
How to give permission admin and user
Doragonsureiyā
How to give permission admin and user
Read this please: http://catb.org/~esr/faqs/smart-questions.html#intro
Maxim
Authentication
i know what OAuth is
😅乛 𝐃𝐚𝐫𝐤𝐊𝐧𝐢𝐠𝐡𝐭 🚩™
i know what OAuth is
Django Rest_feamwork athenticated ( OAuth )
Maxim
Django Rest_feamwork athenticated ( OAuth )
what "Django Rest_feamwork athenticated" ?
Wan
please help me, how to fix ValueError: Field 'id' expected a number but got 'Tahun'.
Wan
i want to get name, not id
@
i want to get name, not id
did you query by id='Tahun' ?
@
yes
Try username='Tahun'
Wan
Try username='Tahun'
this error ValueError: Field 'id' expected a number but got 'Tahun'.
@
this error ValueError: Field 'id' expected a number but got 'Tahun'.
Did you try username='Tahun' instead of id='Tahun'?? Id is generally an integer field
Wan
Did you try username='Tahun' instead of id='Tahun'?? Id is generally an integer field
def edit_list(request, getnama): getdatalist = mypaket.objects.get(nama=getnama) # i want to get name not ID print(getdatalist) return render(request, 'adminku/admin.html')
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
rr4v
@neo but I would like to add ingredients dinamically, when creating the recipe
SpawnDude
SpawnDude Try including {% csrf_token %} in your POST form
I have this tag When i use cloudflare, this issue is rising Even i cant login into django admin
Neo
@neo but I would like to add ingredients dinamically, when creating the recipe
you can use javascript to insert them and in the response add the inserted ingredient's pk to the list of ingredients and later map it out
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
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
Neo
I have this tag When i use cloudflare, this issue is rising Even i cant login into django admin
https://stackoverflow.com/questions/34615826/csrf-django-nginx-with-ssl-from-cloudflare
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
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