look out please, what's wrong? on localhost its okay, but there's django 1.4.1
18:14 ~/rssDj/rssReader $ python2.7 rssReader.py > log
Traceback (most recent call last):
File "rssReader.py", line 20, in <module>
import models
File "/home/kernie_xvid/rssDj/rssDjApp/models.py", line 3, in <module>
class FreqWord(models.Model):
File "/usr/local/lib/python2.7/site-packages/Django-1.3.3-py2.7.egg/django/db/models/base.py", line
52, in __new__
kwargs = {"app_label": model_module.__name__.split('.')[-2]}
IndexError: list index out of range
**models:**
from django.db import models
class FreqWord(models.Model):
word = models.CharField(max_length=64)
freq = models.IntegerField()
wordId = models.CharField(max_length=64)
checkDate = models.DateTimeField()
def __unicode__(self):
return self.word
class PrimaryData(models.Model):
date = models.DateTimeField()
title = models.TextField()
text = models.TextField()
url = models.TextField()
def __unicode__(self):
return self.title
class WordIds(models.Model):
word = models.CharField(max_length=64)
wordId = models.CharField(max_length=64)
def __unicode__(self):
return self.word
*rssReader ( script)***:
!/usr/bin/env python
# -*- coding: utf-8 -*-
import feedparser
import re
import datetime
import sys
import os
import re
import xlwt
import operator
import hashlib
sys.path.append('/home/kernie_xvid/')
sys.path.append('/home/kernie_xvid/rssDj')
sys.path.append('/home/kernie_xvid/rssDj/rssDjApp')
os.environ['DJANGO_SETTINGS_MODULE'] = 'rssDj.settings'
import models
from django.utils.timezone import *
################################################################################
class RssReader(object):
...........