Mirco
Ehsan
do you have chanel about bootstrap
Mirco
Doragonsureiyā
do you have chanel about bootstrap
Looks like you need an offtopic group, please continue this conversation at @pythonofftopic as it's not related to Python
Nioosha
Hi
Is there any way to get the non-english names in the url?
Doragonsureiyā
Hi
Is there any way to get the non-english names in the url?
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
I connected my django project with mongodb.
I'm able to see data from cmd line... But not on the site
Anonymous
Can anyone help?
Manish
hello!
Can't figure out how to serialize [123,321] via DRF serializer.
I have a simple one:
class TrackByPidsSerializer(serializers.Serializer):
pid = serializers.IntegerField()
but when I try to validate data, it gets me an error:
ser = TrackByPidsSerializer(data=[321, 312], many=True)
ser.is_valid()
False
ser.errors
[{'non_field_errors': [ErrorDetail(string='Invalid data. Expected a dictionary, but got int.', code='invalid')]}, {'non_field_errors': [ErrorDetail(string='Invalid data. Expected a dictionary, but got int.', code='invalid')]}]
Why it expect the dict? How can I validate simple list of int?
Send data in dictnary format.. like :
data = {
  "brand": "Ford",
  "model": "Mustang",
  "year": 1964
}
Manish
None
Hello guys, i try to integrate SSO Okta and microsoft with Saml/OpenId for my django project.
I have a generic question about how SSO should work.
I need to add some okta/microsoft user to my Active directory to get Provder knows about user and then if some users are in my active directory they can login to django backend. But it's not what I want to implement.
I want that any user could login via SSO to my django backend without adding the user to active directory is it bound with idea of SSO? or SSO should work only with active directories?
saran
Can we use Google captcha in django? Or any simpler ones. I mean free of cost. Google is paid I guess.
saran
Any suggestions?
Rizki
Absolutely yes ..
saran
❔
Rizki
https://medium.com/@mihfazhillah/how-to-implement-google-recaptcha-v3-on-your-django-app-3e4cc5b65013
saran
Any urls or documents .. Please share
saran
Thank you
Rangarajan
@LAbef you need custom user model ..
This was the first idea came to my mind but if i change the user model for my author model will that affect the default user model and also i wants to know is it impossible to login(or link the id of my model with the session) our own User without extending it with the User model or AbstractBaseUser or AbstractUser??
Rizki
@LAbef You should extend AbstactUser there are some methods required by Django auth to work properly.. yes login feature doesn't affected .. is my english sounds horrible ?? 😂😂
Anonymous
Anonymous
It's just data entries are not visible on website gui
But are fetched correct in shell
bikrant
I'm using Group model which has manytomany relationship with user model.
When any user creates a group I want that it joins that group by default . (There is a separate join group button functionality)
I'm trying to add this functionality in createview but it's not working bcz object is not created yet.
Can anyone help to deal with this logic ?
Ashutosh
I have a problem,
Is it possible to use Debug Toolbar with json response??
Charly
Ashutosh
🧐, yeah got it...
Debug Toolbar is HTML.
THANKS @Carlangueitor
Anonymous
hello
Anonymous
How can I solve this error?
Anonymous
SyntaxError: Non-UTF-8 code starting with '\xa0' in file
Rizki
hello
Please explain what do want to do ? Are u importing CSV file ?
Omair
John
class StoreClosingViewset(viewsets.ModelViewSet):
queryset = StoreClosingStock.objects.all() #filter(CLOSING_STOCK__gte=1).values('ITEM_CODE').annotate(CLOSING_STOCK=aggregates.Sum('CLOSING_STOCK'))
serializer_class = StoreClosingStockSerializer
renderer_classes = [TemplateHTMLRenderer]
template_name = "Stock.html"
def get_queryset(self):
query_params =self.request.query_params.dict()
itemcode = query_params.pop('itemcode', None)
qs = StoreClosingStock.objects.filter(CLOSING_STOCK__gte=1)
if itemcode is not None:
qs = qs.filter(ITEM_CODE__icontains=itemcode)
queryset = qs.values('ITEM_CODE').annotate(CLOSING_STOCK=Sum("CLOSING_STOCK"))
for i in queryset:
i
return queryset
John
How to pass queryset value to html
Mirco
Doragonsureiyā
Mirco
John
I can't able to get in html
bikrant
bikrant
I tried to implement def get() inside the createview but it gives me error "query not found'
Omair
Anonymous
Any other tunneling softwere like ngrok ?
Mirco
Mirco
bikrant
John
If want print our data we need to use context
Anonymous
John
Html
John
context['queryset'] = self.queryset
John
Within get_context_data method i am overriding
Mirco
Oh wait you are using a viewset so DRF ?
Mirco
In this case, you just need to call the endpoint via javascript
Mirco
The queryset is the result of that endpoint in the json format according to your serializer
John
Can you provide some link about that
Tridip
Hello Guys, I am confused between Oauth and MiniOrange to used as authentication framework in my Django Rest API Project. Can someone guide me which one to choose based on its features, and ease of implementation??
Dardo
Hello dear, I ask you a query, I have a date field of type datetimefield with auto_now = True, the question is that I am not being able to validate that it only saves the date in the base when the value of another field "state" is = 'C' . Try to validate in the toJson function of the model, in the createview view and in the save () function of the form, where I have to put the validation so that it saves the date only when that condition is met? thanks for everything
Krunal
How to render pdf in div which is available in upload (media) folder?
M
Krunal
Frame
I have tried to use iframe but getting blank iframe
Krunal
Mirco
Mohammad
How can I access the request amount to send the storm request? Submitting or none in the form may also be global if you can submit directly to the template
https://linkode.org/#l2yW3a0FXbfY9UkWyENid1
Anonymous
hello gys .can i used django + react js
Anonymous
thnx bro
Sunag
How to deploy django on rhel7?
Doragonsureiyā
How to deploy django on rhel7?
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
Crack
Can someone help me django with ajax
Anonymous
Please how can I add shipping address to a customer in stripe
Anonymous
Sorry I’m using the stripe payment integration in an e-commerce project in Django
And I want to know how to let stripe capture the shipping address in my checkout view
Rizki
Do
Neo
Need some suggestions i have a table with 8 fields in it and i have 2 roles A and B, for A i need to give first 4 fields access and for B rest 4. For this do i need to create two separate tables and how can do this with one table.
bikrant
Anyone here has followed django course on Udemy by Jose portilla