Coder Social home page Coder Social logo

django-is-core's People

Contributors

asgeirrr avatar bobisjan avatar dependabot[bot] avatar filipsivak avatar jsmesami avatar lukasrychtecky avatar matllubos avatar mcxrd avatar ondrejskowronek avatar radimsuckr avatar rubickcz avatar sebestajozef avatar sputnikus avatar studyjan avatar vojtatranta avatar zamazaljiri avatar zzuzzy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

django-is-core's Issues

Default fallback for Pattern._get_try_kwarg

It's annoying to define all url arguments. What about a default fallback:

class XPattern:(RestPattern):

    WORD_PATTERN = re.compile('<([-\w]+)>')

    def _get_try_kwarg(self, obj):
        kwarg = super(RestPattern, self)._get_try_kwarg(obj)
        return self._try_default_kwarg(kwarg)

    def _try_default_kwarg(self, kwarg):
        for arg in self.WORD_PATTERN.findall(self.url_pattern):
            if not arg in kwarg:
                kwarg[arg] = arg
        return kwarg

403, CSRF log

Log situations like request for forbidden page and csrf attacks

Declarative MenuItem

It would be nice. if MenuItem could be more declarative e.g.:

class MyProfileMenuItem(LinkMenuItem):
    url = 'IS:profile-member'
    label = _('My profile')
    group = 'member-profile'

    def get_url_args(self, request):
        return (request.user.pk,)

Fieldset css classes

It would be nice for styling if we could add css classes to fieldset.
Now we cannot style fieldset easily, because all of them have similar classes (with-title).

Like this for example:

return ( 
    (_('Contact information'), 'my-brilliant-css-class', {
        'fields': ('contact_person', 'phone', 'bank_account_prefix', 'bank_account_number', 'bank_code')
    }),
)

Add context (menu_group and menu_subgroup) into table data attr

It's useful for processing REST responses.
e.g.:

"_rest_links": {
"api-resource-users-user": {
"url": "/users/user/api/1",
"methods": [
"PUT",
"GET",
"DELETE"
]
},
"api-users-user": {
"url": "/users/user/api",
"methods": [
"POST",
"GET"
]
}
}
When I know that context is users-user, I can programmatically go through _rest_links:
context = 'users-user'
rest_links[''api-resource' + context]['url']

Javascript validation for form

It would be nice if we could validate form right on client, without refreshing whole page.
Simple stuff like required, max length and other could be client-only more complicated like inline forms (foreign keys) would have to be done with ajax-validation with proper JSON response with errors.

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.