GithubHelp home page GithubHelp logo

oscarmlage / django-cruds-adminlte Goto Github PK

View Code? Open in Web Editor NEW
424.0 424.0 81.0 6.37 MB

django-cruds is simple drop-in django app that creates CRUD for faster prototyping

License: BSD 3-Clause "New" or "Revised" License

Python 21.38% CSS 27.20% JavaScript 37.41% HTML 14.00%
admin adminlte2 cruds django django-admin responsive

django-cruds-adminlte's People

Contributors

alegambo avatar justelex avatar luisza avatar mbourqui avatar migue56 avatar miguelmendez17 avatar oscarmlage avatar poipoii avatar rtubio avatar telenieko avatar thierrybb avatar

Stargazers

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

Watchers

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

django-cruds-adminlte's Issues

error when add new costumer

I found error when I try to add (create) new costumer
this the error message

IntegrityError at /lte/testapp/customer/create
(1048, "Column 'time' cannot be null")

screen shot 2018-02-23 at 16 05 15

Suppor for columns

Would be nice to have support for columns in the lists page ( for images, icons for boolean types...). In a perfect world, would be awesome if the user can override this columns with custom html.

NameError: name 'register_tag' is not defined using Django 2.0

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

Filter

it is possible to filter by an object inside a Foreign Key, for example Field.Level

Corrections/updates to the README

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.

Inline AJAX

Work in a Inline AJAX feature (like the django builtin admin)

Translate

It is possible to translate button and title labels into other languages

Update pip package

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.

ULRs

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

List

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.

Sidebar models not loading

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!

Filters

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:

image

I've not thought about how it could be done in a simple way, maybe something similar to widgets:

  1. Declare the filter field and type, i.e.: ('date', DateFilter), ('customer', RelatedFilter) ('status', BoolFilter)...
  2. Define the action for every kind of filter: date <= request.input, customer.pk=request.input, status = True/False...
  3. Define how to paint the widget of every filter (date selector, just a link, dropdown select...)

Brainstorming mode is open :)

Installation bug

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:

  1. missing HISTORY.rst' file.

https://github.com/oscarmlage/django-cruds/blob/master/setup.py#L24

  1. The 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.

  1. Using pip install django-cruds installs a different repo at https://github.com/bmihelac/django-cruds

Is there a way to change the name of this package to django-cruds2 for example?

Create url and view for listing of all models of an app

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.

Django 2.0:: 'ForeignKey' object has no attribute 'rel'

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

Fix the select2 width

It seems that the select2 width is fixed, it doesn't get wider or narrower if we resize the screen. Even it's not nice in the responsive versions:

image

New release

Hi, It's possible to make a new release of this software.

  • There is 2 pull request than have impact in the software (django 2.0 support) and bux fixed in filter.
  • Actual package is break in python 3 (but master is ok).

So I think new release is important.

Django 2.0.2

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

Where CRUDCreateView come from in docs

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.

update foreign key object

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.

URL & Acctions

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

Link

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

Pagination may yield inconsistent results

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

displays link to image instead of the actually image itself.

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?

Proper Rendering for Readonly Fields.

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.

List View

Is it possible to create a custom template for a list view and add actions?

Inline errors are not properly formated

When you have errors in the inline form, they're not properly formatted in the modal window. If I press the "submit" button with the mandatory fields empty:

image

Instead of put the errors there in the modal, they're being shown under the modal-backdrop in the main form (at the bottom):

image

Limit model instances available to CRUD View

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)

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.