inchidi
^set blank=True, null=True also
even if you change those params to False it will work, but with different behavior. so make sure you know what you need
harisai | హరి సాయి
I have changed it to auto_add_ now = true
harisai | హరి సాయి
But showing the same error
inchidi
you access the data directly from db, no python there while default=timezon.now() is python code
harisai | హరి సాయి
okay got it.
inchidi
okay got it.
when you work with django make sure you do anything to db via python manage.py shell, not touching db directly will save you from many bad things
harisai | హరి సాయి
Sure thanks.. I'm new to django can you suggest me best website to learn django..
inchidi
you already on good track imo, just make sure you check the docs oftentimes
harisai | హరి సాయి
inchidi
How do I convert datetime to date (in Python)? - Stack Overflow
Someone
https://hastebin.com/raw/epocizilip
Someone
Custom permission is not applied... is my code correct?
Django Bot
>> Blogs - How to Setup your Development Environment with Django >> Links - Django tips: auto-populated fields - python - Django - Constructing a Model Object With a User - Stack Overflow - Reversing admin URLs in Django | en.proft.me
Django Bot
>> Blogs - Django 2.0 support is here!
harisai | హరి సాయి
hi, when ever iam passing a json string it is giving me this error [<type 'exceptions.ValueError'>],[No JSON object could be decoded] how can i rectify it?
Django Bot
>> Links - Working with forms | Django documentation | Django
harisai | హరి సాయి
means?
Anonymous
Or you are trying to to serialize on your own
Anonymous
Don't deserialize
harisai | హరి సాయి
where?
Anonymous
Line 28
Anonymous
https://hastebin.com/raw/epocizilip
Have you tried reading docs of Django
harisai | హరి సాయి
nope
Anonymous
Ehm
Anonymous
Look whom did I quote.
harisai | హరి సాయి
oops sorry..
harisai | హరి సాయి
Line 28
like what should i exactly do over there
Anonymous
Don't do json.load
harisai | హరి సాయి
okay i need to get only request.body
Someone
Have you tried reading docs of Django
Yep and now solved it.. thanks
Salimboevm
Hwey guys I wanna ask smth
Salimboevm
I'm using models.ImageField () what I need to write in this scope
Salimboevm
And what this code can do canu explain pls
Salimboevm
Sorry I'm novice in Django
Anonymous
show us
Salimboevm
Models.ImageField ()
Salimboevm
I want to add photos with models.ImageField not with models.CharField ()
harisai | హరి సాయి
hi guys, how can i batch insert values into database using django
Django Bot
>> Links - mvantellingen/django-rangepaginator: Paginator which shows a range of pages
Javi
hi guys, how can i batch insert values into database using django
https://docs.djangoproject.com/en/2.0/ref/models/querysets/#bulk-create
harisai | హరి సాయి
Javi
Yes, that is what bulk_create does
Javi
You can use Update if you want to update previously created obiects
Ismael
Hi guys, a question If I define a class , (and Its NOT a model class) , may I make a object like queries results from another model class to do a join query? I want to make a app where you insert some info, and mix it with database values; both datasets are houry values
Django Bot
>> Links - Adding the Django CSRF Protection to React Forms • techiediaries
Anonymous
I am not able to understand your problem.
Javi
me neither :/
Ismael
i try do explain in other way
Ismael
I have a model like this class Prices(models.Model): ___Price ___Hour (1-24) ___Date And my app client sends data for Date-Hour_quantity buyed class Quantity(): ___Volume ___Hour ___Date
Ismael
I dont want to upload each client data
Ismael
just take it, and valorate, Price * Volume per hour and day
Ismael
and my question is if I can make something like a "join query" with the no-database-class and the database-class
Javi
maybe I'm not taking the idea correctly, but you can use the quantity class to build the query.
Javi
You can even create a custom manager that takes the Quantity as input and builds the query there, so you have to write the code only once
Ismael
my idea is to do something like a "temporary table"
😼
I would suggest a temporary chair
Ismael
I would suggest a temporary chair
Tnx, I suggest you use a contemporary ideology
Javi
Yup
Ismael
tnx
Django Bot
>> Links - GitHub - providenz/freelance-django
Django Bot
>> Links - Adding the Django CSRF Protection to React Forms • techiediaries - Conditional aggregation in Django 2.0 - Peterbe.com - Kubernetes, Local to Production with Django: 2— Docker and Minikube
Ian
Hi everyone, I have a tutorial on how to integrate django rest and android studio?
Ian
Yes, exactly
inchidi
Yes, exactly
and by android studio you mean android apps?
Ian
yes
inchidi
yes
you dont need specifically django-android. any android rest tutorial will be enough though
inchidi
https://www.techrepublic.com/blog/software-engineer/calling-restful-services-from-your-android-app/
Ian
Ok, thanks
mohamed
Hi bro
mohamed
Hi guys I am new to Django I know which basic is required to learn django
Anonymous
Python
mohamed
Python
In python which part
Anonymous
Intermediate level python