Turtle_In_Hurry
its a template mail i'm sending so i used it
Anu
How can I make my django page accesible from another PC in LAN with my PC
Anu
Tell me exact syntax nd steps...bcz I m n Electrical engineer.. please
Anu
Yes..of course
I can ...but I have to learn
cj
Yes..of course
I can ...but I have to learn
well... run the server using 0.0.0.0:8000 and open a browser in the other PC to navigate to your PC's IP address (don't forget the 8000 port) 🤷🏻♂️
that's not black magic
Anu
I I'll try...
Anu
Thank you
Mirco
Artyom
Yep , exactly
So when I set pk value instead $ in url Page hadn’t found . And method DELETE still doesn’t allow . Could it be cause if GET view display nested field ?
A
I did a web application development using asp.net MVC, my first project
A
Now got a chance to do another project in python, friends suggested to use django framework
A
Good client side, do I need to ask for a angular resource, or with django itself will I be able to manage
A
Need your suggestions/ inputs
A
My experience in web development is 1 year only
A
cj
For*
please don't flood, and you can edit your messages
A
Oops sorry
A
We don't have a technical architect in our team, planning to develop using django, not seeing too much importance for ui, in such a case do I need a angular resource or will it be manageable with django forms itself, any input on this will be helpful. Or if I create the project in django, will it be difficult to update front end with angular
Artyom
Artyom
https://www.techiediaries.com/django-rest-framework-angular-2/
Mehul
A
I have done Mozilla developer tutorial for library app, and has started reading the above link, main doubt is it real necessary to use angular or react, because library project tutorial is done using django fw itself
Carl
how can I make a field optional for a custom user, based on AbstractUser, I tried blank=True in the model but still required in the html at the end
Mirco
Рустам
Hey guys, I have two models Article and Tag, they have m2m relation, so how can I filter articles which have array of provided tags?
Mirco
What do you have into the list ? Tag name or pk ?
Yug
Рустам
Mirco
Yug
More info here
https://docs.djangoproject.com/en/2.2/topics/db/examples/many_to_many/
Рустам
Yug
how can I do it with pks?
You can just get Pks of relevant tags as a separate query and pass it as an identification method to filter query right?
Mirco
pks
You can use the same query posted above but using tag__pk__in
Muflone
I think you need the __in operator
Mirco
Рустам
I think you need the __in operator
No, __in gives a record that has at least one of the tags in the transmitted array, and I need to return only those that have all the tags
Muflone
Oh then you have multiple filters concatenated
Рустам
Рустам
def filter(self, qs, value):
if not value:
return qs
self.lookup_expr = 'in'
values = value.split(',')
for value in values:
qs = super(ChoicesFilter, self).filter(qs, [value])
return qs
Рустам
Muflone
I was thinking another way using multiple Q() filters but your approach seems simpler and clever
George
I have a problem with Template inheritance:
I got a block like this in my father html file:
{% block modal_failure %}
{% endblock modal_failure%}
I got a file like this called modal_failure.html
{% extends "annotation.html" %}
{% block modal_failure %}
Stuff
<!-- end modal -->
{% endblock modal_failure %}
The html from the child file wont override the block in the father file
jang
So difficult to understand your question
jang
annotation is your 'father' html?
George
George
The thing is, the block wont get inherited in annotation.html which is the "father". Both files are in the same folder and the settings.py template conf is okay
jang
George
jang
Please show me error message If you can
George
George
I changed the path to
{% extends "annotation_web/annotation.html" %}
because it didn't find it and then i got
Exception Type: RecursionError
Exception Value:
maximum recursion depth exceeded
George
In template /home/user/.local/share/virtualenvs/annotation_beta-OVwyatOH/lib/python3.7/site-packages/django/forms/templates/django/forms/widgets/attrs.html, error at line 1
maximum recursion depth exceeded
1 {% for name, value in widget.attrs.items %}{% if value is not False %} {{ name }}{% if value is not True %}="{{ value|stringformat:'s' }}"{% endif %}{% endif %}{% endfor %}
George
okay, i just learned how to use it, i had to change my view to the child one omg
George
Im currently Wtfing really hard
Hiro
How design auction system with django?
Shubham
Hello I have a query I m trying to render the form in add.html as shhown in the image , but in my case nothing is appearing
Shubham
unable to share image
Shubham
n group
Shubham
why?
Mirco
why?
Not allowed 😁 use code sharing tool or imgur
Shubham
okay
Mirco
okay
And read pinned message for all rules 👍🏻
Anonymous
hi everbody,
Isaías
Hello.
Isaías
How override is_valid indjango rest ?
Isaías
In serializer
Isaías
I would like to validate my data (POST) in the django rest
Code9
Mirco
Isaías
Nop
Isaías
Ex: validate_nm_usuario
Mirco
Nop
Define validate and validate_<name_of_field>
Isaías
Ok?
Isaías
In serializer?