Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
Django Code Acting Different To Code Ran Locally
When I try and run the code ' '.join([(f'<a href="{word}">{word}</a>' if ('http://' in word or 'https://' in word) else word) for word in chat.split(' ')]) in Django it throws a SyntaxError (SyntaxError at /chat invalid syntax (views.py, line 25)) however, when I run it locally there is no SyntaxError. The Python version on the webserver is 3.5, and the version I used was 3.6, but that shouldn't matter. If it does, however, what code should I use in place of what was provided? -
How to process the URL in django
I have created a form where the user can select different dropdown. On the basis of user selection, it will create a URL on selecting the submit button and that URL is displayed in the page with the URL link. When a user clicks into it, it directs to related web pages. But What I want is instead of a user clicking on URL, the related URL page should directly open when the user selects the select button. Do we use ajax here to process the form? I am not sure how to do it. Any help is appreciated. -
Can't display the contents of postgres table in Django Admin panel
I have a postgres instance on AWS and I am using it as the database in django. To push the data in the postgres into my django models.py I did - python manage.py inspectdb > models.py The models.py has this - class TasteCluster(models.Model): id_cluster = models.IntegerField(blank=True, null=True) table_cluster_name = models.CharField(max_length=250, blank=True, null=True) cluster_description = models.CharField(max_length=250, blank=True, null=True) def __str__(self): return self.id_cluster Now when I check the tables in the admin panel in django I can see the table taste cluster like this - Select taste cluster to change ADD TASTE CLUSTER Action: Go 0 of 8 selected TASTE CLUSTER 632 644 643 639 619 614 665 621 8 taste clusters When I click on any of the id_cluster I get this error - TypeError at /admin/dbconnect/tastecluster/8/change/ __str__ returned non-string (type int) Request Method: GET Request URL: http://127.0.0.1:8000/admin/dbconnect/tastecluster/8/change/ Django Version: 2.2.3 Exception Type: TypeError Exception Value: __str__ returned non-string (type int) Exception Location: /usr/local/lib/python3.7/site-packages/django/template/defaultfilters.py in _dec, line 42 Python Executable: /usr/local/opt/python/bin/python3.7 Python Version: 3.7.3 Python Path: ['/Users/rahman/Desktop/django_exercise/03project/post', '/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python37.zip', '/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7', '/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload', '/Users/rahman/Library/Python/3.7/lib/python/site-packages', '/usr/local/lib/python3.7/site-packages', '/usr/local/lib/python3.7/site-packages/geos', '/usr/local/Cellar/numpy/1.16.3_1/libexec/nose/lib/python3.7/site-packages', '/usr/local/Cellar/protobuf/3.7.1/libexec/lib/python3.7/site-packages'] Server time: Thu, 25 Jul 2019 16:19:03 +0000 How can I get/view all the columns and rows of the table ? I am a newb at … -
I need to step out of django directory to see other url patterns
I am trying to make a simple wait-screen with js that redirects you to a django page. the wait-screen will be used alot in the script so I have it in a app called core. the app then has the necessary part linked in the root urls.py. but when I call the wait screen it will pull up but then look for the redirected url in only the core folder. I tried to include the root urls.py in my core/urls.py but that resulted in a circular url problem. here is the main urls.py from django.contrib import admin from django.urls import path, include from core.views import HomePage, wait_screen urlpatterns = [ path('', HomePage.as_view(), name="index"), ... path('Well/', include('Well.urls')), path('wait_screen/', wait_screen, name="wait_screen"), path('admin/', admin.site.urls), ] here is the core/urls.py from django.urls import path from . import views urlpatterns = [ path('wait_screen/', views.wait_screen, name="waitscreen"), ] here is the wait_screen written in js, linked with a view <script> $(function() { // Stop Watch Functions function get_elapsed_time_string(total_seconds) { function pretty_time_string(num) { return ( num < 10 ? "0" : "" ) + num; } ... } var elapsed_seconds = 0; // Set stopwatch setInterval(function() { elapsed_seconds = elapsed_seconds + 1; ... // Redirect var redirect_to = … -
Django view for quiz
I am a newbie to Django, I want to make quiz app but I am stuck in the problem. I have created 3 models(Quiz, Question, Choice). I want to write a function which returns questions which have the same quiz title. I tried this views.py def detail(request): sets = Quiz.objects.all() question = Question.objects.filter(sets.title) return render(request,'App/appdetail.html',{'question':question}) models.py class Quiz(models.Model): title = models.CharField(max_length=20) description = models.CharField(max_length=100) def __str__(self): return self.title class Question(models.Model): set = models.ForeignKey(Quiz,on_delete=models.CASCADE) question_txt = models.CharField(max_length=100) def __str__(self): return self.question_txt class Choice(models.Model): question = models.ForeignKey(Question,on_delete=models.CASCADE) choice_txt = models.CharField(max_length=20) boolean = models.BooleanField(default=False) def __str__(self): return self.choice_txt error message -
how to automatically populate part of Django modal form before popup using ajax code
I have created a work schedule page with a month view, where every day of the month will be pupated by the required tasks to be done on that day. I have also created a modal popup form that appears when the user click any of the dates of the schedule table. The form includes state_time, end_time, task_name, etc. When the user fill the form, a will be created in the relevant day of the month as soon as the user submitted the form. the press button is located in the scheduler table according to the start_time value in the form. The div id of every day cell of the scheduler is the same as its date. What I would like to do is as soon as the user click on any date in the scheduler table the popup form appears automatically populated with this date , which is the same as the clicked div id. view.py def task_create_slim(request): data = dict() # print("hii55") if request.method == 'POST': form = TaskFormSlim(request.POST) if form.is_valid(): form.save() data['form_is_valid'] = True New_task_data = form.cleaned_data # getting the data from the form jsut after saving New_task_date = New_task_data['start_time'] last_task_per_day=Task.objects.filter(start_time=New_task_date).last() # last_task_per_day = [Task.objects.all().latest('start_time')] # I … -
I've ran into really weird error some templates in production doesn't load
I deployed a django app on AWS EC2 every page is working but the login page and detail view page returning a 'template not found error while both of the views working on my machine.how can i fix this ? i already see it has to do something with my virtual machine. to keep in mind here's my folder structure : /Eyelizer /app1 /app2 /Eyelizer /eyelizerenv /etc I use this folder structure as it has something to do with the nginx and gunicorn configuration. -
TypeError: Object of type Cart is not JSON serializable
I just started using session in Django framework. I have create an object cart from Cart model. And when i wan to set cart inside request.session with session['cart'] = cart, I get this error message: TypeError: Object of type Cart is not JSON serializable This is my Cart model class Cart(object): def __init__(self): self.items = [] def addItem(self, itemCart): try: # get index of itemCart if exist index = self.items.index(itemCart) # itemCart exist then set its quantity self.items[index].setQuantity( self.items[index].quantity + itemCart.quantity) except ValueError: # the item does not exits then add to items list self.items.append(itemCart) This is my view when i update the session cart = Cart() session['cart'] = cart And When i run the code i get this error: File "C:\Users\Patrick-PC\AppData\Local\Programs\Python\Python37\lib\json\encoder.py", line 179, in default raise TypeError(f'Object of type {o.class.name} ' TypeError: Object of type Cart is not JSON serializable. Please help -
Is Django and Python a good solution for developing a motorsport engineering tool(Dynamics lap simulation, Timing Management, Calculations,...)
I'm thinking on developing a new Car Dynamics Simulation Tool in Django and Python, having databases with the simulations results and car models. The idea is plot in the web application all the results and display the results in a friendly way for the user. I am very confortable working with Python and I would like to know if you think it is a good idea to develop this tool in django(Python), as long as my idea is running the app through internet, with a certain user and password, and having the possibility of store all the results and models in the server. My only concern is that I dont know if Django is a valid solution for that or I should find other kind of solution. I hope you can help me! Thank you in advance -
Does not display data after filling in the template
I make comments on the site and cannot understand why, after the user has filled out comment forms, they are not displayed, I try to display them through a template P.S I need to display the text and the nickname that the user would enter views.py def CommentGet(request): if request.method == 'POST': comment = Comments(request.POST) name = request.POST['name'] text = request.POST['text'] if comment.is_valid(): comment.save() return HttpResponseRedirect(request.path_info) comments = CommentModel.objects.all() else: comment = Comments(request.POST) comments = CommentModel.objects.all() return render(request, 'news/post.html', {'comment': comment,'comments':comments}) post.html <form method="post" action="{% url 'comment' %}"> {% csrf_token %} <input type="text" name="name" value="{{ name }}"> <input type="text" name="text" value="{{ text }}"> <input type="submit"> </form> {% for comm in comments %} <h1> {{ comm.name }} </h1> <h1> {{ comm.text }} </h1> {% endfor %} models.py class CommentModel(models.Model): name = models.CharField(max_length=100) text = models.TextField(default='') dates = models.DateTimeField(auto_now=True) class Meta: ordering = ['-dates'] def __str__(self): return self.name -
'TemplateDoesNotExist': template loader appears to be searching non-existent routes
I'm receiving a TemplateDoesNotExist error when I click on a particular link, and I've noticed from the 'template-loader postmortem' that Django is searching incorrect and non-existent paths. I've recently moved half of the contents of a Django app called 'reviews' into another called 'accelerators'. My templates directory for each app follows the pattern: '"app name"/templates(folder)/"app name"/html templates'. Having moved the template into the accelerators app (and having updated my settings and urls), Django should be looking for the template via 'accelerators/templates/accelerators/accelerator_form.html', but according to the error message it's instead searching: 'accelerators/templates/reviews/accelerator_form.html'. I suspect this has something to do with the fact that I've just moved this template, alongside a number of other files, from the reviews app, but I can't figure out why this is happening. I've included my updated urls etc. below for reference. Base directory urlpatterns urlpatterns = [ path('admin/', admin.site.urls), path('login/', auth_views.LoginView.as_view(template_name='accounts/login.html'), name='login'), path('logout/', auth_views.LogoutView.as_view(template_name='accounts/logout.html'), name='logout'), path('', include('accounts.urls')), path('reviews/', include('reviews.urls')), path('accelerators/', include('accelerators.urls')), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) accelerators/urls.py from django.urls import path from .views import ( AcceleratorListView, accelerator_detail, accelerator_reviews, AcceleratorCreateView, AcceleratorUpdateView, AcceleratorDeleteView, ) from . import views urlpatterns = [ path('', AcceleratorListView.as_view(), name='accelerators'), path('<int:pk>/', views.accelerator_detail, name='accelerator_detail'), path('new/', AcceleratorCreateView.as_view(), name='accelerator_create'), path('<int:pk>/update/', AcceleratorUpdateView.as_view(), name='accelerator_update'), path('<int:pk>/delete/', AcceleratorDeleteView.as_view(), name='accelerator_delete'), path('<int:pk>/reviews/', views.accelerator_reviews, name='accelerator_reviews'), … -
Getting 1062, Duplicate entry for key unique constraint key, but there are no rows in database with the data for which unique constraint is added
We are getting 1062, “Duplicate entry" for Key "unique constraint key name" on saving Django Model, whereas there are no existing rows in database with the unique constrained data, for eg: we have added unique together for email and phone number fields, but when we try to save data we are getting duplicate entry. This is not happening all the time but in some cases, also this happens a lot when database cpu utilization is high , we are using Amazon AWS -
Django on Google App Engine: Cron Job Returning 400
I am trying to create a cron job on Google App Engine for my Django application deployed in the flexible environment. The cron job is deployed and view-able on the GCP dashboard but when it runs it shows "Failed". In the logs I can see that it is returning an HTTP 400 error, which is likely the the problem. I am able to go to the URL that the cron job requests by putting into my browser. Checking the logs, that shows an HTTP status 200. The error only occurs when I press the "Run Now" button on the Cron Jobs GCP dashboard, or when it runs automatically at the interval specified in cron.yaml. This is my first attempt at setting up a cron job on Google App Engine so forgive me if this is not correct. I'm treating this like any other view function in Django. The url is specified in urls.py, which routs to the view function. The view function runs my process and returns an HttpResponse. For troubleshooting purposes, I've removed any process from the view function and just return the HttpResponse (see code below); obviously, the intention is to put a process in the function once … -
How to convert SQL import to Django import?
I'm trying to import data from a database using Django. This was previously done using SQL, but now I'm trying to use Django instead of SQL. I'm not familiar with SQL really and am having trouble converting the SQL import to a Django one. So far, I've converted con = psycopg2.connect("dbname='mydatabase' user='mydatabase_reader' host='xxx.xxx.xx.xx' password='test'") to users = EventTransactions.objects.using('mydatabase').filter('profitcenter_id'=profitcenter_id, 'actualdatetime'=date).values('') but that's as far as I've gotten. Right now, I'm working on using the for loop to grab information for each day. def handle(self, *args, **options): r = redis.Redis(host=REDIS_HOST, db=REDIS_DB) memberships = MEM_MAP_INV.keys() start_date = datetime.datetime.strptime(options['start_date'],'%Y-%m-%d').date() end_date = datetime.datetime.strptime(options['end_date'],'%Y-%m-%d').date() profitcenter_id = options['profitcenter_id'] # number of days passed elapsed_days = (end_date - start_date).days dates = [start_date + datetime.timedelta(days=i) for i in range(elapsed_days)] con = psycopg2.connect("dbname='mydatabase' user='mydatabase_reader' host='xxx.xxx.xx.xx' password='test'") cur = con.cursor() for date in dates: counts = {} for m in memberships: membership = tuple(MEM_MAP_INV[m]) sql = cur.mogrify("""SELECT count(*) from eventtransactions WHERE profitcenter_id = %s AND date(actualdatetime) = %s""", (profitcenter_id, date)) # have to split into two cases due to how postgres queries for NULL values if m == 'n/a': sql = cur.mogrify(sql + """ AND membertype IS NULL""") else: sql = cur.mogrify(sql + """ AND membertype IN %s""",(membership,)) cur.execute(sql) count = … -
Is there anyways to store the data from the forms into variables without saving it to the database?
I'm trying to save the data inside a form into variables without saving it to the database but I don't know how. I'm not even sure if it's possible. -
Pass id parameter into imported class in Django
In Django I have a function based view responsible of printing the details (actually only the name) of all the registered users on a pdf file. def test_pdf(request, id): # Create the HttpResponse object with the appropriate PDF headers. response = HttpResponse(content_type='application/pdf') response['Content-Disposition'] = 'attachment; filename="My Users.pdf"' buffer = io.BytesIO() report = MyPrint(buffer, 'Letter', id) pdf = report.print_users() response.write(pdf) return response This function works because I imported in the views.py file a class I built in another file, responsible of drawing the pdf, MyPrint: from reportlab.lib.pagesizes import letter, A4 from reportlab.platypus import SimpleDocTemplate, Paragraph from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.enums import TA_CENTER from django.contrib.auth.models import User class MyPrint: def __init__(self, buffer, pagesize): self.buffer = buffer if pagesize == 'A4': self.pagesize = A4 elif pagesize == 'Letter': self.pagesize = letter self.width, self.height = self.pagesize def print_users(self): buffer = self.buffer doc = SimpleDocTemplate(buffer, rightMargin=72, leftMargin=72, topMargin=72, bottomMargin=72, pagesize=self.pagesize) # Our container for 'Flowable' objects elements = [] # A large collection of style sheets pre-made for us styles = getSampleStyleSheet() styles.add(ParagraphStyle(name='centered', alignment=TA_CENTER)) # Draw things on the PDF. Here's where the PDF generation happens. # See the ReportLab documentation for the full list of functionality. users = User.objects.all() elements.append(Paragraph('My User Names', … -
validate and handle error to pass meaningful status back to client
I am using graphene-django instead of rest api(rest framework). I am working on user registration. In the rest framework, validation was done in serializers part but when using graphene how do i validate and handle error for passing meaningful status to client? Here is the registration code class Register(graphene.Mutation): class Arguments: email = graphene.String(required=True) password = graphene.String(required=True) password_repeat = graphene.String(required=True) user = graphene.Field(UserQuery) success = graphene.Boolean() errors = graphene.List(graphene.String) @staticmethod def mutate(self, info, email, password, password_repeat): if password == password_repeat: try: user = User.objects.create(email=email) user.set_password(password) user.is_active = False user.full_clean() user.save() return Register(success=True, user=user) except ValidationError as e: import pdb pdb.set_trace() return Register(success=False, errors=[e]) return Register(success=False, errors=['password', 'password is not matching']) one example can be validation for if user with email already exists -
Image are not displayed in my home page from model.py
I have created a form for user to post their stuff, all other stuff works fine only image can't be displayed in my home page I have tried to overlook again and again the code seems to ok, my guess is the structure of folders of image. Am not really sure how to structure the folders for images. Please help!! views.py @login_required def PostNew(request): if request.method == "POST": form = PostForm(request.POST) if form.is_valid(): post = form.save(commit=False) post.author = request.user post.save() return redirect('loststuffapp:IndexView') else: form = PostForm() return render(request, 'loststuffapp/form.html', {'form': form}) models.py class Documents(models.Model): docs_name = models.CharField(max_length=200,verbose_name="Names in Documents") item_type = models.CharField(default="", max_length=100,verbose_name="Item type" ) police_station = models.CharField(max_length=255, verbose_name="Police station") phone_no = models.CharField(verbose_name="Phone number", max_length=10, blank=False, validators=[int_list_validator(sep=''),MinLengthValidator(10),], default='0766000000') date = models.DateTimeField(default=timezone.now,verbose_name="Date") Description = models.TextField(blank=True, null=True,verbose_name="Description") pay_no = models.IntegerField(default=0,verbose_name="payment number") publish = models.BooleanField(default=False) image = models.ImageField(default="add Item image", upload_to="media",blank=False, verbose_name="Images") """docstring for Documents""" def __str__(self): return self.docs_name forms.py class PostForm(forms.ModelForm): class Meta: model = Documents fields = ['docs_name', 'item_type', 'police_station','phone_no', 'Description', 'image'] labels = {'docs_name': 'Name in Documents','item_type':'Item type','police_station':'Police station', 'phone_no':'Phone number','Description':'Description','image':'Images' } setting.py STATIC_URL = '/static/' MEDIA_URL ='/media/' MEDIA_ROOT = os.path.join(BASE_DIR,'loststuff/media') home.html {% for Doc in documents %} <div class="content-wrapper"> <div class="card"> <div class="card-image"> <p><label style="font-size:15px; font-weight: bold;color: black;">Names in … -
Recommended way to render a form with radio button in each row
I want to build a form with a table in which each row contains a radio button and some additional information. Suppose I have two related models: class City(models.Model): name = models.CharField(...) state = models.CharField(...) class Business(models.Model): city = models.ForeignKey(City, on_delete=models.CASCADE, null=True) I want to create a table showing all rows from the City model with a radio button in the first row, to be saved as the city field in a Business model instance. The additional columns in the table should not be editable. Each row in the table would look something like this: <tr> <td> <input type="radio" name="city_radio"/> </td> <td>CITY NAME HERE</td> <td>CITY STATE HERE</td> </tr> My first thought was to use a ModelFormSet and create a ModelForm representing each row: class CityTableRowForm(forms.ModelForm): city_radio = forms.RadioSelect() class Meta: model = City fields = ['name', 'state'] And use it in the template as such: {% for form in cities_formset %} <tr> <td> {{ form.city_radio }} </td> <td>{{ city.instance.name }}</td> <td>{{ city.instance.state }}</td> </tr> {% endfor %} The table does get rendered correctly. The problem is, each radio gets a different name and so they behave independently from each other. My second approach was to create a ModelForm representing the … -
Always getting 401 or 500 when authenticating users with amazon application load balancer and django oidc provider at receiving access token
I cannot get ALB to check the /userinfo endpoint after receiving access_token, refresh_token and id_token to it I'm trying to authenticate users with Amazon ALB and django_odic_provider. I have set the load balancer authentication on ALB side, tested all oidc endpoints (all are accessible and returning valid results). When I try to authenticate I'm presented with django's login view, I successfully authenticate, but on return from django's oidc/authorize endpoint I get 401 Unauthorized on oauth2/idpresponse page of load balancer. If I try to use Cognito and federated django_oidc_provider I also successfully log in and on return from authorize to oauth2/idpresponse I'm getting 500 server error with message: Exception processing authorization code. It seems to me that ALB is not able to read my response but when I check it everything is formatted as in documentation and jwt is ok. By looking at logs it seems that load balancer never checks token and userinfo endpoints once it receives access_token, refresh_token and it_token from authorization endpoint. I would like to understand how load balancer interprets this response in order to try to figure out what is wrong with it. This is authorization response: { 'access_token': 'd90623245e474ee0b23a0a9ca062ba74', 'refresh_token': '4d439d3249e64cbe9975310f84431c25', 'token_type': 'Bearer', 'expires_in': 3600, … -
djang admin client not making post request properly
I'm trying to make a post request with pytest admin client @pytest.mark.django_db def test_organisation_upload(admin_client): resp = admin_client.post("/mypage/upload_organisations/", follow=True) import pdb; pdb.set_trace() print(resp.content) assert resp.status_code == 201 I have a form in /mypage. When submitting the form, the user is directed to /mypage/upload_organisations/ Problem is, the response being returned is the page itself -- not the result that should be shown upon successful upload. how do i fix this? I want it to actually upload the form, not just go to the page. Everything works fine when i use a request factory (rf) instead. -
Calling a PL/SQL procedure from django with callproc
I need to call a procedure in PL/SQL from an API in Django. I use the callproc and the right values, but get the error: "PLS-00306: wrong number or types of arguments in call" In Oracle I have: PROCEDURE new_payment(pv_id IN VARCHAR2, parr_user IN OWA.vc_arr, parr_date_reg IN OWA.vc_arr, parr_d_value IN OWA.vc_arr, parr_descr IN OWA.vc_arr, parr_type IN OWA.vc_arr, pi_gerar_ref_mb IN PLS_INTEGER DEFAULT 0, pv_data_limite_ref_mb IN VARCHAR2 DEFAULT NULL) In models.py I have: class PAYMENT(): def new_payment(self, id, user, date_reg, value, descr, type): cur = connection.cursor() ref = cur.callproc("PAYMENT.new_payment", [id, user, date_reg, value, descr, type]) cursor.close() return ref In views.py: `pay=PAYMENT() x=pay.new_payment('123', '111', '2019-07-23', '10', 'test1', 'teste2`) At this point, i get the error: `"ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'NEW_PAYMENT'"` Any tip in what am I doing wrong? -
Python Django - update booleanField via List View
Is there any way how to update booleanField in the list view? In list view I have listed all my orders and I need to mark which are done and which are not done. I know I can update it via UpdateView, but that is not user friendly because I have to leave the listview page. models.py class Order(models.Model): ... order = models.CharField(max_length = 255) completed = models.BooleanField(blank=True, default=False) views.py class OrderIndex(generic.ListView): template_name = "mypage.html" context_object_name = "orders" def get_queryset(self): return Order.objects.all().order_by("-id") mypage.html {% extends "base.html" %} {% block content %} {% for order in orders%} User: {{ order.user}} | Completed: {{order.completed}} <input type="checkbox"> {% endfor %} <input type="submit"> {% endblock %} I am quite new to the django framework and have no idea how to make it work. -
$group aggregation with $sum returns nothing
I have a query which runs as expected when it's directly executed in MongoDB, but I'm facing some troubles trying to make it work through MongoEngine. In fact, it returns nothing. Query on MongoDB (which works correctly): db.annual_account.aggregate([{ $group: { "_id":"$adress.city", "total"{$sum: 1} }} ]) Result (which is what I expect): { "_id" : "Genk", "total" : 1 } { "_id" : "Ottignies-Louvain-la-Neuve", "total" : 1 } { "_id" : "Ganshoren", "total" : 1 } { "_id" : "Mont-de-l'Enclus", "total" : 1 } { "_id" : "Charleroi", "total" : 1 } And now, my query on MongoEngine in my views.py: class StatisticsView(generics.ListAPIView): serializer_class = AnnualAccountSerializer def get_queryset(self): group = {"$group" : {"_id": "$code", "total": {"$sum":1} } } response = AnnualAccount.objects.aggregate(group) return response Results: HTTP 200 OK Allow: GET, HEAD, OPTIONS Content-Type: application/json Vary: Accept [ {}, {}, {}, {}, {}, ] Does someone has any idea of what is wrong, please? Why I don't have the same result between the shell Mongo and MongoEngine? Thank you, Simon -
HINT: Perhaps you meant to reference the column
When I open the page, I get error: column user_landings_landing.flow_chatbot_id does not exist LINE 1: ...ding"."message", "user_landings_landing"."video", "user_land... ^ HINT: Perhaps you meant to reference the column "user_landings_landing.flow_chatbot". How can I fix it? I tried ` SELECT "flow_chatbot" FROM user_landings_landing; and SELECT flow_chatbot FROM user_landings_landing; but it's not efficiency.