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.

Reply via email to