Anonymous
checl your urlpatterns
url(r'^leave/(?P<leave_id>\d+)/$', views.leave, name='leave'),
here it is and in my template its href="{% url 'leave' leave.id %}
Anonymous
Владимир
Please help me, I won't blocked remove record in Django admin, one record, field one record is_default
Anonymous
what is the difference between foreign key and foreign object in django model fields?
✙Yaroslav
Hi. How to set the parameters with the help of crontab so that the function works every 2am? Crontab in celery.
Isaías
Hello
Isaías
Help.
Isaías
File "/usr/local/lib/python3.6/site-packages/kombu/transport/__init__.py", line 68, in resolve_transport
raise KeyError('No such transport: {0}'.format(transport))
KeyError: 'No such transport: '
Isaías
celery -A core worker -l info -B
Isaías
django 3
Isaías
Python 3.8
Isaías
Celery 4.2.0
Isaías
Redis
✙Yaroslav
I use selery. I want the task to run every 2 am. For a test, to check that this works, I try to indicate the nearest time that will come for the function to work. But the trouble is, it doesn't work anyway. I'm trying this type of '' '@periodic_task (run_every = crontab (hour = 0, minute = 14), name =' parse_data ')' ''. What parameters should be specified in crontab for the task to work, for example, at 00.23.? If it works out, then I think you can easily do it so that it works at 2 am.
Random
How to secure file uploads
Random
I mean What things i have to take care of
Random
For security
Anonymous
Hello developers,
How best can I save videos in Django
help will be appreciated
Knight
Hi all~
Is this the right way of getting the latest record of each users?
My_model.objects.filter(user__in=['user1', 'user2', 'user3']).latest('created_at')
Eliab
Hi everyone! I'm beginning in Django. Someone know how to download css to the folder of the project?
Anonymous
Brian
Knight
Knight
Brian
Where do you get the 'created at'?
Do .latest() at the end of the query... No need for the field
Brian
created at
Ferrum
hi
i tried to extend the django index template
i wanted to display a metric of the total number of users registered
but im having issues on how to access the User model from the extended template so i can work with it
i have tried {{User}}
and
{% for users in User %}
{{users}}
no luck
please help
S Karim
Anonymous
S Karim
S Karim
And try looping like yourapp.model
Ferrum
King__David
Sh
Assalamu alaikum.
There was model with 3 fields. after sometimes I want to add new column. I should set default value according to 3 fields for past records, how to make?
Mehmet
You can set temporary default while makemigration operation or add parameter default=value in field to set permanent default for the column.
Sh
Sh
I want to make like that
Sh
Sh
I wrote to explain more clearly, sorry
Mehmet
Like below
def save(self, *args, **kwargs):
self.full_name = f"{self.name} {self.surname}"
super(Model, self).save(*args, **kwargs)
Sh
Sh
Sh
Mehmet
Then there is not any problem for now. bulk_create function does not run save hook of the object.
I mean you should find a manual way to update full_name= name + surname after calling bulk_create
Sh
Anonymous
how can i set a condition to check if a user is eligible for something e.g he/she needs to be an employee for more than a yr to submit a form..if not the form wont be submitted
devops
Anyone knows about bash profile file
devops
Can u help me
Ghorz
devops
Can anyone help
Ghorz
Ghorz
Doragonsureiyā
Anyone knows about bash profile file
Please don't ask meta questions like:
"Any user of $x here?"
"Anyone used technology $y?"
"Hello I need help on $z"
Just ask about your problem directly! With a very high amount of people here the probability that someone will help is pretty high.
Also please read: http://catb.org/~esr/faqs/smart-questions.html
Ghorz
Ghorz
https://stackoverflow.com/questions/7852855/in-python-how-do-you-convert-a-datetime-object-to-seconds#7852969
Engnr
{'requestId': '15984273213672496', 'requestTimeStamp': '2020-08-26 10:35:21', 'channel': 'SMS', 'operation': 'DeliveryReceipt', 'traceID': '38$11337131336213862', 'requestParam': {'data': [{'name': 'Msisdn', 'value': '25XXXXXXX'}, {'name': 'CpId', 'value': '1002'}, {'name': 'correlatorId', 'value': '2582987'}, {'name': 'Description', 'value': 'DeliveredToTerminal'}, {'name': 'deliveryStatus', 'value': '0'}, {'name': 'Type', 'value': 'DELIVER_RECEIPT(Bulk)'}, {'name': 'campaignId', 'value': '8'}]}}
Engnr
{'requestId': '15984273213672496', 'requestTimeStamp': '2020-08-26 10:35:21', 'channel': 'SMS', 'operation': 'DeliveryReceipt', 'traceID': '38$11337131336213862', 'requestParam': {'data': [{'name': 'Msisdn', 'value': '25XXXXXXX'}, {'name': 'CpId', 'value': '1002'}, {'name': 'correlatorId', 'value': '2582987'}, {'name': 'Description', 'value': 'DeliveredToTerminal'}, {'name': 'deliveryStatus', 'value': '0'}, {'name': 'Type', 'value': 'DELIVER_RECEIPT(Bulk)'}, {'name': 'campaignId', 'value': '8'}]}}
Hi, am getting such response from server and i want to access the value for deliveryStatus, someone to assist on how to go about it
Anonymous
Ghorz
Same thing, apply the logic
Ghorz
Engnr
Ghorz
If you don't know how to go about it, take a refresher on dict
محمد دلشاد
Help me with this
ERROR: Could not find a version that satisfies the requirement requirements.txt (from versions: none)
ERROR: No matching distribution found for requirements.txt
Mehmet
pip install -r requirements.txt You have forgotten -r there.
محمد دلشاد
محمد دلشاد
محمد دلشاد
another one