Code Monkey home page Code Monkey logo

django-vega-admin's People

Contributors

moshthepitt avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

django-vega-admin's Issues

Add FormHelper for generated search-filter form

#27 introduces a way to generate list view search forms.

However, these forms use the default FormHelper. We need to add a FormHelper class that is more specialised for search and that works with the generated form.

Add support for custom form widgets

  • date input widget
  • time input widget
  • date & time input widget
  • date picker in badmin template
  • time picker in badmin template
  • date & time picker in badmin template
  • select2 in badmin template
  • phone number field (Update 17/6/2019 - wont fix)

Allow for dynamic table actions

The action links rendered on each row should have the ability of being made dynamic.

Perhaps this can be achieved by extending render_actions_fn (or just making it configurable), maybe by making it take a function to check if action links should be rendered.

Fix get_field_value

get_field_value will throw an error is the field is not hashable. e.g. for JSON field

Suggested fix:

    def get_field_value(self, field):
        """Get the value of a field."""
        if field.is_relation:
            try:
                return str(getattr(self.object, field.name))
            except AttributeError:
                return None
        try:
            # pylint: disable=protected-access
            return self.object._get_FIELD_display(field)
        except TypeError:
            # for some reason this is not hashable
            field_value = getattr(self.object, field.attname)
            return json.dumps(field_value, cls=DjangoJSONEncoder)

NoReverseMatch when not used from the root urlconf


Request Method: | GET
-- | --
http://127.0.0.1:9000/hr/locations.location/create/
2.2.3
NoReverseMatch
Reverse for 'locations.location-list' not found. 'locations.location-list' is not a valid view function or pattern name.


Add example project

Add an example Django project that utilizes VegaCRUDView and can be run quickly to test this app.

Add custom configurable search and filter for list view

In VegaCRUDView, we need to add custom configurable search and filter for list view, such that:

  • you can define filter fields
  • OR you can supply custom filter class
  • add/configure search and filter form
  • add a nice looking template for search and filter form

Add a CRUD view

This will be some kind of meta mothership of a view that tables at least a Model and generates view to create, update and delete the model objects. It should also generate url patterns that are already hooked up!

Search form with filters issues

  • Better looking form
  • add support for date and time filters e.g. someField__year
  • show search clearance button when any field is populated

Add a table generator

The list view uses django-tables2

We need to add a way to autogenerate a TableClass for any model. The resulting table class should:

  • show all fields by default
  • allow specification of fields

Add read action

Add a read/view action as one of the default actions in VegaCRUDView

Add basic generic CRUD views

  • CreateView
  • EditView
  • ReadView
  • ListView
  • DeleteView

These should be generic class based view that should, in theory, work for any model that they are given

Add a form generator

Add a way to generate a crispy-form aware ModelForm for any provided model.

By default it should include:

  • all editable fields
  • back/cancel button
  • ability to configure crispy forms options
  • ability to provide a custom crispy forms helper

Make VegaCRUDView Configurable

  • Add ability to supply custom table for list view
  • Add ability to add custom form for create view
  • Add ability to supply custom form for update view
  • Add ability to specify fields for list view
  • Add ability to specify fields for create view
  • Add ability to specify fields for update view

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.