Andrew McCloud

  • Random
  • Archive
  • RSS

Django 1.5 Custom User GeoManager

AttributeError: ‘GeoManager’ object has no attribute ‘get_by_natural_key’

Using geo fields on a Django model requires the use of GeoManager. Custom User models require an object manager that implements BaseUserManager.get_by_natural_key. If you’re trying to add geo fields to your custom User model you’ll need create a custom manager that mixes a user manager and GeoManager. Lucky us, this is a piece of cake!

http://gist.github.com/4291351

    • #django
    • #opensource
    • #python
  • 5 months ago
  • 1
  • Comments
  • Permalink
  • Share
    Tweet

1 Notes/ Hide

  1. pyth0ner likes this
  2. amccloud posted this

Recent comments

Blog comments powered by Disqus
← Previous • Next →

About

I make web.

Co-Founder of Pixelcloud.com
Django & Backbone.js consulting.

Me, Elsewhere

  • amccloud on Forrst
  • @amccloud on Twitter
  • Facebook Profile
  • Google
  • My Skype Info
  • amccloud on github
  • Xbox Live Profile
  • RSS
  • Random
  • Archive
  • Mobile

© 2011 Andrew McCloud. Effector Theme by Carlo Franco.

Powered by Tumblr