mutse
mutse

Reputation: 41

Run manage.py syncdb error with Django 1.5

When I upgrade django from 1.4 to 1.5, and run manage.py syncdb, there is a error as following

$ python manage.py syncdb

/usr/local/lib/python2.7/dist-packages/django/conf/init.py:219: DeprecationWarning: You have no filters defined on the 'mail_admins' logging handler: adding implicit debug-false-only filter. See http://docs.djangoproject.com/en/dev/releases/1.4/#request-exceptions-are-now-always-logged DeprecationWarning)

TypeError: init() got an unexpected keyword argument 'verify_exists'

Thanks very much !

Upvotes: 4

Views: 1162

Answers (1)

Timmy O'Mahony
Timmy O'Mahony

Reputation: 53971

The verify_exists keyword argument for a model URLField has been removed (depreciated since 1.3.1). You can read more in the django depreciation notes for 1.5:

django.db.models.fields.URLField.verify_exists will be removed. The feature was deprecated in 1.3.1 due to intractable security and performance issues and will follow a slightly accelerated deprecation timeframe.

The simple fix is to find the offending models.URLField in the appropriate models.py that is throwing the error and remove the verify_exists=True, i.e:

# Before
some_site = models.URLField(verify_exists=True)

# After
some_site = models.URLField()

Upvotes: 3

Related Questions