Kene
Python coder
What is te best for Django, pycharm or vscode?
New man
Hi. I have written a custom middlever but l get the same error
(wsgi application 'myproject wsgi application' could not be loaded; error importing module)
Alexey
What is te best for Django, pycharm or vscode?
i found some problems for pycharm and vscode) vscode better debug, bad django shell (autoreload dont work), for pycharm better autocomplete code (import from other modules work fine)
Anonymous
Hi guys how are you all....from where i can learn compelet Django rest framework...i already know djnago MVT
Jayanthi
Orm
The Inspired
python
Any one do RSA authentication in Saas based application by using django ?
If have then please share any reference
Hephzisoft
Please I need a free hosting for Django project. Please I need recommendations 🤲🤲
Rohan
PythonAnywhere, AWS
Shiv kumar
mentalist
how to send many to many data in drf in list,
postman form data ??
sanju
Does anyone have the code for refreshing the jwt token before it's Expiry in python Django
sanju
Thank you in advance
who
How to use imutils video stream in django
who
Najwan
is there a way to use muliple one-to-one in the same table ? mysql
Hernan
Seyed Alireza
Hello
How can I create a page with multiform in Django ?
Morteza
Brown
Charly
Najwan
What is the best way to use multiple one-to-one relationships in the same table in database module. I hope that was more clear.🥲
Hernan
but, it is the same question. Can you send a example ?
Charly
Hephzisoft
Seyed Alireza
Morteza
Yes
check django-formtools
Seyed Alireza
muhammad
hey guys I wanna ask something, so I implemented the django advanced filter (link: https://github.com/modlinltd/django-advanced-filters) for my admin panel, and when I tried to filter data that has a foreignkey it gave an error like this
django.core.exceptions.FieldError: Related Field got invalid lookup: iexact
for the admin.py this is the code :
class CommentAdmin(AdminAdvancedFiltersMixin, admin.ModelAdmin):
list_display = ["product_id","name", "topic", "product", "created_at"]
list_filter = ["name", "topic", "product", "created_at"]
search_fields = ["name", "product"]
advanced_filter_fields = ["product"]
and the models.py is like so :
class Comment(models.Model):
product = models.ForeignKey(Product, on_delete=models.CASCADE, related_name='comments')
name = models.CharField(max_length=80)
topic = models.CharField(max_length=80, null=True)
body = models.TextField()
created_at = models.DateTimeField(auto_now_add=True)
class Meta:
ordering = ['created_at']
def __str__(self):
return 'Comment on Product {} from {}'.format(self.product, self.name)
muhammad
i've changed the advanced_filter_fields to advanced_filter_fields = ["product__id"] and advanced_filter_fields = ["product__name"] but the problem then the data that I want to filter is not shows up
muhammad
I followed from here as well https://github.com/modlinltd/django-advanced-filters/issues/66 but it's still not happening
Kene
hey guys I wanna ask something, so I implemented the django advanced filter (link: https://github.com/modlinltd/django-advanced-filters) for my admin panel, and when I tried to filter data that has a foreignkey it gave an error like this
django.core.exceptions.FieldError: Related Field got invalid lookup: iexact
for the admin.py this is the code :
class CommentAdmin(AdminAdvancedFiltersMixin, admin.ModelAdmin):
list_display = ["product_id","name", "topic", "product", "created_at"]
list_filter = ["name", "topic", "product", "created_at"]
search_fields = ["name", "product"]
advanced_filter_fields = ["product"]
and the models.py is like so :
class Comment(models.Model):
product = models.ForeignKey(Product, on_delete=models.CASCADE, related_name='comments')
name = models.CharField(max_length=80)
topic = models.CharField(max_length=80, null=True)
body = models.TextField()
created_at = models.DateTimeField(auto_now_add=True)
class Meta:
ordering = ['created_at']
def __str__(self):
return 'Comment on Product {} from {}'.format(self.product, self.name)
What's the issue now? iexact or data not showing?
muhammad
Anonymous
Hello everybody.
My question is, i making a automated grocery shopping list for a takeaway restaurant. I need to call a api every 30 min or so, to see if the list needs to be updated. Any ideas or recommendations to do so? Thank you in advance
AZ
Anonymous
Dhritesh
If you want to perform search operation then I think you have to use two state variable one for storing all the values and second one for storing filtered data
Sing
Not able to remote db from my local Please help
Sing
Not able to connect to remote db which is in heroku from my local
Hunter
What is OneToOne and OneToMany Relationship, And when to use.
And if am use OneToOne in this:
class Profile ():
user = models.oneToOne(User, onDel...)
image = image field
What i can accomplish and why can't I use here Foreign Key - One To Many???
Almortatha
dani
Somebody know how can convert str to html en django?
Jakhongir
Hello somebody help me please I cannot integrate JavaScript file in Django ?
Doragonsureiyā
Bibhuti
Kareem
I have a form button
When the user uploads a file or folder I want to send it to GitHub repository commit push it
Everything kinda like being done automatically, how can I do it or what should I search on Google
Kene
Kene
Yury
Hello. Is it relevant to use django-unicorn in production?
dani
G
hello guys any body which have a Django books please share with me
Sagar
Who is the admin here ?
Sagar
I want to share a screenshot of my error
Sagar
Can anyone help me pls ?
Sagar
My virtual environment is not getting activated
G
Yooo
Wan
user = User.objects.create(
username=user_form.cleaned_data['username'],
email=user_form.cleaned_data['email'],
password1=user_form.cleaned_data['password1'],
password2=user_form.cleaned_data['password2'],
)
username=user_form.cleaned_data['username'],
AttributeError: 'NoneType' object has no attribute 'cleaned_data'
please helpme!!
G
Doragonsureiyā
oky, sorry
Read the rules before any activity: @Rules_for_Python
Sagar
Done
Sagar
There was a problem in running scripts
Doragonsureiyā
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like:
- https://dpaste.org
- https://linkode.org
- https://hastebin.com
- https://bin.kv2.dev
If you posted a wall of text, go back and delete it.
Adithya
Hlo everyone
I want to make registration and login page using MySQL database
I want to store all the user details in seperate table in MySQL database
""I don't authenticate from user table present in admin page""
How to use django authentication by storing details in models???
Adithya
Pls any one help in this
Adithya
In YouTube every tutorial is showing by using users table in django admin
But I want to store details in models...
Adithya
How to do it...
Adithya
Can I know any one understood my prblm
Morteza