1. 01 Sep, 2014 4 commits
    • Alex Pyrgiotis's avatar
      admin: Remove unused imports · 95692332
      Alex Pyrgiotis authored
    • Alex Pyrgiotis's avatar
      admin: Unify filters · 6f477b9b
      Alex Pyrgiotis authored
      Unify filters for a model field. Each table view has a list of filters,
      one for each associated model. Every filter by default receives a list
      of keywords and filters the respective model using a predefined set of
      The user can override the default fields and define its own using the
      operator "=".
      For example, in a User filter, the query "John" will search by default
      in the following fields: first_name, last_name, uuid. On the other hand,
      the query "first_name=John" will search only in the field specified at
      the left of the "=" operator.
      Fix apyrgio/synnefo#179
    • Alex Pyrgiotis's avatar
      admin: Fix ID filters · 2962188b
      Alex Pyrgiotis authored
      Fix bugs in filters due to earlier (0.5.3-3) django-filter version.
      The main issue was that django-filter could not handle inherited fields.
      Fix apyrgio/synnefo#202
    • Alex Pyrgiotis's avatar
      admin: Refactor code structure · 10197fdb
      Alex Pyrgiotis authored
      The current code structure was leading to circular imports of the files
      that are responsible for each entity. To solve this, we must break each
      of those files to smaller pieces.
      The pieces that each of the files are broken into are:
      * views: The functions that implement the views for each entity.
      * actions: The functions that have to do with the actions on each
      * filters: The functions that have to do with filtering.
      * utils: Auxiliary functions.
      With the new structure, the users' views can import the vms' actions and
      the vms' views can import the users' actions without worrying about
      circular imports.