Anonymous
Oops its manage.py
Anonymous
right
cj
instead of opening python and doing import django
Anonymous
nop am facing this error run this command let me show you
Anonymous
from news.models import Reporter
Anonymous
at python shell
cj
Anonymous
all right let me check
Anonymous
thanks @cj
Anonymous
Yes it is working fine @c0x6A
cj
Anonymous
well could you please tell me why this heppened even i am in venv
Anonymous
every thin in highly compact and binded
Anonymous
but why this shell
cj
Anonymous
okay
Goutham
Hello what is mean by Django fixtures, is that represents the JSON file
Anonymous
.
Anonymous
https://github.com/balaraju1278/quora
Here is the sample demo of how you can decouple business logic from models and views .
Views are responsible for render virews.
Models are for database tables.
Where to put business logic???? Here is the sample app please fork it and star it
Jaydeep
Please give me link of django tutorial video from beginner to advanced
Mirco
Jaydeep
Thank you
Anonymous
hi guys i need some help
Why we should use django celery when could use python Thread easily?
Goutham
https://hastebin.com/jurokemibi.py
Here why we declare the fields and again declared all those just above the fields? I am confused please help
Mohamed
Mohamed
Goutham
Goutham
Field name 'emailid' is not valid for model User
Mohamed
Mohamed
You need the class Meta while using ModelSerializer you can remove the code above the class Meta
Anonymous
Hello, for deploy a django backend(without any render of html) is necessary use gunicorn ? Because the ngnix point to the front end and one of the functions of the backend is connect to a telegram bot and this need a https connection
Happy
gunicorn is a good idea.
Happy
another choices are fastcgi, uWcgi, docker and soon...
Igor
Anonymous
Mirco
kalloc
Hi, do you know any way to make proxy field to jsonfield subitem?
for example:
class Profile(models.Model):
age = ProxyField(IntegerRangeField(), 'data', '\'profile\'->\'ages\'', index=True)
data = JSONField()
kalloc
and then use like a normal field ( profile.objects.filter(age__gt=10) )
أمجد☄
i am trying to add info to a field in my Profile creation signals, this field is the ip of the user, i have a function view that when called returns the user ip, this function needs a request argument, i want this field to be added when a user registers a new account and when this happens the signals would be called and then the profile model would be created with the ip field.
my code= https://pastebin.com/DaabTjVv
Aswath
What is the best resource other than documentation to learn django??
Happy
!google django cook book
Happy
https://books.agiliq.com/en/latest/
Happy
Aswath
Oh okay... Thanks
Happy
Is a google bot in here?
cj
Jaydeep
Which IDE to use to code django?
Happy
I use nvim/gvim/vim.
Happy
maybe vitual studio is a choice.
Jaydeep
👍
cj
Happy
But Virtual Studio Code very ate ram. I don't like it,
cj
but it's up to you what to use, use the one where you feel comfortable
Jaydeep
Ok thank you
Happy
Erick
Happy
HI, Everyone. I want to improve my English. If my grammar is incorrect please point it, Thank you.
👍
""'DjangoModelPermissionsOrAnonReadOnly' object has no attribute 'authenticate'
👍
"""'DjangoModelPermissionsOrAnonReadOnly' object has no attribute 'authenticate' """ error in DJango rest framework.
Happy
👍
Happy
Those class only used for permission check, no used for authenticate.
Happy
Review your code, what AUTHENTICATION_CLASSES in settings.py or in 'authentication_classes'.
Happy
code
class FoobarViewSet(GenericViewSet,
mixins.ListModelMixin,
mixins.RetrieveModelMixin):
permission_classes = (FooPermissionClass,)
👍
👍
Happy
Anonymous
How can I include csrf_token in POST method with ajax in django
Mirco
Mirco
'X-CSRF-TOKEN' cookie
Mirco
cookie name should be csrftoken
Anders (izzno / gooood) 🇳🇴
What do you guys use for autoresizing of images via urls? Like mydjangosite.com/img/myimage.jpg?size=800x600 or simuler
Mirco