Re: I get errors when I try deploying my app on gae
That was actually it. I got it solved and it's working fine. Thanks a lot. On Wed, Aug 7, 2019, 8:33 AM Kasper Laudrup wrote: > Hi Solomon, > > On 06/08/2019 09.27, Solomon Mbak wrote: > > I have given myself many hours to try and solve this one, all to no > > avail. I really need some help. > > > > My app works perfectly on development environment. When I deploy on > > Google App Engine, I get series of syntax error. > > > > It would be extremely helpful if you could post the exact syntax error > you are getting, without that, I can only guess. > > > > > returnHttpResponse(f"{single_slug} doesnt exist at all.") > > | > > > > This error on this piece is on the last line. And the console points to > > the full-stop on that line. > > > > The "f-string syntax" was introduced in Python 3.6, so I'm guessing > you're using an older Python version when running in Google App Engine > which doesn't understand the convenient "f-string syntax". > > Hopefully that explains it. > > Kind regards, > > Kasper Laudrup > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/c4c7808a-f3e5-8008-a9e3-8c10847662e7%40stacktrace.dk > . > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2B4s2%3D_VFErNEUMwPxVmUjRL947LheoicbLNszLhkcpaOKjLZg%40mail.gmail.com.
Re: I get errors when I try deploying my app on gae
Hi Solomon, On 06/08/2019 09.27, Solomon Mbak wrote: I have given myself many hours to try and solve this one, all to no avail. I really need some help. My app works perfectly on development environment. When I deploy on Google App Engine, I get series of syntax error. It would be extremely helpful if you could post the exact syntax error you are getting, without that, I can only guess. returnHttpResponse(f"{single_slug} doesnt exist at all.") | This error on this piece is on the last line. And the console points to the full-stop on that line. The "f-string syntax" was introduced in Python 3.6, so I'm guessing you're using an older Python version when running in Google App Engine which doesn't understand the convenient "f-string syntax". Hopefully that explains it. Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c4c7808a-f3e5-8008-a9e3-8c10847662e7%40stacktrace.dk.
I get errors when I try deploying my app on gae
I have given myself many hours to try and solve this one, all to no avail. I really need some help. My app works perfectly on development environment. When I deploy on Google App Engine, I get series of syntax error. from django.shortcuts import render, redirect from django.http import HttpResponse from .models import master_courses, course_category, courses_series from django.contrib import messages from django.contrib.auth.decorators import login_required def single_slug(request, single_slug): categories = [c.course_slug for c in course_category.objects.all()] if single_slug in categories: matching_series = courses_series.objects.filter( course_category__course_slug=single_slug) series_urls = {} for ms in matching_series.all(): part_one = master_courses.objects.filter( course_series__course_series=ms.course_series).earliest("date_added") series_urls[ms] = part_one.course_slug return render(request, "main/category.html", {"the_series": series_urls}) masterCourses = [m.course_slug for m in master_courses.objects.all()] return HttpResponse(f"{single_slug} doesnt exist at all.") This error on this piece is on the last line. And the console points to the full-stop on that line. from django.db import models # Create your models here. class Contact(models.Model): full_name = models.CharField(max_length=150) email= models.EmailField() subject = models.CharField(max_length=200) message = models.TextField() def __str__(self): return f'{self.full_name} {self.subject}' The error on that line points to the last line also. There are a few others like that also. I need some -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/8b5bf41e-28fc-40ce-b6b1-6efc11b78295%40googlegroups.com.