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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:40:32+00:00 2026-06-15T04:40:32+00:00

I am trying schemamigration with south on my model (I am using django 1.4

  • 0

I am trying schemamigration with south on my model
(I am using django 1.4 and python 2.6 on ubuntu)

Initially my model was

class Review(models.Model):
    reviewdate=models.DateField(default=date.today)
    description=models.TextField()
    author=models.ForeignKey(User,null=True)

I added a field

from django.core.validators import MinValueValidator,MaxValueValidator

class Review(models.Model):
    reviewdate=models.DateField(default=date.today)
    description=models.TextField()
    author=models.ForeignKey(User,null=True)
    rating = models.IntegerField(MinValueValidator(1),MaxValueValidator(10),default=5,help_text='integers 1 to 10')

when I run

python manage.py schemamigration myapp --auto

I get this TypeError

...
File "/home/me/Django-1.4/django/db/models/base.py", line 198, in __new__
    new_class._prepare()
  File "/home/me/Django-1.4/django/db/models/base.py", line 255, in _prepare
    cls.__doc__ = "%s(%s)" % (cls.__name__, ", ".join([f.attname for f in opts.fields]))
TypeError: Error when calling the metaclass bases
    sequence item 6: expected string, MaxValueValidator found

Can someone please tell me where I am wrong?

  • 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-15T04:40:34+00:00Added an answer on June 15, 2026 at 4:40 am

    Your syntax is incorrect. You should provide the validators as a list to the validators argument:

    models.IntegerField(validators=[MinValueValidator(1), MaxValueValidator(10)], default=5, help_text='integers 1 to 10')
    

    For more information, see the docs for using validation in practice.

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

Sidebar

Related Questions

I'm trying to do a django-south migration to an existing application to add django-audit-log
I'm trying to run migration by south, But when I run : manage.py schemamigration
Trying to deploy a Django 1.4 project using mod_wsgi and virtualenv, i'm running into
I’m trying to migrate a few models from one Django app to another and
I am trying to get started with South. I had an existing database and
Trying to execute a Powershell cmdlet from a MVC 3 Controller using impersonation but
Trying to understand radix sort for my data structures class. My teacher showed us
Trying to understand how EDE works by using it to generate Makefiles for a
Trying to do this sort of thing... WHERE username LIKE '%$str%' ...but using bound
I am trying to implement django-paypal (dcramer's version) with IPN and although I get

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.