Coders Needed Eth
admin.site.register(CustomUser) is this all you do when you register it ?
cj
admin.site.register(CustomUser) is this all you do when you register it ?
read my previous messages, I said extend the forms that Django ships for the admin site, I explicitly told you what is the form to use for that purpose
cj
just extend that form to add your custom fields, don't even override what Django does for you ¯\_(ツ)_/¯ just extend it
Coders Needed Eth
yes that's exactly what i did but what happens if you don't extend those and just register your normal customuser model to admin ??
Coders Needed Eth
Is it okay if i share a picture here so you see what happens in those 2 cases ?
cj
Is it okay if i share a picture here so you see what happens in those 2 cases ?
if you know how to do that without getting a warn from the admin bot, yes
Coders Needed Eth
Idk i mean not sure about the rules here
Doragonsureiyā
Idk i mean not sure about the rules here
Read the rules before any activity: @PythonRules
Coders Needed Eth
still not sure
Niraj
Hey i had a doubt. I wanted to build a website to run trading algorithms. Is it possible to run them directly through webserver by adding those algorithms in models? Or do i need to run those algos separately through another server and just use website as a trigger ?
Ness
Hey, all. I recently learned django rest framwork and now i m trying to create an api for a blog app, n i write a serializer for user model which works fine whenever i register a user through api, but whenever i m trying to update a user it throws an error IntegrityError - UNIQUE constraint failed: chento_post.author_id, ??
Anonymous
form.instance.post = get_object_or_404(Post, pk=self.kwargs.get('pk')) please explain this code
Anonymous
form.instance.post = get_object_or_404(Post, pk=self.kwargs.get('pk')) please explain this code
when I comment this, it shows integrity error, I guess it helps in findig post id but I don't understand, how it find and what's that or_404 need?
Anonymous
in registration-form, I game option to choose, from a list and since it's a charfield, I set default but in database only defaultoption is getting saved even though user select different inputs.
Anonymous
What is the smallest working web app to build with Django?
William
when I comment this, it shows integrity error, I guess it helps in findig post id but I don't understand, how it find and what's that or_404 need?
The use get_object_or_404() is If the object of that id exists to return the data otherwise show 404 error Data not found.
Anonymous
a hello world app
Lol Alright something more complex a little bit Something worth presenting
cj
Lol Alright something more complex a little bit Something worth presenting
you asked for the smallest thing, you loled and now you're asking for a complex thing... first of all take your facts right, don't make people lose their time ... and you can do some notes taking app, like Google keep in a very very basic level
Anonymous
BRANCH_CHOICE = [ ('arch', 'ARCH'), ('biotech', 'BIOTECH'), ('bme', 'BME'), ('civil', 'CIVIL'), ('chem', 'CHEM'), ('cse', 'CSE'), ('ece', 'ECE'), ('ee', 'EE'), ('it', 'IT'), ('mech', 'MECH'), ('met', 'METT'), ('mining', 'MINING'), ] class UserRegisterForm(UserCreationForm): email= forms.EmailField() branch= forms.ChoiceField(choices= BRANCH_CHOICE) Why only default choice get saved even if I choose other option?
Anonymous
anyone here? https://replit.com/talk/ask/Users-input-not-get-saved-only-default-option-get-saved/145806
Doragonsureiyā
anyone here? https://replit.com/talk/ask/Users-input-not-get-saved-only-default-option-get-saved/145806
Maybe anyone is here, yes, but they are not obliged to read everyone's message here neither to reply to everyone's message, if someone wants to reply to your message, they will do that, just don't try to draw attention to your message writing "anyone?" every 5 minutes, that will lead you to be warned for SPAM/Flood, just be patient or use Google/DuckDuckGo to research about your question instead of wasting time here waiting for people to do your work. Have a nice day 😊
Rishav
i am facing a problem in django rest framework ,i am making a get request but getting an error. If anyone can help me out then I will dm him/her my code ..
Doragonsureiyā
i am facing a problem in django rest framework ,i am making a get request but getting an error. If anyone can help me out then I will dm him/her my code ..
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain: - what you're doing - what you're expecting - what you're using - where you're running the script - what Python version you're using - what packages and their versions you're using - and the most important thing: show the code YOU wrote (read rule 5️⃣ for that) and more details, that way your chances to get help will increase
Rishav
can someone let me know which youtube channel is good for learning django rest frameworks ?
Sagar
how to user login with qr code
Doragonsureiyā
can someone let me know which youtube channel is good for learning django rest frameworks ?
Are you looking for Django REST Framework documentation? Here you have it: https://www.django-rest-framework.org/
Pravin
Can someone help how to upload multiple images using django rest framework...My use case is Tiles model: Tiles = foriegnkey Images = image field Image-name = charfield Right now I m uploading single image it works fine...but multiple images have issues
Anand
Hi How to implement a password less Login/signup in django
Tejashree
Hello friend I am new to programming will you please help me out
Tejashree
trainer = models.CustomUser.objects.get(CustomUser.username) this statement is not proper and i want to current user id
Anand
Firebase phone OTP ?
No Auth via only username If username not found in db it should redirect to signup
Pravin
When I triying in drf, images = self.context['images] It always shows me a key error...
ann
hi , How to asynchronusly send email using django-celery-email
Doragonsureiyā
hi , How to asynchronusly send email using django-celery-email
Step 1: Open a browser Step 2: Write down https://google.com or https://duck.com and press Enter Step 3: In the search box, write down the same words you asked here Step 4: Read the first results
ann
obviously cant find a good doc that works so just asked
Doragonsureiyā
obviously cant find a good doc that works so just asked
This group is to help you on specific issues you have on YOUR code, so you have to show the code you wrote and explain where and why you are stuck... as simple as that.
ann
okay
 
hello everyone i am beginner and i want to build a project for exercise. what is basic options for blog project?
Philemon
hello ,can someone help me how to add location map on home template.
Viji
hello ,can someone help me how to add location map on home template.
Go and search some location map in google just take source code from there then paste your template. Then, just change latitude and longitude
𝙰𝚛𝚝𝚑𝚞𝚛
Hi friends, I need help from an ORM professional. I am new to my problem, I have not found a solution on the Internet. I am practicing creating a website for working with cryptocurrencies. Now I have three tables: exchange, currency and their relationship. The exchange implements a many to many relationship with the currency table through the relationship table. (many to many through) When I work with exchanges I load them using prefetch_related ('currencies'), but I would also like to pass additional fields from the relationship table, specifically commissions, with this prefetch. It is easy to do it through raw sql, but how to explain it to ORM? https://pastebin.com/8tNi3nxf - Models, the current request and the one that I want to receive
Артем
Please, help anyone. How to add action in list view in admin in order to add file to select position? I try to make it about 1 day((
...
okay
https://www.youtube.com/watch?v=b-6mEAr1m-A
...
okay
This video explains celery and how to send email with it. But if you don't have any background about Celery or any async tools, I strongly recommend you to search web to get some theory information about this precedure.
William
Hi How to implement a password less Login/signup in django
https://link.medium.com/L70QKj6AMjb Check this link
Артем
how create action in list wiew in order to upload file for each?
𝙰𝚛𝚝𝚑𝚞𝚛
Create additional fields in serializers and include them in the fields list or tuple.
I think there is definitely a possibility to add fields through a custom Prefetch, but I don't know how to do it. How can this be done through serializers?
William
I think there is definitely a possibility to add fields through a custom Prefetch, but I don't know how to do it. How can this be done through serializers?
Create a field and If it's related to any other field model then use the source keyword otherwise use SerializerMethodField
𝓶𝓸𝓱𝓪𝓶𝓶𝓪𝓭
Create shopping cart with django (Especially total of prices and total of products) is very hard!😐 Does anyone have an instructional video or text about it?😅❤️
preethi
Hi, can we create a model from a CSV file pls help
Andrey
Hello. I cannot change language of django-autocomplete-light, when setting attr data-autocomplete-light-language. Can somebody help with it?
♈
After model field value deleted But I want this forigenkey value safely save
Hunde
how can i make collapse id dynamic in django?
James
I have a models with country field now I have to add centralized place to filter all query set based on login user (login user also have country field) without adding country filter to all the queries filter. I found the way to have custom manager where I can add filter in get_queryset method but I am not able to fetch login user country, something like request.user.country since request object is not available in models.py file Any solutions or alternative?
Add related_name in your model for backward access. Then you can use that related_name to get the country name. Eg. In your country model add this. user = models.ForeignKey(User, related_name = "country", on_delete=models.CASCADE). Then. To get country name for loged in user.. (request.country.name)
Anonymous
Refuse to apply style from <url> Because mime type
Anonymous
How I solve it
Doragonsureiyā
Refuse to apply style from <url> Because mime type
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain: - what you're doing - what you're expecting - what you're using - where you're running the script - what Python version you're using - what packages and their versions you're using - and the most important thing: show the code YOU wrote (read rule 5️⃣ for that) and more details, that way your chances to get help will increase
Anonymous
Refuse to apply style from <url> Because mime type ('text/html') is not supported stylesheet mime type and strict mime checking is enabled
Артем
how to change format of field 'datefield' in django admin?
Vipin
I have a table in html page
Vipin
The table containing item,amount,price,tax ..etc
Vipin
That is a dynamic row adding table
Vipin
And also perform automatic calculations using javascript
Vipin
I wanna print that table information and date customer name from html input to a seperate invoice design template
Vipin
And also i wanna print that invoice pdf tooo
Vipin
How can i perform this
Vipin
Please anyone help me
Optimus
may be u can use datatable which provides multiple features of exporting data .