Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8139749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:55:56+00:00 2026-06-06T11:55:56+00:00

I keep getting this error when using django templates in Google App Engine: TemplateSyntaxError:

  • 0

I keep getting this error when using django templates in Google App Engine:

TemplateSyntaxError: Invalid block tag: ‘endif’

python code:

class SuperAdmin(webapp.RequestHandler):
def get(self):

    #set the user object
    user = users.get_current_user()

    # See if user is logged in
    if user:  # signed in already
        #Create Logout URL
        logoutUrl = users.create_logout_url(self.request.uri)
        template_values['logoutUrl'] = logoutUrl

        #is this user a super admin
        isSuperAdmin = acl_authentication.AuthenticateUserViaAcl().isUserSuperAdmin(user.email(), user.user_id())
        template_values['isSuperAdmin'] = isSuperAdmin

        #Use our auth object to see if the user is allowed on this page
        if acl_authentication.AuthenticateUserViaAcl().IsUserPermitted(user.user_id(), user.email(), '0', '0', 50): #User is allowed
            self.response.out.write("This user is in the acl db and a super admin<br/>")

            #Add action1 to template_values
            template_values['action1'] = self.request.get('action1')

            #Write the Header
            path = os.path.join(os.path.dirname(__file__), 'adminHeader.html')
            self.response.out.write(template.render(path, template_values))

            #Write the Login Page
            path = os.path.join(os.path.dirname(__file__), 'SuperAdmin.html')
            self.response.out.write(template.render(path, template_values))

            #Write the Header
            path = os.path.join(os.path.dirname(__file__), 'adminFooter.html')
            self.response.out.write(template.render(path, template_values))

        else: #User is not allowed
            #Log to DB that we hit access denied page
            acl_authentication.AuthenticateUserViaAcl().LogToDbAccessDeniedHit(user.user_id(), user.email(), self.request.url)
            #Redirect to Access Denied Page
            self.redirect("/AccessDeniedPage")

    else: #User is not logged in
        self.redirect("/LoginPage?destUrl=" + self.request.url)  

.html template code

<!-- Begin If action1==manage_companies -->
                {% if action1 == "manage_companies" % }
                    <tr>
                      <td>Manage Companies</td>
                    <tr>
                      <td>&nbsp;</td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                    </tr>
                {% endif %}
<!-- /End If action1==manage_companies -->

I’m not familiar with django so im lost here. Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T11:55:58+00:00Added an answer on June 6, 2026 at 11:55 am

    There’s an extra space between ‘%’ and ‘}’ in this line
    {% if action1 == "manage_companies" % }
    try changing it to
    {% if action1 == "manage_companies" %}

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I keep getting this error. I am using Mac. I generated a key and
I keep getting this error when making the program as given below: using System;
I keep getting this error: Invalid Signature - This error occurs when you have
I'm using the Html Agility Pack and I keep getting this error. The remote
I am using asp.net mvc 3 and I keep getting this error and I
Hi I keep getting this error using a sqldatasource in asp.net, I can connect
So I keep getting this error when trying to compile C++ code using CodeBlocks.
When using ANT to build my Java application I keep getting this error. I
I am using Eclipse to write my Android app and I keep getting this
When I try to make a shape using variables, I keep getting this error

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.