Closed em1le closed 5 years ago
Tested with a new environment (python-3.6.5
and django-2.2
) and it happens here too. It seems that there is a problem in crud.py
with the generic classes that inherits from a function:
def get_create_view_class(self):
return CreateView
def get_create_view(self):
CreateViewClass = self.get_create_view_class()
class OCreateView(self.mixin, CreateViewClass):
namespace = self.namespace
I've created a python-3
branch to take a look to this issue (and start migrating to django2 too). Hope @luisza can help here.
It's due last @rtubio PR #99 so I'll revert the changes and ask him for more information. Thanks for the issue @em1le
It looks like it works whenever you use it with overriden mixin - I am using it like that and I have no problems... definitely worth checking out the reason behind it.
Hello guys, Great work with this module. Is there any update on this issue?
I haven't had a long of time lately to work on this issue, but I will try to commit some time along this month. Please feel free to contribute if you have some time for it.
Release is planned for next days, stay tuned!
Is there any updated for this issue?
@hasan151623 sorry for the delay, the planned release had to be postponed... I'll try to release new version as soon as posible.
@hasan151623 and... new release is done! 😎
metaclass conflict still happen:
urlpatterns += crud_for_app('alarm_admin')
File "C:\Python36-32\lib\site-packages\cruds_adminlte\urls.py", line 100, in crud_for_app mixin=mixin) File "C:\Python36-32\lib\site-packages\cruds_adminlte\urls.py", line 50, in crud_for_model nc = NOCLASS() File "C:\Python36-32\lib\site-packages\cruds_adminlte\crud.py", line 675, in init self.initialize_create(basename + '/create.html') File "C:\Python36-32\lib\site-packages\cruds_adminlte\crud.py", line 550, in initialize_create OCreateView = self.get_create_view() File "C:\Python36-32\lib\site-packages\cruds_adminlte\crud.py", line 356, in get_create_view class OCreateView(self.mixin, CreateViewClass): TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
Django==2.1.3 django-appconf==1.0.3 django-cors-headers==2.4.0 django-crispy-forms==1.7.2 django-cruds-adminlte==0.0.16 django-filter==2.0.0 django-formtools==2.1 django-image-cropping==1.2.0 django-import-export==1.1.0 django-mama-cas==2.4.0 django-rest-swagger==2.2.0 django-reversion==3.0.1 django-select2==7.1.0 django-sphinx==2.2.4 djangoajax==3.1 djangorestframework==3.9.0 djangorestframework-jwt==1.11.0
@Jiangshan00001
metaclass conflict still happen:
seems to be working but you will need to install v 0.17 I guess
pip install -e git+git://github.com/oscarmlage/django-cruds-adminlte/@0.0.17+git.081101d#egg=django-cruds-adminlte
This issue is still happening.. any solutions?
I installed v0.17 to avoid the errors...
@clint74 when i try to install from docker through requirements.txt it is saying ModuleNotFoundError: No module named 'cruds_adminlte'
@Jiangshan00001
metaclass conflict still happen:
seems to be working but you will need to install v 0.17 I guess
pip install -e git+git://github.com/oscarmlage/django-cruds-adminlte/@0.0.17+git.081101d#egg=django-cruds-adminlte
This worked for me.
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
Trace
python version : 3.7.1
python environment
settings.py
urls.py
Comments
I followed the installation from the documentation and BAM.