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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:33:42+00:00 2026-05-26T19:33:42+00:00

We have a dummy Python module ( fields.py ) with custom Django fields which

  • 0

We have a dummy Python module (fields.py) with custom Django fields which loads real implementations based on the database configured:

if settings.DATABASES['default']['ENGINE'].find('postgresql') != -1:
  from fields_postgresql import *
else:
  from fields_dummy import *

The reason for this is that we are using PostgreSQL ip4r extension which allows nice (and fast) work with fields containing IP values. But we also have dummy implementations (in Python code) for other databases, so that development can be done also in SQLite. So if you are using PostgreSQL those fields are backed up with fields using ip4r indexes and if you are using some other database system those fields are regular fields.

The problem is how to use South migrations on such fields. The problem is that add_introspection_rules discovers fields_postgresql and fields_dummy so this leaks to migrations. This is the problem later on if you want to apply a migration made with SQLite on an installation with PostgreSQL.

How it would be possible to convince South that this is all just fields module and it does not matter which concrete implementation migrations are run with.

  • 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-05-26T19:33:42+00:00Added an answer on May 26, 2026 at 7:33 pm

    Drop support for SQLite.

    You are right, if you aren’t running your development environment on a mobile phone, maintaining your very own South-based migration script just in a sake of not installing Postgre probably isn’t worth the hassle.

    Postgre installation versus maintaining custom migration code is a one-time action versus continuous and potentially time-consuming procedure (since you will potentially have to modify your custom migration code in order to be in sync with newer South releases).

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

Sidebar

Related Questions

I have a table with three fields, FirstName, LastName and Email. Here's some dummy
So, I have a file called 'dummy' which contains the string: There is 100%
Importing the standard logging module pollutes sys.modules with a bunch of dummy entries: Python
I have a dummy Java Program, which I want to write in Clojure. It
I have some python module, that I import as: from mygraph.draw import pixel The
I have the following files dummy.py #!c:/Python27/python.exe -u from mako import exceptions from mako.template
I have a MySQL table which I want to populate with some dummy data
I am new dummy to python...please help me in the following problem I have
I have a dummy class where I am testing arrays. I've noticed that when
I have a generic method with this (dummy) code (yes I'm aware IList has

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.