oscarmlage / django-cruds-adminlte Goto Github PK
View Code? Open in Web Editor NEWdjango-cruds is simple drop-in django app that creates CRUD for faster prototyping
License: BSD 3-Clause "New" or "Revised" License
django-cruds is simple drop-in django app that creates CRUD for faster prototyping
License: BSD 3-Clause "New" or "Revised" License
Now, if we want to add a crud for a couple of apps we have to add the code:
urlpatterns += crud_for_app('app_one')
urlpatterns += crud_for_app('app_two')
And the urls generated are:
Would be nice to have all that urls "inside" a common url, I mean something like:
And would be really nice also to have any kind of dashboard: #33
New widgets are not keeping the old database values, probably something related to the get_context() and "value".
I found this error when i use django 2.0
File "/Users/newbie/virtualenvs/adminlte/lib/python3.6/site-packages/django/utils/autoreload.py", line 225, in wrapper
fn(*args, **kwargs)
File "/Users/newbie/virtualenvs/adminlte/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 120, in inner_run
self.check(display_num_errors=True)
File "/Users/newbie/virtualenvs/adminlte/lib/python3.6/site-packages/django/core/management/base.py", line 364, in check
include_deployment_checks=include_deployment_checks,
File "/Users/newbie/virtualenvs/adminlte/lib/python3.6/site-packages/django/core/management/base.py", line 351, in _run_checks
return checks.run_checks(**kwargs)
File "/Users/newbie/virtualenvs/adminlte/lib/python3.6/site-packages/django/core/checks/registry.py", line 73, in run_checks
new_errors = check(app_configs=app_configs)
File "/Users/newbie/virtualenvs/adminlte/lib/python3.6/site-packages/django/core/checks/urls.py", line 40, in check_url_namespaces_unique
all_namespaces = _load_all_namespaces(resolver)
File "/Users/newbie/virtualenvs/adminlte/lib/python3.6/site-packages/django/core/checks/urls.py", line 57, in _load_all_namespaces
url_patterns = getattr(resolver, 'url_patterns', [])
File "/Users/newbie/virtualenvs/adminlte/lib/python3.6/site-packages/django/utils/functional.py", line 36, in get
res = instance.dict[self.name] = self.func(instance)
File "/Users/newbie/virtualenvs/adminlte/lib/python3.6/site-packages/django/urls/resolvers.py", line 536, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/Users/newbie/virtualenvs/adminlte/lib/python3.6/site-packages/django/utils/functional.py", line 36, in get
res = instance.dict[self.name] = self.func(instance)
File "/Users/newbie/virtualenvs/adminlte/lib/python3.6/site-packages/django/urls/resolvers.py", line 529, in urlconf_module
return import_module(self.urlconf_name)
File "/Users/newbie/virtualenvs/adminlte/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 994, in _gcd_import
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 665, in _load_unlocked
File "", line 678, in exec_module
File "", line 219, in _call_with_frames_removed
File "/Users/newbie/Documents/seit/django-cruds-adminlte/demo/demo/urls.py", line 22, in
from testapp.views import AutorCRUD, InvoiceCRUD, IndexView, CustomerCRUD, LineCRUD, AddressCRUD
File "/Users/newbie/Documents/seit/django-cruds-adminlte/demo/testapp/views.py", line 6, in
from cruds_adminlte.inline_crud import InlineAjaxCRUD
File "/Users/newbie/Documents/seit/django-cruds-adminlte/cruds_adminlte/inline_crud.py", line 16, in
from cruds_adminlte.templatetags.crud_tags import crud_inline_url
File "/Users/newbie/Documents/seit/django-cruds-adminlte/cruds_adminlte/templatetags/crud_tags.py", line 31, in
@register_tag
NameError: name 'register_tag' is not defined
it is possible to filter by an object inside a Foreign Key, for example Field.Level
Are you willing to take corrections and updates to the 'motivation' section of the README? If so, I'll submit some. e.g. in django.contrib.admin you can easily place fields alongside each other - see https://docs.djangoproject.com/en/1.11/ref/contrib/admin/#django.contrib.admin.ModelAdmin.fieldsets
There are also many 3rd party packages that extend the django.contrib.admin to provide the features you have here out-of-the box.
This kind of thing will be helpful to people who want to assess whether to go with django-cruds-adminlte, or whether to stick with the stock Django admin.
Work in a Inline AJAX feature (like the django builtin admin)
hello,
how can i make create and update view available for specific users only? I really don't understand how adding permission to a model's metadata works.
Add documentation for the Inlines feature
The package django-cruds-adminlte==0.0.4 is before than 4a64ca0 so create template has {% extendstemplate_father %} so create view don't work.
It is possible to translate button and title labels into other languages
Hi, I fixed pip package in one PR so now templates are included in installer, so I think it's a good idea release a new package.
it is possible to generate a url for a model, for example to list the docoments of a client, or to create more views, part of creating, listing, deleting, etc. as for example approve_
Thank you
Columns that are not model fields can be added to the list.
For example, a property that takes out an average of a field from a foreingkey.
Hello.
Small question about your admin package: is package ready to use in Django 2.0?
Thanks.
Pagination is not working, in fact, has to be done.
Hello,
Let me preface this by saying that I'm relatively new to web development & Django. I'm not sure but I presume the menu sidebar should generate buttons for all my models. I think this behaviour should just work out of the box after installation based on this bit of code from the default sidebar.html:
{% for model in models %}
<li>
<a href="{% url model.url %}">
<i class="fa fa-dashboard"></i> <span>{{ model.plural }}</span>
</a>
</li>
{% endfor %}
Needless to say, it doesn't do anything and for the life of me, I can't seem to figure out why.
My project follows this template.
If you guys can point me in the right direction I would really appreciate it.
Thank you!
Implement input-mask widget.
Django Admin has filters for the listings, something like:
list_filter = ('provider', 'date', 'paid', 'registered')
list_filter = (('date', DateRangeFilter),
('customer', admin.RelatedOnlyFieldListFilter),)
is converted in something like:
I've not thought about how it could be done in a simple way, maybe something similar to widgets:
('date', DateFilter)
, ('customer', RelatedFilter)
('status', BoolFilter)
...date <= request.input
, customer.pk=request.input
, status = True/False
...Brainstorming mode is open :)
Neat package! Thank you!
I'll try to help with bugs reporting and fixes. Here is my first batch. During installation with git clone
I got the following:
HISTORY.rst'
file.https://github.com/oscarmlage/django-cruds/blob/master/setup.py#L24
django-cruds
requires django-compressor
package:https://github.com/oscarmlage/django-cruds/blob/master/cruds/templates/cruds/base.html#L5
I guess this need to be added to the installation docs.
pip install django-cruds
installs a different repo at https://github.com/bmihelac/django-crudsIs there a way to change the name of this package to django-cruds2
for example?
Everyone, including me expects to have a list of all models of an app inside its main url. For example if I have an app named testapp and it has models named test1, test2, test3 I have to be able to see all of these models under the 127.0.0.1:8000/testapp url.
If I have a related field then User should be able to create new instance of that related model directly from the form of the model that it is related to.
When I have filters with relationships to other models, the debug show:
.../cruds_adminlte/utils.py", line 86, in get_related_class_field
return objfield.rel.model
AttributeError: 'ForeignKey' object has no attribute 'rel'
The function rel
have been changed to remote_field
, and that return can change to:
return objfield.rel.model if hasattr(objfield, 'rel') else objfield.remote_field.model
Related to #32, would be really nice also to have any kind of dashboard loading in the main url:
The dashboard could load a default template and it can be overwritten for every project.
Roadmap:
Hi,
I am trying to create a demo site based in your documentation but I haven't good results
see https://github.com/luisza/django-cruds-adminlte/tree/demo (demo branch in my fork).
I put a requirements.txt file to simplify installations of dependencies.
I get to work code as expected, but presentation is not good, widgets are not showing as expected.
Take a look to http://localhost:8000/testapp/customer/new/
Add bootstrap modals for inlines actions (add, edit, delete) instead of add the forms directly in the same page (cleaner).
Hi, It's possible to make a new release of this software.
So I think new release is important.
Improve demo site with more complex samples and documentation.
Version 0.0.9 is not compatible with Django 2.0.2?
What is the correct version to work with Django 2.0.2.
Thanks
We should research some way to implement a search feature
On the CRUDVIEW doesn't support for collapse and expand data from related table
In documents docs/components.rst
:
to overwrite my own form, I need to give form_class
and model
, but I don't find any words about CRUDCreateView
as used in this docs.
I've tried MyCRUDView.get_create_view().as_view(model=XX, form_class=XXX)
, but template name NoneType error shows up.
hi, when i try updating an object with foreign keys, i only get a drop down option for related foreign key objects but i can't edit the actually foreign key object. is it possible to update foreign key object like we have in django admin?
thanks in advance.
Integrate Django messages framework in the cruds-adminlte
Need to add tests to crud.py
Is it possible to have two urls for a list with different html templates, for example to have one with different actions to the other?
Thank you so much
in the lists, the fields of a foreign key, are shown as a link to an update form, it is possible that those links will not die or do so with a detail form.
Thank you
In Auth/Users or Auth/Groups the debug show that:
django/core/paginator.py:112: UnorderedObjectListWarning: Pagination may yield inconsistent results with an unordered object_list: <QuerySet []> UnorderedObjectListWarning
Auth/Users: auth_user_list
Auth/Groups: auth_group_list
hello,
thanks for this wonderful app, it saved me a lot time.
I have a model with an imageField, i would like to display the actual image but instead i get the name of the image in both the list and detail view and only when the name is clicked can i see the image. please how can i make the image display in both list and detail view?
Developer should be able to mark a field as a readonly field. It would be nice to get some ipmortant settings like readonly fields from admin.py files.
Is it possible to create a custom template for a list view and add actions?
Would be nice to have some kind of auth for the cruds. And would be even prettier to be able to CRUD users, groups and permissions like the django built-in admin does.
It is possible to work with a model, but not with all the data. For example, define the view as follows
class vExamen2 (CRUDView):
model = Exam.objects.filter (id = 1)
Organize documentation in rst files instead of a big README
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.