How to fix the fe_sendauth: no password supplied erorr? There's this open-source framework for Django that is production-ready (https://github.com/pydanny/cookiecutter-django) I don't exactly know the cause of the error, but I do have some ideas, and I'm going …
So I have been trying do build a manager of activities with django and I'm still on the scratch. I was trying to test if the code can simply show if a acitivity is done or not, but it don't …
I have a Django / Celery / Flower setup routing messages to RabbitMQ on windows. All works well except that I can't find a way to pick up the flower broker_api from the Django settings file. CELERY_BROKER_URL is picked up …
I have a selenium test that work on my local machine. Creating test database for alias 'default'... System check identified no issues (0 silenced). ............. ---------------------------------------------------------------------- Ran 13 tests in 32.510s OK Destroying test database for alias 'default'... …
I am working on a project that requires a base form + template for ever user, based off of a simple model as such... class FloorPlan(models.Model): user = models.ForeignKey(account) stories = models.IntegerField() bathrooms = models.IntegerField() sqft = models.IntegerField() I …
I have a page that 10 seconds after the user enterd a change to the database is made, how do i do that? I need to add this idea to both a class based view and a regular view.
Each of my models is inherited from the base model, which contains the publishing_status field that helps me control whether or not the object is included in the returned data. class BaseModel(models.Model): class PublishingStatus(models.TextChoices): ACCEPTED = 'accepted', 'Accepted' REJECTED …
The method detailed here no longer works. Importing django.contrib.auth.forms.PasswordResetForm results in the custom user class not being available (django.core.exceptions.ImproperlyConfigured: AUTH_USER_MODEL refers to model 'accounts.CustomUser' that has not been installed). How do I send these emails programmatically? To avoid the …
I have my django application where i am using django_elasticsearch_dsl to index document to later do elastic search with them. I have two similar models in database so i want the documents to be pointing to the same index in …
I'm using django signals with post_save and receiving an instance: @receiver(post_save, sender=ServiceOrder) def service_order_post_save(sender, instance, created, **kwargs): if created: print(instance) I just want to get all values from this instance without doing field per field (is a big Model). …
I already deployed a Django/Wagtail App using Supervisor, Gunicorn and Nginx (on Debian Buster), so I can reach it with http://xx.xxx.xxx.xxx:8090. /etc/nginx/sites-available/cms server { server_name xx.xxx.xxx.xxx; listen 8090; listen [::]:8090 ipv6only=on; error_log /home/www.mysite.com/.local/share/virtualenvs/cms-WqsZ9qOt/var/log/gunicorn-error.log; access_log /home/www.mysite.com/.local/share/virtualenvs/cms-WqsZ9qOt/var/log/gunicorn-access.log; location = …
I am facing below error ERROR: Database access does not allow def send_orders(): for order in Order.objects.all(): order.send() order.sent = True #factories.py class OrderFactory(....): amount = 100 sent = False #test_order.py def test_send_orders(order): send_orders() assert order.sent
Working on Django 3.2 & unable to save forms with reference to each other. Like Project>Photos>Assignments>Students every form is a model form & has a relationship with each other. I have one Project Model & Another is Photos, want to …
I'm trying to display a randomly fetched image via ssh-connection on an HTML page with Django. Currently, I save a temporary image and then display it in the HTML, but this doesn't seem to be necessary or right. views.py: …
Получаю вот такую ошибку: TimeoutError: [WinError 10060] Попытка установить соединение была безуспешной, т.к. от другого компьютера за требуемое время не получен нужный отклик, или было разорвано уже установленное соединение из-за неверного отклика уже подключенного компьютера [06/Aug/2021 22:48:01,389] - Broken pipe …
I have a django app where I implementeed a method to sign-up through gmail authentication. Now I would like to allow users to send emails using my app through their gmail account. If a user signs-up with Gmail I have …
I'm trying to style the ChoiceField options for the Medicines in a prescription ModelForm to be in this format: <select> <option value="">Select a Medicine</option> <optgroup label="Favorite Medicines"> <option value="First">Brufen - Abbott - 600 Mg - Tablets</option> </optgroup> <optgroup label="Other"> <option …
I am trying to deploy a django application to AWS ElasticBeanstalk. I am working on a Linux machine. It all goes well but when deployment is done I get "502 Gateway Error". From a deep search I found that people …
I've looked through several websites but I can't seem to find an answer. I'm new to django and docker and whilist building my first project which is a quotation generator, I've been looking for different ways to generate a pdf …
I am running a local development server with python using VS as ide through python manage.py runserver. When I update and save JS files, the views in browser do not update (even restarting the server and PC). I refreshed the …
In function based views I am using this code Notifications.objects.filter(receiver=user, is_seen=False).update(is_seen=True) for update an objects status from False to True. How to do that in class based view: here is my code: class ListNoti(ListView): model = Notifications template_name = 'notifications/notifications.html' …
In Django, I have in models.py models defined like this : class foo1(models.Model): name = models.CharField(max_length=100) class foo2(models.Model): name = models.CharField(max_length=100) .... foo1 = models.ForeignKey(foo1, on_delete=models.SET_NULL, null=True) class foo3(models.Model): name = models.CharField(max_length=100) .... foo2 = models.ForeignKey(foo2, on_delete=models.SET_NULL, null=True) …
I want to retrieve a specific data after selecting an option form. When I select I got data in JSON format which I can't separated. I have tried obj.purchase_price but got undefined. my following code provide following data [{"model": …
I want to use a crawler project inside Django. I've set up celery and beats correctly but when I use the scraper project inside a Django app gives me the error ModuleNotFound even if I have added it to the …
How to use Class Based Views eg. TemplateView to display Django template with download links? Clicking the link should start downloading selected file. I already know how to do it with Function Based Views. Also - is it good idea …
Hi I'm using Django framework and made a simple web application. But on routing each page, I could see favicon reloads (OR maybe it could be loading html file). So here's the question. Is it correct that favicon reloads …
Reading the [django-rest-passwordreset][1] I have not found a way to create and send the reset_password_token manually, meaning without the use of the endpoint created by the package. Currently I have this implementation: urlpatterns = [ ... url(r'^api/password_reset/', include('django_rest_passwordreset.urls', namespace='password_reset')), ... …
I made a model ran all the neccesery migrations commands and I want to add a field and change a field. How do i do that? I thought about changing them in models.py and ran makemigrations and migrate again but …
I was invited to collaborate on a Django project and now I need to set it up. I am stuck with setting environment variables. In the given project envparse is used. I was provided an .env file, where items look …
Installed pyrebase4 in my system but still unable to import in my view.py even tried "import pyrebase4" still the same error, I followed a youtube tutorial for it I followed the exact same things he/she said, so I'm not understanding …
I have a raw query in my view: SELECT stressz_profile.id, projekt_id, user_name_id, szerv01b AS szervkult01a FROM stressz_szervezetikultura INNER JOIN stressz_profile WHERE stressz_profile.projekt_id=1 I try to get the data from the db but every time it duplicates the results. It …
In order to implement password hashing on the server side with nodeJS 14.7.4, we selected node-django-hashers so that it can be implemented the same with django website side, but when installing module, we are recieving the following error. docker …
I need to manage the django-table2 using django-filter through jquery. Please help me how can i access this via jquery and how do i pass queryset in django-filter I am having my search box in the following way: where I …
I have following class based view which creates a project using form and then returns that created form. class ProjectCreateView(LoginRequiredMixin, CreateView): login_url = "registration:login" model = Project # fields = ['name', 'desc', 'start_date', 'end_date'] template_name = 'project/form.html' form_class = ProjectModelForm …
After installation django-responsive2 as django-responsive2, i got following error: 'verbose_name': _('Small screens') NameError: name '_' is not defined I use from django.utils.translation import gettext_lazy as _. I got this error: mw_instance = middleware(adapted_handler) TypeError: object() takes …
I am trying to convert my Django/Python app from the Google App Engine Standard Environment to the Flexible environment mainly due to the app becoming slow and was constantly hitting a soft memory limit and suggested I upgrade to a …
Есть ли стандартный или просто способ редиректить пользователя из админки на прошлую страницу (с которой он пришел на страницу сохранения объекта)?
I use djano rest framework. I have model, serializer and view: class PictureModel(models.Model): id = models.AutoField(primary_key=True) url = models.CharField(max_length=256) class PictureView(mixins.ListModelMixin, generics.GenericAPIView): serializer_class = PictureSerializer queryset = PictureModel.objects.all() def get(self, request): return self.list(request) class PictureSerializer(serializers.ModelSerializer): class Meta: model = PictureModel …
I work on a project where I have to make a web app. The main idea is for the app to have a map (from OSM preferably) on which you can draw a rectangle and then get lon and lat …
My goal is to retrieve active & reserved tasks on my Celery workers. I'm using a Django-Celery-Redis framework. As suggested here: Retrieve list of tasks in a queue in Celery I have done this to retrieve the tasks: from …