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

"sitetree_resync_apps" command works incorrectly #135

Closed
voronind opened this issue Sep 28, 2014 · 5 comments
Closed

"sitetree_resync_apps" command works incorrectly #135

voronind opened this issue Sep 28, 2014 · 5 comments
Labels

Comments

@voronind
Copy link
Contributor

Command 'sitetree_resync_apps' creates incorrect site tree after second using.
New tree contains old items and incorrect links in admin.

It's OK if I delete tree from Django admin and run 'sitetree_resync_apps' after it.

Python 3, Django 1.7, sqlite3 db.

@idlesign
Copy link
Owner

Thank you for the report.
Would you mind to elaborate on what's "incorrect" precisely? Just some examples.

@voronind
Copy link
Contributor Author

I made some experiments. It's Django 1.7 special. Django creates new objects instead of editing.

@voronind
Copy link
Contributor Author

voronind commented Oct 1, 2014

sitetrees = (
    tree('genres', items=[
        item('Pop', '/pop', url_as_pattern=False),
        item('Rock', '/rock', url_as_pattern=False),
    ])

There are 2 identical test projects with identical environment except Django version.
After manage.py sitetree_resync_apps second run

  • in Django 1.6 we have /admin/sitetree/tree/1/ tree URL with /admin/sitetree/tree/1/item_1/ and /admin/sitetree/tree/1/item_2/ items.
  • in Django 1.7 we have /admin/sitetree/tree/2/ tree with /admin/sitetree/tree/1/item_3/ and /admin/sitetree/tree/1/item_4/ items. Paths to items doesn't works cause objects doesn't exist unless dev server restart or SiteTree.cache_save() disabling.

@idlesign
Copy link
Owner

Seems to be fixed in master.

@idlesign
Copy link
Owner

idlesign commented Oct 4, 2015

Considered closed. Feel free to reopen is not fixed.

@idlesign idlesign closed this as completed Oct 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants