Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create "setup db" command #97

Open
jMyles opened this issue Nov 5, 2012 · 2 comments
Open

Create "setup db" command #97

jMyles opened this issue Nov 5, 2012 · 2 comments

Comments

@jMyles
Copy link
Member

jMyles commented Nov 5, 2012

We need to have a single command that goes from nothing to a complete sqlite3 db. It needs to:

  • syncdb
  • migrate
  • from various configs and factories required for basic WHAT operations
@jMyles
Copy link
Member Author

jMyles commented Nov 22, 2012

This is going pretty well - see https://github.com/SlashRoot/WHAT/blob/apps-refactor/deployment/setup_db.py.

The current problem is on the resolve_calls page:

FixedObject matching query does not exist. Lookup parameters were {'name': 'RoleInGroup__slashroot_holder'}

@jMyles
Copy link
Member Author

jMyles commented Nov 24, 2012

The actual problem here, arguably, is that the various 'slashroot people' concepts are in people.config.set_up instead of slashroot.config.set_up. To wit:

def set_up():
    #User
    HOLDER = Role.objects.get_or_create(name="Holder")[0]
    SLASHROOT = Group.objects.get_or_create(name="slashRoot")[0]
    SLASHROOT_HOLDER = RoleInGroup.objects.get_or_create(role=HOLDER, group=SLASHROOT)[0]

    FixedObject.objects.create(name="Role__holder", object=HOLDER, )
    FixedObject.objects.create(name="Group__slashRoot", object=SLASHROOT, )
    FixedObject.objects.create(name="RoleInGroup__slashroot_holder", object=SLASHROOT_HOLDER, )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant