#8182 Improve category management screens

v1.8.1
closed
None
Admin
2018-03-14
2018-02-01
No

Adding a new top-level trove via the admin UI causes Project Admin->Categorization to break.

The current admin also doesn't allow identical names in another (unrelated) trove -- add a field to override the auto-generated shortname, and improve shortname generation to allow for more friendly URLs.

Discussion

  • Kenton Taylor - 2018-02-01
    • status: in-progress --> review
     
  • Kenton Taylor - 2018-02-01

    kt/8182

     
  • Dave Brondsema

    Dave Brondsema - 2018-02-02
    • status: review --> in-progress
     
  • Dave Brondsema

    Dave Brondsema - 2018-02-02
    • the slugify function allows periods, is that ok? It's different from what trove shortnames currently allow, but it probably is ok? A few test cases for it should be added, and its docstring should be updated.
    • AddTroveCategoryForm.display() has a few commented out lines
    • I'd probably put the Name column before Shortname column, in the listings table, but that's a small personal preference.
    • adding a category with unicode in the name gets an error on redirect('/categories/{}/?categoryname={}&shortname={}'.format(upper.trove_cat_id, name, shortname)) When using format strings u'...' is needed. It is unfortunately not magical like %s strings which upgrade to unicode automatically when the params are unicode.
    • new top-level troves no longer cause the project admin page to break immediately, but they do show up there and can't be saved. Might need a config option to control which categories are used there. Can go alongside trovecategories.admin.* ini settings.
     
  • Kenton Taylor - 2018-02-02

    Good feedback, commit pushed:
    Made period optional, along with general cleanup + tests
    Fixed
    Agred, changed
    Fixed
    * Fixed by ensuring project model can accept those troves, rather than via config.

     

    Last edit: Kenton Taylor 2018-02-02
  • Dave Brondsema

    Dave Brondsema - 2018-02-02
    • status: in-progress --> closed
    • Reviewer: Dave Brondsema
     
  • Kenton Taylor - 2018-03-14
    • Milestone: unreleased --> v1.8.1
     

Log in to post a comment.