rmcepeda / django-survey

Automatically exported from code.google.com/p/django-survey
0 stars 0 forks source link

TypeError: 'core' is not a valid argument for <class 'django.db.models.fields.files.ImageField' #23

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. python manage.py syncdb
2.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
Django version 1.0-alpha_2-SVN-8339, Python 2.5.1, Windows, Postgres

Please provide any additional information below.
Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_manager(settings)
  File "C:\Python25\lib\site-packages\django\core\management\__init__.py",
line 334, in execute_manager
    utility.execute()
  File "C:\Python25\lib\site-packages\django\core\management\__init__.py",
line 295, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\Python25\lib\site-packages\django\core\management\base.py", line
77, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "C:\Python25\lib\site-packages\django\core\management\base.py", line
95, in execute
    self.validate()
  File "C:\Python25\lib\site-packages\django\core\management\base.py", line
122, in validate
    num_errors = get_validation_errors(s, app)
  File
"C:\Python25\lib\site-packages\django\core\management\validation.py", line
28, in get_validation_errors
    for (app_name, error) in get_app_errors().items():
  File "C:\Python25\lib\site-packages\django\db\models\loading.py", line
128, in get_app_errors
    self._populate()
  File "C:\Python25\lib\site-packages\django\db\models\loading.py", line
57, in _populate
    self.load_app(app_name, True)
  File "C:\Python25\lib\site-packages\django\db\models\loading.py", line
72, in load_app
    mod = __import__(app_name, {}, {}, ['models'])
  File "C:\Projects\pyapps\dot\gem\models.py", line 820, in <module>
    model_signals = SignalRegister()
  File "C:\Projects\pyapps\dot\gem\signals.py", line 88, in __init__
    g =
Game.objects.values('team_profile_module').order_by('team_profile_module').disti
nct()
  File "C:\Python25\lib\site-packages\django\db\models\manager.py", line
114, in values
    return self.get_query_set().values(*args, **kwargs)
  File "C:\Python25\lib\site-packages\django\db\models\query.py", line 431,
in values
    return self._clone(klass=ValuesQuerySet, setup=True, _fields=fields)
  File "C:\Python25\lib\site-packages\django\db\models\query.py", line 596,
in _clone
    c._setup_query()
  File "C:\Python25\lib\site-packages\django\db\models\query.py", line 660,
in _setup_query
    self.query.add_fields(field_names, False)
  File "C:\Python25\lib\site-packages\django\db\models\sql\query.py", line
1425, in add_fields
    True)
  File "C:\Python25\lib\site-packages\django\db\models\sql\query.py", line
1204, in setup_joins
    field, model, direct, m2m = opts.get_field_by_name(name)
  File "C:\Python25\lib\site-packages\django\db\models\options.py", line
274, in get_field_by_name
    cache = self.init_name_map()
  File "C:\Python25\lib\site-packages\django\db\models\options.py", line
300, in init_name_map
    for f, model in self.get_all_related_m2m_objects_with_model():
  File "C:\Python25\lib\site-packages\django\db\models\options.py", line
377, in get_all_related_m2m_objects_with_model
    cache = self._fill_related_many_to_many_cache()
  File "C:\Python25\lib\site-packages\django\db\models\options.py", line
391, in _fill_related_many_to_many_cache
    for klass in get_models():
  File "C:\Python25\lib\site-packages\django\db\models\loading.py", line
136, in get_models
    self._populate()
  File "C:\Python25\lib\site-packages\django\db\models\loading.py", line
57, in _populate
    self.load_app(app_name, True)
  File "C:\Python25\lib\site-packages\django\db\models\loading.py", line
72, in load_app
    mod = __import__(app_name, {}, {}, ['models'])
  File "C:\Python25\lib\site-packages\survey\models.py", line 159, in <module>
    class Question(models.Model):
  File "C:\Python25\lib\site-packages\survey\models.py", line 172, in Question
    null=True, blank= True, core=False)
  File "C:\Python25\lib\site-packages\django\db\models\fields\files.py",
line 283, in __init__
    FileField.__init__(self, verbose_name, name, **kwargs)
  File "C:\Python25\lib\site-packages\django\db\models\fields\files.py",
line 131, in __init__
    raise TypeError("'%s' is not a valid argument for %s." % (arg,
self.__class__))
TypeError: 'core' is not a valid argument for <class
'django.db.models.fields.files.ImageField'>.

Original issue reported on code.google.com by EdMenen...@gmail.com on 22 Aug 2008 at 1:55

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for the patch. there are other issues as well (specifically with the 
image
choices) which also need fixing.

Original comment by doug.nap...@gmail.com on 22 Aug 2008 at 5:28

GoogleCodeExporter commented 8 years ago
Fixed with r89. I have updated django-survey to work against django r8922.
--yml

Original comment by yann.ma...@gmail.com on 3 Sep 2008 at 4:11