Mo
Show your code in views file
Results.objects.create(requestId=str(requestId), resultDetail=data1) resultDetail is jsonfield and data1 is a dictionary
Lakshay
Hi, when i save json data in jsonfield by object.creat syntax, the saved data in databse is not standard. for example its True is converted to true or ' ' to " ". why it is like that? Thanks
Ok, you need use a debugger to see step.by step what is happening - what data came exactly from json and what it got converted into. Because your code looks fine
Suhaib_0.0
Question can I be Use only Django Without use Mysecl????
Hadi
whats the best field for phone numbers in django forms
игорь/igor
Hadi
Phonenumberfield package
pip install django-phonenumber-field[phonenumbers]
Hadi
Suhaib_0.0
Shukurillo
the first argument ("request") that is passed in the view function in django, what is that ?
Suhaib_0.0
Question can I be Use only Django Without use mysql ????
mojo
I have 5 fields in html for images
mojo
It is creating 5 objects in database
mojo
Can anyone help in image uploading
jūdê
Have you configured your media? In your files
mojo
Yes
mojo
Can you help in uploading 5 images without using django forms
MICRO
manage.py : The term 'manage.py' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + manage.py startapp blog + ~~~~~~~~~ + CategoryInfo : ObjectNotFound: (manage.py:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException Hello friends, when I try to create a new app, I encounter such an error Thank you for your help
Raazu
How we are tracking student present or absent (from start time to end time)based on number of login or logout times using django project
Raazu
If anybody knows please let me know
Suhaib_0.0
-How do I connect Django With a database?
Alex
-How do I connect Django With a database?
You can start from defining connections in DATABASES
Alex
then django will automatically instantiate one for you when you start querying DB.
Corteis
someone can help me with TypeError: Field 'id' expected a number but got datetime.datetime error?
Corteis
someone can help me with TypeError: Field 'id' expected a number but got datetime.datetime error?
I rename a model and when I try to change it to foreignKey The prompt indicated that timezone.now is a possible option. So I typed timezone.now for a default value.
Corteis
I find the solution, thanks!
mojo
Best method for image upload?
mojo
Using 2 or more image field in html
Alex
Best method for image upload?
https://docs.djangoproject.com/en/3.2/topics/http/file-uploads/
Saman
Hi I have q For one site that have huge online users ; And its just crawling a price in online marketa and comapre it For thia site Django ia good Or laravel??
Genemator
Anonymous
Using 2 or more image field in html
If what you want is to accept multiple files #in your form ... files = forms.FileField(widget=forms.ClearableFileInput(attrs = {"multiple" :True}))
Saman
Better hire a programmer.
A laravel or django programer?
chaygo
Hello guys! Do you have any recommendation to learn api for
chaygo
Beginners
chaygo
I dont understand api
chaygo
Rest framework
Alex
Rest framework
drf isn't api. it's a framework (tool) to build one.
chaygo
But its framework to build api, isnt it?
Lakshay
Lakshay
Hello guys! Do you have any recommendation to learn api for
there is a video on youtube "REST api in 100 seconds" it explains what is api very well and quickly
Alex
But its framework to build api, isnt it?
There is a good list of literature in the end of the related wiki article https://en.wikipedia.org/wiki/Representational_state_transfer#Further_reading
Ionut
Hi, I'm a beginner and I don't know how to filter in django, the products from a category in the examples can also be found with subcategories, but I don't use them. Can anyone help me with an example?
Masih
hi i installed a package with pipenv on my project and i can see it on pipfile but when I run my code there is a ModuleNotFoundError anyone know what do I gotta do?
Masih
What's pipenv?
i use it for making virtual env
∫ 𝔞𝔪𝔞𝔫
What's pipenv?
A combination of pip and venv
xmas
guya django dev k liye opening h kya
Masih
Have you activated the virtual Environment?
i fixed it i have no idea how but i guess i didnt activate it right first time
Dex
guys how to solve pylint erors in vs code?
Amirhossein
Dex
python.linting.pylintArgs
would u explain this?
Mirco
guys how to solve pylint erors in vs code?
Fix the code or just run black formatter
Amirhossein
would u explain this?
for example you can add "--disable=missing-class-docstring" to "python.linting.pylintArgs" in vscode settings.json and disable that checker
kasim
How to post data through ajax to Rest Api if only user logged in.
A
Hey, Which one of these options do you prefer? 1-writing authorization and authentication by our own in rest django? OR 2-Using pre-existing tools which hand is?
kasim
Hey, Which one of these options do you prefer? 1-writing authorization and authentication by our own in rest django? OR 2-Using pre-existing tools which hand is?
I use Authorization. But I don't know how to fetch Token to template. Like csrf. That Authorization working when use postman.
kasim
class CustomAuthToken(ObtainAuthToken): def post(self, request, *args, **kwargs): serializer = self.serializer_class(data=request.data, context={'request': request}) serializer.is_valid(raise_exception=True) user = serializer.validated_data['user'] token, created = Token.objects.get_or_create(user=user) return Response({ 'token': token.key, 'user_id': user.pk, 'email': user.email })
F
I have two entities(X and Y) those extend an another (named A, for exemple). X and Y have their own properties. In A, I have type attribute it aims to know object type. In my database I created only one table for all objects(X and Y), is it a good idea? Now I want to create objects within a single view. I display AForm if view is called by GET method. When user choose the type of object, I must display the correct form with previous data(for attributes of A), with Ajax, before submitting. How do I proceed?
KC
Gm everyone.. Could you please suggest me the best source to learn django
Doragonsureiyā
Gm everyone.. Could you please suggest me the best source to learn django
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Ramadhan
hi guys, i wanna ask something... if i create a website using django, can i put machine learning and IoT ?
Frederic
hi guys, i wanna ask something... if i create a website using django, can i put machine learning and IoT ?
A Django application is a regular python program but you have to check the capabilities of the web host where you will deploy your website if you can install all dependencies and have enough cpu and ram to run your ML. For IoT not sure what you want to achieve.
Chauhaan Tushar
Hii i am Tushar from Indian institute of information technology Vadodara. I have made a challenge of 30 days in which i will be giving 4 questions on daily basis . The one who does the maximum questions , there will prize of worth 200 rs ( funded by my pocket money that's why it is less) u can discuss any problem faced . Majority of the question will be from leetcode see my bio for the link.
Mustafa
I am new to Django-Pyhton and I don;t know how to fix this problem. I am using adminlte by appseed.us and I when I go to create survey page I cannot access the page and shows not found. can sumone check my code and help me find whats wrong? Please DM.