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 116521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T03:11:28+00:00 2026-05-11T03:11:28+00:00

After getting fine answer to my previous question , I came across another problem.

  • 0

After getting fine answer to my previous question, I came across another problem.

I followed the third approach, being aware of what djangodocs say about abstract model subclassing.

I am using the latest Django, rev 9814. The strange behaviour I get:

In [1]: o = Order()  In [2]: o.save() DEBUG:root:STORING EVENT MESSAGE: Order created. pk=2 -- LEVEL TOP DEBUG:root:Saving order pk=2   # it actually does exist in the database, so everything's cool.  In [3]: o.id Out[3]: 2L # huh?  In [4]: o._default_manager Out[4]: <django.db.models.manager.Manager object at 0x16e5370>  In [5]: Order.objects.all() Out[5]: []  # WTF? and even more WTF below:  In [6]: Order.objects.get(id=2)  --------------------------------------------------------------------------- TypeError                                 Traceback (most recent call last)  /Users/adam/_dev/cashfire/<ipython console>   /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/db/models/manager.py in get(self, *args, **kwargs)      91       92     def get(self, *args, **kwargs): ---> 93         return self.get_query_set().get(*args, **kwargs)      94       95     def get_or_create(self, **kwargs):  /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/db/models/query.py in get(self, *args, **kwargs)     333         '''     334         clone = self.filter(*args, **kwargs) --> 335         num = len(clone)     336         if num == 1:     337             return clone._result_cache[0]  /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/db/models/query.py in __len__(self)     159                 self._result_cache = list(self._iter)     160             else: --> 161                 self._result_cache = list(self.iterator())     162         elif self._iter:     163             self._result_cache.extend(list(self._iter))  /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/db/models/query.py in iterator(self)     286             else:     287                 # omit aggregates in object creation --> 288                 obj = self.model(*row[index_start:aggregate_start])     289      290             for i, k in enumerate(extra_select):  TypeError: __init__() takes exactly 1 argument (5 given) 
  • 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. 2026-05-11T03:11:28+00:00Added an answer on May 11, 2026 at 3:11 am

    Ok, my fault (the Pragmatic Progammer’s ‘Don’t blame SQL’ again). It was exactly what traceback was saying, forgot about __init__‘s args & kwagrs. Silly me.

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

Sidebar

Ask A Question

Stats

  • Questions 193k
  • Answers 193k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If the script is "ignored" if there's a $(document)ready then… May 12, 2026 at 6:36 pm
  • Editorial Team
    Editorial Team added an answer No, OpenGL does not support double indirections. With respect to… May 12, 2026 at 6:36 pm
  • Editorial Team
    Editorial Team added an answer There are two different ways you could handle this look,… May 12, 2026 at 6:36 pm

Related Questions

I'm getting Ruby on Rails set up on a fresh installation of Snow Leopard.
I need to do a left join on multiple conditions where the conditions are
this one is hard to explain! I am writing a python application to be
There’s a really cool diff class hosted by Google here: http://code.google.com/p/google-diff-match-patch/ I’ve used it

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.