Charly
VPS only??
What do you expect?
Confident
it's more expansive than others like shared hosting, cloud hosting...
Confident
Expansive or expensive?
sorry I meant expensive
Charly
sorry I meant expensive
So if you are asking for the BEST thwn why you complain about the price?
Confident
Confident
the must cheap one
Charly
Sorry again I meant the best according price
Shared hosting. but is the worst option.
Confident
can I deploy my Django site on shared hosting?
Confident
On some of them.
Can u recommend some one of them?
Charly
Can u recommend some one of them?
No because it is better for you to get some you can pay from your country
NARASIMHA
I have a celery task with acks_late=True In my local if i quit celery and then start again, the tasks are getting requed and it runs well But in my kubernetes environment, after the deployment, the task that was stopped is not being requed What might be the issue
Amirhusein
How can we chain querysets of a same model and paginate it? There are large amount of data
nyctophile
Hi guys! I need to send date time from py client to api but it is giving me 'Bad request' Which format should I use? Can anyone help me with that
Abhijit
I have task in django project In which I have uploaded a Excel file in that I have to send a mail to particular user who have checked checkboxes selected.and also want to pagination in this upload Excel file..I am sending the sample Excel data.. plsss help
Abhijit
As simple as simple I have made upload Excel file and in excel data there is checkboxes and email I'd I have send email to particular checked user
Doragonsureiyā
This is my difficulty
We're not here to do your job for you. This group is to help you on specific issues you have in YOUR code, so you have to show the code you wrote by yourself and explain where and why you are stuck... as simple as that. 🤷🏻‍♂️
Abhijit
I have wrote some code But code is written in my company laptop.so I can send the code tomorrow Sorry for inconvenience
Ayass
@override_settings(MY_SETTING={'EXAMPLE': None}) class CobaTest(TestCase): That override_settings only works when running a specific test. However, it does not work when tested for all. python manage.py test Any help? I need override_settings to work every time I run the test.
Ayass
That override_settings only works when running a specific test. python manage.py test apps.tests.test_aja.CobaTest
Gee
Why html-> javascript changes are reflecting during debug of webpage and not shown while normal run?
Hoopakid
I have a problem with elasticsearch when i use with drf who can help me?
Doragonsureiyā
I have a problem with elasticsearch when i use with drf who can help me?
No one can help you until you explain your difficulties.
Muflone
Can anyone help with that please??
pass them as strings and apply a formatter to convert the types
nyctophile
Muflone
Should i apply formatter in viewset
no, use register_converter to register the new type and in the url you set the Date field type
nyctophile
no, use register_converter to register the new type and in the url you set the Date field type
Sorry, I am really confused right now. I am a newbie. Can make it more simple? I do not know what register_converter is
Muflone
Sorry, I am really confused right now. I am a newbie. Can make it more simple? I do not know what register_converter is
https://docs.djangoproject.com/en/4.2/topics/http/urls/#registering-custom-path-converters
Angel
Hey guys… any help with the following problem would be appreciated… I want to add a “logical” field to Django Admin change list view for each row… without modify the model definition… this new field needs to be a choice field and I also need to be able to validate if the value changes on save… any suggestions?
Сережа
Guys, i want to create forum. So ive made form, bd and so on. But... i want, that arg date_of_creation has value of now. How can i make that?
Anton
auto_add=True in the model and it will set automatically
Maybe better auto_now_add=True, because auto_add will be updated, if you update the instance
summit
Hi guys, I need help integrating stripe in django to enable suscription to the Saas platform that we are building. I found dj-stripe and I could sync my database with my stripe account. I want to integrate stripe connect. Any help is appreciated. Thanks
mirodil
Hi everyone, How can I change type of field when annotating ? from geopy.distance import distance queryset.annotate( distance=distance( (latitude, longitude), (F("address__latitude"), F("address__longitude")), ), ).filter(distance__lte=query_distance) Here F() should be float type to use geopy distance method.
I'm
Hi Does anybody know how can I connect frontend using next.js and backend using django?
I’m
You could leverage API calls and call Django views to populate the DB
I’m
or use https://pypi.org/project/django-nextjs/
Gianluca
Hi all, is there anything avaliable similar to livewire for laravel? I am avoiding complex frontend stuff but that's hindering me from completing some projects without resorting to a frontend dev
Ali
https://dev.to/ericchapman/laravel-livewire-for-django-say-hello-to-unicorn-1fo7
Ali
Htmx
Vitaliy
server ASGI/Daphne version 4.0.0 django-rest-framework API returns outdated project list unless i reboot the server how to solve undesired caching? i did not overload list method nor hang any decorators. almost pure framework class ProjectViewSet(viewsets.ModelViewSet): serializer_class = ProjectSerializer queryset = (Project.objects.filter(project_status='Active') .select_related('project_manager', 'project_sr_manager', 'project_location', 'facility') .prefetch_related('release_set'))
Vitaliy
Try using get_queryset
manipulations with get_queriset solves this problem
Moein Trendone.ir
Hello friends, I would be grateful if anyone could help2 systems are uploading data to the postgres database (64 requests per second) on VPS, the code is the same for both, I added the third system in the morning, there was no problem, but in the afternoon I get the following error In addition, the desired ports are open and other database information is completely correctpsycopg2.OperationalError: connection to server at "remote-######.com" (ip), port ##### failed: Permission denied (0x0000271D/10013) Is the server running on that host and accepting TCP/IP connections?
Saydullo
how shall i use that?
your_datetime_field = models.DateTimeField(auto_now_add=True)
Anonymous
Please, help... My model with ImageField don't upload photos at all.
Anonymous
OK. Tomorrow I'll share it.
Georg
hi. there are two methods in QuerySet: latest and earliest. How can I make this methods not to throw an exception when no data found? (like DoesNotExists)
Charly
too long 😂
What a dumb reason to not write proper code.
Georg
Overwrite them. But why don't you just use exception handling instead?
that's an obvious way)) I thought that methods has some kind of argument "not_to_throw_exception"
Georg
What a dumb reason to not write proper code.
a code must be readable. If the code is full of try\except then it should be called a junk
Georg
that's an opinion 🤷🏻‍♂️ It has a rights for to be
Georg
yep. but it is too expensive
Georg
order is most expensive operation
Georg
yep. U rright
Believe
hi. there are two methods in QuerySet: latest and earliest. How can I make this methods not to throw an exception when no data found? (like DoesNotExists)
from yourapp.models import YourModel # For the most recent record try: latest_record = YourModel.objects.order_by('-your_date_field').first() except YourModel.DoesNotExist: latest_record = None # For the oldest record try: earliest_record = YourModel.objects.order_by('your_date_field').first() except YourModel.DoesNotExist: earliest_record = None
Mukhil
How can host django project in local pc. ? Iam using windows and Linux pc I have static ip and domain
Ali
Install nginx gunicorn, ufw in your linux pc. Allow 8000 80 ports in ufw. Then go to youe model control page and open your ports and ip to global.