Felipe
Awesome! Thanks
Felipe
Thanks a lot!
Akash
How do reusable apps connect to User model. I want my re-usable app to have a OneToOneField with User model how can I achieve this. I use django ORM in my standalone python project now that does not have any other app now I want to use that same app and model in django project without running 2 copies. How should I connect to django user model
Anonymous
Can anyone explain why this filter https://pastebin.com/g9vi4QhD makes dublicated values in queryset that it returns, so I need to call .distinct() I think it happens because of m2m fields - regions, groups, but dont understand properly.
Orack
is this correcht
Orack
{% autoescape off %} Hi {{ user.username }}, Please click on the link to confirm your registration, http://{{ domain }}{% url 'activate' uidb64=uid token=token %} {% endautoescape %}
Orack
its giving error on localhost on {{domain}}
Orack
im passing domain as Site.object.get_current()
Anonymous
Does it return (number_of_groups x number_of_regions) records? So i guess it's ok ;)
hmm, yep Think I need to look at SQL for better understanding 🙂
Maksim
https://pastebin.com/zVbtPK1p ValueError at /account/login/ The view account.views.user_login didn't return an HttpResponse object. It returned None instead.
Alik
hi
Akash
I am trying to setup DJANGO allauth plugin. My page shows this: Sign In Please sign in with one of your existing third party accounts. Or, sign up for a webapp account and sign in below: Telegram but the Telegram link href is "#" so it does nothing, what am I doing wrong. Have this setup corrctly: SOCIALACCOUNT_PROVIDERS = { 'telegram': { 'TOKEN': 'my token' } }
Aswath
I have a doubt.. what is the meaning of foreignKey field in django and what does the argument on_delete =models.CASCADE mean??
Aswath
Im a fresher to django.. i expect responses... Please..
Mirco
Im a fresher to django.. i expect responses... Please..
you are fresher to databases, aren't you ?
Aswath
How come you know??
Aswath
Ohh that i asked about foreignKey?
Mirco
How come you know??
because foreign key and cascade are not related to django 😊
Mirco
Can you let me know abt that..
you need to study it before studying django
Orack
django provides us to not to write sql statements
Mirco
the irony is
nope, that's just to be sure 😊
Orack
but we still cant use without knowing database concepts ;_;
Orack
domain.domain may be then?
from django.contrib.sites.models import Site current_site = Site.objects.get_current() current_site.domain
Orack
will try in few hrs
Orack
https://ibb.co/3MGF5nC
Orack
https://ibb.co/3MGF5nC
I was trying this https://django-rest-auth.readthedocs.io/en/latest/installation.html
Orack
the user gets created but there is this error
Orack
I was trying this https://django-rest-auth.readthedocs.io/en/latest/installation.html
is using this better or this https://tests4geeks.com/django-rest-framework-tutorial/
Игнат
Guys, tell me, and how can I make one field entry dependent on another type if the value entered in the first, I need to fill the other ?
Héctor
Guys, tell me, and how can I make one field entry dependent on another type if the value entered in the first, I need to fill the other ?
maybe you can try clean method in your model https://docs.djangoproject.com/en/2.2/ref/forms/validation/#cleaning-a-specific-field-attribute
Vladislav
Hi guys, please tell me: I have this iterator {% for value in properties.geoObjects %} <div style="color: #3bbbcd;">{{ value.properties._data.iconContent }}</div> {% endfor %} and I need to get the output amount of iterated elements. Is there any way to do this inside of the iterator well, or tell me other options. Thanks.
Игнат
Okay, I'll try, thank you very much.
Игнат
Hi guys, please tell me: I have this iterator {% for value in properties.geoObjects %} <div style="color: #3bbbcd;">{{ value.properties._data.iconContent }}</div> {% endfor %} and I need to get the output amount of iterated elements. Is there any way to do this inside of the iterator well, or tell me other options. Thanks.
Hi guys, please tell me: I have here such an iterator {% for value in properties.geoObjects %} <div style="color: #3bbcd;">{{ value.properties._data.iconContent }}</div> {% endfor %} and I need to get the output of the amount of iterable elements. Is there any way to do this inside of the iterator well, or tell me other options. Thanks.
Vladislav
yep, sorry for russian)
Anonymous
yep, sorry for russian)
Chill dude... That's okay but don't repeat it next time 😀
Maxim Cheremisov
Hey guys. I have a problem with registration in my tag library. TemplateSyntaxError at / 'blog_tags' is not a registered tag library. This is my tags document: from django import template from cmsbackend.blog.models import Category register = template.Library() @register.inclusion_tag('blog/tags/category.html') # Инклюжн тег дает возможность вставлять и передавать информацию def category_list(): one_category = Category.objects.filter(active=True) return {'categories': one_category}
Maxim Cheremisov
Where may be a reason?
Felipe
Hey guys! What's up?
Felipe
I have an API with DRF that receives monetary values ​​from the frontend. the values ​​will be stored in the database as Decimal. But it will be sent and received as an integer. The frontend will multiply by 100 before sending and in the backend I will divide by 100 when receiving and multiply by 100 when sending to the frontend. What is the best place to carry out this operation? On models or serializers?
Alexander
in services.py
Felipe
Thanks!
striken
Good morning
Anonymous
Hi.. anyone have tried autocomplete in django 2.2 ??
Anonymous
I'm stuck for many days. Packages showing different errors.
Anonymous
I used autocomplete_light
Anonymous
Please help me or suggest a way to do it properly.
Eric
Please help me or suggest a way to do it properly.
Is your code in GitHub or Bitbucket? You will get help easier if your code is available.
Anonymous
Is your code in GitHub or Bitbucket? You will get help easier if your code is available.
This is my question https://stackoverflow.com/questions/56864188/how-to-configure-autocomplete-light-in-django-2-2
👍
django forms autofill multiple fields
Pablo
Hello, Someone use to swagger for documentation of ours APIs
Pablo
Thanks
👍
django forms autofill multiple fields
like if I fill a city name in one field then other fields (pin code, statename etc) related to this field shoult be auto fill
Mirco
I used autocomplete_light
Have you checked if there's support for Django 2.x ?
Anonymous
How can I automatically create a temporary accounts for user when he visits from a special link? What I want is user click a unique link, my view automatically create an account with a unique id and password, logs him in and show him the credentials that he can change or keep.
Anonymous
Have you checked if there's support for Django 2.x ?
It showed 2.x but some packages not working properly.
Anonymous
Any other packages other than autocomplete light?
Mirco
Any other packages other than autocomplete light?
it's not so hard, you can do it by yourself without adding new packages and if it works well, you can make your own package and upload it to pypi 😊
Anonymous
Can anyone help me ?? I am stuck in linking my front end using django
Anonymous
Please PM me
Anonymous
it's not so hard, you can do it by yourself without adding new packages and if it works well, you can make your own package and upload it to pypi 😊
Okay i will try can you give a hint or something. Last time i did it with jquery next day that script get depreciat.
Anonymous
so it's not temporary, it's just have a random pwd that the user needs to change
Yes. Basically the link will have an unique id that will become username of user. With auto generated password...
Anders (izzno / gooood) 🇳🇴
Has anyone seen socketio used with Django? WebSockets are a bit more looping and hassling... I can't seem to find anything
Anonymous
Its not able to find the media path
Anonymous
How do we define media path ?
Anonymous
Okay I will share my code
Ярик
hey guys, need your help i have 2 apps, both apps have models theese models have 2 common fields the question is, can i autofill card_number field in one model, depending in a patient_name field foreignkey from another?