Alex
is there way to customize model of any django molule, without copy the module to my poroject directory?
Another approach is to simple use composition over inheritance and link your model with someone by fk, 1t1 and etc.
Alex
Any good resources for django rest framework?
https://www.django-rest-framework.org/tutorial/quickstart/
user
{% if user.sem1attendence %} {% set month1 = user.sem1attendence.July %} {% else %} {% set month1 = "none" %} {% endif %} <a>{{month1}}</a>
user
What m i doing wrong
user
It says the invalid block tag in {% set ....... %} line
~:$
Scanners and its integration with django.... need suggestions.
user
For now just set any string in month1 and see it's prints or not
Got it... Went to django site there they use with block
S
Hey quick question, I want to write a API using models and serializers and its count of few rows with a couple of tables joined with the condition and yes, there is a common column .
꧁❦ I'm Farooq ❦꧂
any one can help me to fix priority for tasks in django +redis+ celery
Alex
Use dramatiq
How does that help?
VISHNU
Is there a way to fields in admin panel as not mandatory to fill because currently it's showing mandatory all field to fill
.
How does that help?
Bcz celery does not have task prioritization
.
Or i can set priority for each *shared_task*?
Alex
Bcz celery does not have task prioritization
I guess it depends either on your broker, or your queue implementation. Not on client library it self.
꧁❦ I'm Farooq ❦꧂
.
yah that's what I need
U cant using celery Use dramatiq
.
https://dramatiq.io/guide.html#prioritizing-messages
꧁❦ I'm Farooq ❦꧂
.
how..
U cant using celery!
.
U should set multiple workers for that
꧁❦ I'm Farooq ❦꧂
okay
꧁❦ I'm Farooq ❦꧂
.
thank you bro
.
For django use django-dramatiq
Anonymous
How would i go about if i need a serializer field to behave differently in write and read operation? Is the cleanest way to just implement a custom field?
Mukhammadjon
How can i make auto change booleanfield with datetime in django
Сергей
anybody know what is the wrong I try logout, but got an error Field 'object_id' expected a number but got 'k4j2nkt5smb90wamwjtvjduk31u2uakt'.?
Morteza
How can i make auto change booleanfield with datetime in django
is your mean on specefic date value of boolean field change?
Сергей
Morteza
Yes
try cron job or celery
Morteza
django logout
can you share the full error?
Anonymous
depends on what 'behave' means
I would like it to be a PrimaryKeyRelatedField on write, and a nested serializer on read
Anonymous
the other solution is to write two different serializers for write and read
Сергей
can you share the full error?
http://prntscr.com/1j0ezml
kuzmich
I would like it to be a PrimaryKeyRelatedField on write, and a nested serializer on read
you're looking for PresentablePrimaryKeyRelatedField in drf-extra-fields package
VISHNU
How to show the time stored in db that to serialize to user timezone and display that time.
DOUBLER_GATES
https://github.com/NYASHTECH/online-portal
DOUBLER_GATES
https://github.com/NYASHTECH/online-portal
contribute to my project folks need your help
kuzmich
contribute to my project folks need your help
I just had a look at https://github.com/NYASHTECH/online-portal/blob/main/onlineportal/registrar/models.py consider to split it into different files 'cause it looks like mess
Peter
Who's ever tried djoser integration?
Sahaj Raj
The database in django is giving migration history error in second deployment when i make some changes in the models in my development enviornment. Have any of you solved this problem ?
.
contribute to my project folks need your help
Create some issues too ,if possible
Nαψαภ
Why do we use database and not store the information in variables ? (I didn't get any well explained ans on internet) Anyone...pls help.
Nαψαภ
Have any brief explanation, I am newbie..
highnes
When using Django csrf_ excempt decorator in a view function, request.user throws error AnonymousUser object has no attribute, any idea how to fix this?
Peter
What's the solution for user inactive when using djoser package?
Irrfan
hello guys i have a django api that contain both wsgi and asgi now i got to deploy it with nginx i tried to use daphne for both wsgi and asgi but it doesnt server htmls and other stuff beside it i used gunicorn but still no answer in websocket mode anyone can give me any clue?
DOUBLER_GATES
DOUBLER_GATES
The database in django is giving migration history error in second deployment when i make some changes in the models in my development enviornment. Have any of you solved this problem ?
Am thinking of prototyping enterprise solution like data analytics project with django, matplotlib. pandas,numpy and other libraries
DOUBLER_GATES
DOUBLER_GATES
DOUBLER_GATES
https://github.com/NYASHTECH/online-portal
You are welcome to recommend and resolve any issues. Want to make an enterprise solution if you see something and have an idea of the key features to take online education further contribute with those ideas and pm me and notify the community to benefit also. I believe that you will contribute your ideas , all we need to improve.
Pavel
Hello. Could u help me to add 1 day to OuterRef("date") please
Caesar
what's the best way to get hostname?
Sherlock
why we add static url and media url into setting file like MEDIA_ROOT = MEDIA_DIR MEDIA_URL = /media/ like this ? when to do and when not to ?please tell 🙏🙏
Jasurbek
when overriding save function of model I have to take an extra argument. like model.objects.get_or_create(id=id, extra_info=info) what can I do?
игорь/igor
when overriding save function of model I have to take an extra argument. like model.objects.get_or_create(id=id, extra_info=info) what can I do?
In save do self.extra_info = kwargs.pop('extra_info', default_value) Where default_value is a default value for that argument
Jasurbek
In save do self.extra_info = kwargs.pop('extra_info', default_value) Where default_value is a default value for that argument
when I'm doing: Model.objects.get_or_create(section=section, order=self.order, update=update) it is raising: Cannot resolve keyword 'update' into field. Choices are: id, items, message_in_group_id, order, order_id, section, section_id
Maxwell
Can anyone contact me Whose know that to install django in pycharm in window 10
Go to your favourite browser and type in pycharm.There are two options pycharm professional and pycharm community, download the community edition since it is free .After downloading click on the downloaded file and follow the specified steps.Hopes u will find this helpful
VISHNU
How to get the datetime in response as user login timezone from the datetime stored in db. In db it's stored as current date time not as timezone.need to get that with timezone response in serializer.will it can be done that.