thanks a lot :))
i fixed by changing myapp to the name of my application but i still have error
when i try to run server by this commend: python manage.py runserver
i got this error in the terminal:
python manage.py runserver
Validating models...
Unhandled exception in thread started by <bound method
Command.inner_run of
<django.contrib.staticfiles.management.commands.runserver.Command
object at 0x9b6a96c>>
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/runserver.py",
line 91, in inner_run
self.validate(display_num_errors=True)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py",
line 266, in validate
num_errors = get_validation_errors(s, app)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/validation.py",
line 30, in get_validation_errors
for (app_name, error) in get_app_errors().items():
File "/usr/local/lib/python2.7/dist-packages/django/db/models/loading.py",
line 158, in get_app_errors
self._populate()
File "/usr/local/lib/python2.7/dist-packages/django/db/models/loading.py",
line 67, in _populate
self.load_app(app_name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/loading.py",
line 88, in load_app
models = import_module('.models', app_name)
File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py",
line 35, in import_module
__import__(name)
File "/home/inesso/tstp_pr/firstpr/hiworld/models.py", line 1, in <module>
from tastypie.utils.timezone import now
ImportError: No module named timezone
and this my file : models.py
from tastypie.utils.timezone import now
from django.contrib.auth.models import User
from django.db import models
from django.template.defaultfilters import slugify
class Entry(models.Model):
user = models.ForeignKey(User)
pub_date = models.DateTimeField(default=now)
title = models.CharField(max_length=200)
slug = models.SlugField()
body = models.TextField()
def __unicode__(self):
return self.title
def save(self, *args, **kwargs):
# For automatic slug generation.
if not self.slug:
self.slug = slugify(self.title)[:50]
return super(Entry, self).save(*args, **kwargs)
please help me !!
2012/5/22, johnoc <
joh...@gmail.com>: