I've been playing around with a local install of django on os x and I have
continously been getting errors when trying to syncdb. Going through Jeff
Croft's simple tutorial here:
http://www2.jeffcroft.com/2006/jul/14/django-admin-your-php-app/ 

With this modules.py: 

from django.db import models 

class Reporter(models.Model): 
    first_name = models.CharField(maxlength=30) 
    last_name = models.CharField(maxlength=30) 

    class Admin: 
        pass 

    def __str__(self): 
        return "%s %s" % (self.first_name, self.last_name) 

class Article(models.Model): 
    headline = models.CharField(maxlength=100) 
    author = models.ForeignKey(Reporter) 
    body = models.TextField() 
    pub_date = models.DateField() 

    class Admin: 
        pass 

    def __str__(self): 
        return self.headline 


I received these errors: 

Traceback (most recent call last): 
  File
"/Library/Frameworks/Python.framework/Versions/Current/bin/django-admin.py",
line 5, in ? 
    management.execute_from_command_line() 
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/core/management.py",
line 1339, in execute_from_command_line 
    from django.utils import translation 
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/utils/translation/__init__.py",
line 3, in ? 
    if settings.USE_I18N: 
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/conf/__init__.py",
line 27, in __getattr__ 
    self._import_settings() 
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/conf/__init__.py",
line 52, in _import_settings 
    raise EnvironmentError, "Environment variable %s is undefined." %
ENVIRONMENT_VARIABLE 
EnvironmentError: Environment variable DJANGO_SETTINGS_MODULE is undefined. 

I'm using 0.96-pre(Trunk) Django version with mySQL 5.0.24.
-- 
View this message in context: 
http://www.nabble.com/errors-on-syncdb-tf2403140.html#a6700095
Sent from the django-users mailing list archive at Nabble.com.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to