I install pydev and checkout last version OSQA. I import OSQA in my pydev installation and create my settings_local.py file:

DATABASE_NAME = 'osqa_pg'             # Or path to database file if using sqlite3.
DATABASE_USER = 'osqa_pg'               # Not used with sqlite3.
DATABASE_PASSWORD = 'osqa_pg'               # Not used with sqlite3.
DATABASE_ENGINE = 'postgresql_psycopg2'  #mysql, etc
DATABASE_HOST = '127.0.0.1'
DATABASE_PORT = ''

When I execute Django > Syn DB (manage.py syncdb) It returns with an error: E

rror: One or more models did not validate:
forum.action: 'node' has a relation with model Node, which has either not been installed or is abstract.
forum.user: 'subscriptions' has an m2m relation with model Node, which has either not been installed or is abstract.

Finished "/home/gse/quasutra/workspace/osqa/manage.py syncdb" execution.

Any idea to help me to eliminate this error?

asked 08 May '10, 17:44

gsempe's gravatar image

gsempe
136579
accept rate: 0%

Hey @gsempe, sorry I saw you were on the chat room but we were on a conference call and nobody took a minute to answer, sorry. Which version of django are you using?

(08 May '10, 18:53) Hernani Cerq... ♦♦

I got the same error on revision 185 running from the command line.

(09 May '10, 14:38) Rich Seller

I use django 1.1.1

(09 May '10, 14:49) gsempe

Guillaume, this will be something we can probably help with more easily in the OSQA online chat. Feel free to lurk/idle in the chatroom until one of us becomes available, and we'll do what we can to try to figure this out with you.

One thing that occurs to me is that there was an old .project file in the repo from when I initially tried using PyDev myself. I have long since switched to IntelliJ IDEA with its Python plugin, so that original Eclipse project probably has some obsolete dependencies, bad source directory references, or worse. It might be better to start from scratch if you were trying to use that one. I'll fire up Eclipse and take a peek.

link

answered 09 May '10, 09:26

rickross's gravatar image

rickross ♦♦
12.5k2914972
accept rate: 46%

edited 09 May '10, 09:27

I've had the same error running from the commandline. Going back through older versions it seems that the problem started with revision 156. Previous versions work ok.

(09 May '10, 15:07) Rich Seller

I just grabbed the latest PyDev from Aptana and made a new project with the latest SVN sources. It appears that one of the changes in the most recent PyDev is improved Django support and it made the whole thing a little easier.

Make sure you Python interpreter is properly configured with access to all your required libs/eggs, set up your settings_local.py, and then use the "Django -> Custom command" form the project context menu (I just right-click the project and select it.)

Enter "syncdb --all" and run it. Then do it again and enter "migrate forum --fake" to get the South migrations up to the current schema level, and you should be off to the races.

PS - I checked in updated .project and .pydevproject files from my working local copy. Maybe they will help.

link

answered 09 May '10, 12:53

rickross's gravatar image

rickross ♦♦
12.5k2914972
accept rate: 46%

edited 09 May '10, 12:54

I had the same issue as you running syncdb from the commandline. I found that if I checked out revision 155, then ran syncdb and migrate I could set up the database. I then checked out the latest revision and ran migrate again. I'm sure this isn't the ideal approach, but it seems to work...

To do this I ran the following commands.

Check out the 155 revision:

svn co http://svn.osqa.net/svnroot/osqa/trunk -r 155 c:\\osqa\\source

Configure database for 155 revision:

python c:\\osqa\\source\\manage.py syncdb --all
python c:\\osqa\\source\\manage.py migrate --all

Update to latest revision:

svn update c:\\osqa\\source

Migrate database to latest revision:

python c:\\osqa\\source\\manage.py migrate --all
link

answered 09 May '10, 17:47

Rich%20Seller's gravatar image

Rich Seller
1.8k154047
accept rate: 23%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×25
×13
×1

Asked: 08 May '10, 17:44

Seen: 1,227 times

Last updated: 09 May '10, 17:47

powered by OSQA