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

  • Home
  • SEARCH
  • 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 8558975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:56:00+00:00 2026-06-11T15:56:00+00:00

i have been encountered by this error ‘function’ object has no attribute ‘has_header’ my

  • 0

i have been encountered by this error

‘function’ object has no attribute ‘has_header’

my url file contans

 url(r'^HighDefs/$', list_HighDefs),

and i have a view defined with the name

list_HighDefs

in views file. I dont know whats wrong.

the view contains

def list_HighDefs(request):
user_logger = Logger()
user_logger.log_stack()


if user_object:
    email = user_object.email
    uname = user_object.first_name+' '+user_object.last_name

    try:
        row = allapps_models.highdef.objects.filter(user_email=email, show_status=1)


    except Exception:

         return error_page(request)

    highdefs = []

    for m in row:
        order_product = int(m.m_id)
        state = m.state

        try:
            category = checkout_models.state.objects.get(pk=product).premature.category.all()
            category = category[0].pk
        except:

            category = 0


        if int(category) == 2:
            if state != 's':
                highdefs.append(m)


    return render_to_response('main/HighDefs.html',{'request': request, 'highdefs': highdefs, 'uname' :uname, 'email': email}, context_instance=RequestContext(request))

else:
    return(login)
  • 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-11T15:56:01+00:00Added an answer on June 11, 2026 at 3:56 pm

    Your view must return an HttpResponse object.

    It does this for one branch of your if statement:

    return render_to_response(...)
    

    But not in the else branch.

    return(login)
    

    If login is a view function that returns an HttpResponse object, then you can change your return statement to

    return login(request)
    

    However, I suspect you want to redirect the user to your login page instead. In that case, change your code to:

    from django.http import HttpResponseRedirect
    return HttpResponseRedirect('/login/')
    

    where /login/ is the url of your login page.

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

Sidebar

Related Questions

How to write this in C#.NET, I have not been encountered using the ^
I have been trying to output XML with PHP but encountered a strange(!) error
I have been encountering this error for my project, which involves working with Digital
I've encountered this apparently common problem and have been unable to resolve it. If
Recently, I have been going through search trees and I encountered red-black trees, the
Have been trying to encrypt an xml file to a string so that I
Have been working on this question for a couple hours and have come close
I have encountered an error, java.sql.SQLException: Column count doesn't match value count at row
I have encountered a problem in my program that has me somewhat stumped. I
Ive been getting an error, I have an error with the entity framework. I

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.