Sinan
ReadTimeout: Error from server: code=1200 [Coordinator node timed out waiting for replica nodes' responses] message="Operation timed out - received only 0 responses." info={'received_responses': 0, 'required_responses': 1, 'consistency': 'local one'} this error happen when query from cassandra ?
Andrew
hi, i am using django with heroku, when i make change in local repository and then make deploy, my database (user) goes missing or returns to the way it was. is there a way to pull database from heroku to local repository ?
Since you are using Heroku, the data isn’t going to persist if you use Sqlite or FileSystem. You need to connect a proper MySQL or Postgres DB and connect them. Just use the Heroku one it’s easier. But do be aware later this year Heroku will stop their free plans, all are paid.
Sam
How to join between form and sqlit3 database ?😞
Forrest
Good morning, is it possible to create a project in Django with applications and that the clients only need to access the administration panel? Applications: Invoices, Reports, Contracts. 10 workers and 1 boss who I will give the ability to handle the workers.
Forrest
You want a user that can only access the admin panel but not the application? Does not make that mich sense to me. But sure you can create such a project
I want give one admin user of the admin panel to the boss and that way he can create the user to the workers and want everybody loguin to the admin panel and work there
Forrest
All the workers and the boss add data and make stuff in the admin panel
Koen de
I want give one admin user of the admin panel to the boss and that way he can create the user to the workers and want everybody loguin to the admin panel and work there
Yes you can. Though I would not give all those users access to the admin panel. But that’s me. I would let the boss be the superuser and the one that has access to the admin panel. And create separate maintenance overviews/forms/templates for the other users to enter their data. Why: the Django Admin panel can be very destructive
Koen de
With a little creativity you can convert the project from the main tutorial from a Poll/Voting project into an Invoice processing project
Forrest
With a little creativity you can convert the project from the main tutorial from a Poll/Voting project into an Invoice processing project
My goal is save the time i spend in use Bootstrap and give format to the templates and forms because iam learning Django and not have a much time
Евгений
Hi! How create this query in django? select vehicle, version from (select version, vehicle_id, time from vist_core_onofevents event_type=10 order by time) group by vehicle, version
wayne
I added the "allow_empty = False" field to the ListView and now if there is no news on the page, error 404 is displayed, but the category itself exists, there is simply no news there. Is this normal?
B
Hi all i want use model tabulate in my django project should i add to models.py import tabulate or anything else ?
B
How will I get parent data in child using drf serializer quick response required.
B
Any link will also work
Nav
Can any one help me with Model not found error 😞
Manheevak
Validation error not showing in forms.py link:https://pastebin.com/NCChFB2x
Koen de
Hi all i want use model tabulate in my django project should i add to models.py import tabulate or anything else ?
You mean; a) include the django-tabulate project in your code b) use TabularInline from Django itself ?
Koen de
Validation error not showing in forms.py link:https://pastebin.com/NCChFB2x
Line 17 seems weird. What happens if you just check; if len(varname) < 5:
Doragonsureiyā
Can any one help me with Model not found error 😞
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z!" Just ask directly! The better you are at explaining the problem, the more likely you are to get help. Asking smart questions
Manheevak
Koen de
I have used print to check but its not printing
Is your clean method even called? You can check with pdb in the first line of it
Евгений
The query seems incomplete. Can you paste the query in something like pastebin ?
This is full query: select vehicle_id, firmware from ( select vehicle_id, firmware from vist_core_onoffevents where time > to_date('2022-06-01','YYYY-MM-DD') and event_type_id=10 order by id desc ) group by vehicle_id, firmware
Koen de
This is full query: select vehicle_id, firmware from ( select vehicle_id, firmware from vist_core_onoffevents where time > to_date('2022-06-01','YYYY-MM-DD') and event_type_id=10 order by id desc ) group by vehicle_id, firmware
It’s something like; queryset = VisitCoreOnoffevents.objects.filter(time__gte=date(2022, 6, 1)).only(“verhicle_id”, ”firmware”).order_by(“-id”).group_by(“vehicle_id”, ”firmware”) https://docs.djangoproject.com/en/4.1/ref/models/querysets/
Koen de
Edit; minus “id” for descending sort
Koen de
It’s something like; queryset = VisitCoreOnoffevents.objects.filter(time__gte=date(2022, 6, 1)).only(“verhicle_id”, ”firmware”).order_by(“-id”).group_by(“vehicle_id”, ”firmware”) https://docs.djangoproject.com/en/4.1/ref/models/querysets/
You can try for yourself; First get a handle to the correct Model. And all objects; Model.objects.all() Then append the filter Third; play around with .only() and .order_by() and .group_by()
Koen de
ty solved it
Happy to share your solution?
Arash
Friends, I have a question. Is it possible to create a DApp on Ethereum with Django, React.js, web3.py and Solidity?
Koen de
Friends, I have a question. Is it possible to create a DApp on Ethereum with Django, React.js, web3.py and Solidity?
Yes. It has been asked and done before. See; https://github.com/laitassou/etherkar Or https://medium.com/coinmonks/how-i-integrated-django-with-blockchain-and-built-a-decentralized-application-dapp-f104ae551e12 I am happy to see your efforts so far
Manheevak
Happy to share your solution?
man it was working first but then i restart my project and not showing again clean function is running it is printing hello World when I enter a name less than 10 characters but ValidationError is not showing here id link https://pastebin.com/Be6TE4hL
wayne
Can you show us the querset param and get_queryset method from your ViewSet?
Views.py class CategoryList(ListView): model = News context_object_name = 'news' allow_empty = False template_name = 'dashboard/news/dash-category.html' def get_context_data(self, *, object_list=None, **kwargs): context = super().get_context_data(**kwargs) context['categories'] = Category.objects.get(url = self.kwargs['slug']) return context def get_queryset(self): return News.objects.filter(category__url = self.kwargs['slug'], moderation = True)
Koen de
Displayed {% empty %}
Well it’s one or another. The 404 or an empty result.
wayne
What happens when allow_empty=True ?
But I need that when a user enters an incorrect URL in "category", 404 is output, not 500
Koen de
Pitifully...
It is what it is. https://docs.djangoproject.com/en/4.1/ref/class-based-views/mixins-multiple-object/#django.views.generic.list.MultipleObjectMixin.allow_empty
Koen de
Is it possible to remove the category that shows 404?
You can implement anything you want in get_queryset to make sure it returns the same when the category is empty or when someone searches for something non-existent
Luis
Friends, any of you know how to consume the MSTeams api with python or an example
Luis
Tank U
Doragonsureiyā
Friends, any of you know how to consume the MSTeams api with python or an example
Your question is not related to Django. If it's a Python related question go to @Python group, otherwise please move to @PythonOfftopic group and ask there.
Koen de
Friends, any of you know how to consume the MSTeams api with python or an example
Yeah check pypi.org. There are at least four projects for MSTeams. Also Microsoft has an excellent tutorial about it https://docs.microsoft.com/en-us/azure/communication-services/quickstarts/chat/get-started?pivots=programming-language-python
Ewuru
I want to create a site with crypto payment platform using django, any help or tutorial please
Doragonsureiyā
I want to create a site with crypto payment platform using django, any help or tutorial please
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Vigneswaran
hello friends i need one help after server runs function should run automatically what i have to do in django .?
Koen de
hello friends i need one help after server runs function should run automatically what i have to do in django .?
I do not understand the question. Can you be more clear about your case? What going wrong? Show some errormessages. What have you tried so far? Show some code.
Teebam 08062893992
Am about creating a django project that's works like an multi-level marketing (MLM) system, has anyone created an mlm with django?
Charly
Manheevak
Validationerror does not work when I test it by printing the function it is working, but the validation error does not appear. Here is the link https://pastebin.com/u/Manheevak/1/2RHK8PHC
Hodonou
I do not understand the question. Can you be more clear about your case? What going wrong? Show some errormessages. What have you tried so far? Show some code.
I think he say that he don't want to type python manage.py runserver many times. And he wants a function that can run it automatically
Jay
As I click on next page my search query gets reset
I m
hii i can't fix my django plz any one help me..
I m
anyone help me to my setup django
Doragonsureiyā
hii i can't fix my django plz any one help me..
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z!" Just ask directly! The better you are at explaining the problem, the more likely you are to get help. Asking smart questions
I m
i need help regarding django set up
Subhadeep
Django page is not working
Subhadeep
Please help
Doragonsureiyā
Django page is not working
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z!" Just ask directly! The better you are at explaining the problem, the more likely you are to get help. Asking smart questions
Subhadeep
Python manage.py runserver is working but when I click the host the page is not working
Doragonsureiyā
Python manage.py runserver is working but when I click the host the page is not working
To get an answer to your question, it is worth to formulate it more clearly, perhaps add more details, perhaps add explanations.
Subhadeep
Okay sorry
Subhadeep
Please help!
Maxim
Please help!
don't flood either
Ali
is there a way i can log in using username or email?
Ali
i set the USERNAME_FIELD to email but i need a way to log in using email or username