matllubos / django-is-core Goto Github PK
View Code? Open in Web Editor NEWLicense: BSD 3-Clause "New" or "Revised" License
License: BSD 3-Clause "New" or "Revised" License
If pattern.allowed_methods contains upper case strings (like ISCore.allowed_methods) it doesn't not match lowercase methods.
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
Log situations like request for forbidden page and csrf attacks
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,)
In InlineFormView you can not set label to add button on model.
It's pretty annoying when you have a typo in menu item, you get KeyError instead of something like Missing IS Core or Menu item not found
I see no table columns. This should works:
class UserIsCore(UIRestModelISCore):
list_display = ('first_name', 'last_name')
model = User
site.register(UserIsCore)
When a non existing field is defined in RestMeta.default_detailed_fields, the API returns null. Warning or error would be expected
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')
}),
)
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']
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.