Issa N'golo
Share the code via pastebin.org
https://pastebin.com/aWUSt1uj
Issa N'golo
curl -X POST \ -H "Authorization: {{authorization_header}}" \ -H "Content-Type: application/x-www-form-urlencoded" \ -H "Accept: application/json" \ -d "grant_type=client_credentials" \ https://api.orange.com/oauth/v3/token
Mirco
https://pastebin.com/aWUSt1uj
share the traceback of your error too
Issa N'golo
share the traceback of your error too
{'error': 'invalid_request', 'error_description': 'Missing grant_type parameter.'}
Mirco
use data= and not json=
Issa N'golo
Issa N'golo
the Authorization header is useless, usually in call to generate oauth2 tokens via client credentials, you just have to send client id / client secret and grant type
it's the service I'm trying to reach that gave me this command to generate a token before making any api calls
Issa N'golo
in fact I have to use a token before making any api call but this token is only valid for one hour and I have to regenerate the token. So after research on the internet I was advised to use celery and a broker like redis to perform this task as a scheduled task.
Issa N'golo
Neha
How we can fetch complete column from UI using orm
Neha
??
Issa N'golo
How we can fetch complete column from UI using orm
you want to retrieve all data from a table
Doragonsureiyā
it's work thank you very much
You're welcome! 😊
cj
From ui
you don't fecth data from UI using the ORM
god plan
h ow to cread dao on django models ?
lina
Hi evryone
lina
I need to log in with facebook using django
lina
How????
Doragonsureiyā
How????
These single steps will help you a lot: 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
Nati
How can i get full django tutorials please?
Issa N'golo
How can i get full django tutorials please?
do the official django tutorial then search for beginner projects on google or youtube
Doragonsureiyā
How can i get full django tutorials please?
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Nati
Ok. Thank you.
Kesav
Whether html,css,bootstrap is enough for django or we have to learn JavaScript
Issa N'golo
How can i get full django tutorials please?
https://docs.djangoproject.com/en/4.1/intro/tutorial01/
Issa N'golo
Issa N'golo
but if you want to do front end stuff you must learn js too
Kesav
I'm right
Issa N'golo
Issa N'golo
css+ js for front end, django for backend
Vice
Hello am am a newbie in Django Am trying to install django using the pipenv command but keep gettin this message: "installing dependencies from pipfile.lock" How do I resolve this issue?
Vice
thats not an issue, thats the normal output
Does it mean django is installed?
Jignesh
Any one tell about assign page particular user
Jignesh
Multiuser login single login page...
Jignesh
TypeError: function missing required argument 'year' (pos 1)
cj
In migrate command
check how you defined your models ¯\_(ツ)_/¯
Jignesh
Jignesh
No issue
Jignesh
One model add raised this error in migrate time
Shrey
Try deleting pycache files and try makemigrations followed by migrate again
Charly
One model add raised this error in migrate time
So that model definition is wrong
cj
One model add raised this error in migrate time
that means models are not very well maintained ¯\_(ツ)_/¯
Jignesh
How to redirect page or form to another page
Doragonsureiyā
How to redirect page or form to another page
These single steps will help you a lot: 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
Jignesh
Employee registration number auto generate with string.....
Doragonsureiyā
Jignesh
Employee id with prifix string
Jignesh
Example Em001
cj
Employee id with prifix string
what are you talking about?
Jignesh
Example Em001
Employee id automatically generate id
Nikita
Hello! Sorry, for what mb stupid question, but anyway: I need to use dictionary in my django model and don't understand how. Google and SOF told that I need to create my own class but how can I use it in other existing model? class Dicty(models.Model): name = models.CharField(max_length=50) class KeyVal(models.Model): container = models.ForeignKey(Dicty, db_index=True) key = models.CharField(max_length=240, db_index=True) value = models.CharField(max_length=240, db_index=True) class Product(models.Model): bids = Dicty() # ? In model Product I need to store many pairs: id - price, and I think the best way is dictionary.
Nikita
You have to create a OneToOneField. As one product can only have one price (according to your requirements), you can do bids =models.OneToOneField(Dicty)
I need to store different ids with different prices, like id_n - price_n, and add them into the 'bids' fields throughout the program
Xoxooxo
You can combine multiple fields of different forms into one form and validate just that one.
Heyy.. thanks for the help...I used Ajax..to get all the forms in backend...then i checked for form.is_valid() The only problem left is I have to redirect to the same page with url parameters But due to ajax it is not redirecting nor page is reloading
V
How to delete a model from django
The Inspired
I need to store different ids with different prices, like id_n - price_n, and add them into the 'bids' fields throughout the program
Then use another table to store both their ids... Alternatively, you can make a Many to Many relationship between them
The Inspired
How to delete a model from django
just delete the code from 'models.py'
V
just delete the code from 'models.py'
But the table is still avilable in database
Charly
V
Migrations not working
V
1-Provide a one of default 2 - quit and manuelly define
V
This is showing when applying migration