jp74 / django-model-publisher Goto Github PK
View Code? Open in Web Editor NEWHandy mixin/abstract class for providing a "publisher workflow" to arbitrary Django models.
License: BSD 3-Clause "New" or "Revised" License
Handy mixin/abstract class for providing a "publisher workflow" to arbitrary Django models.
License: BSD 3-Clause "New" or "Revised" License
Got this error on publish view:
No ct_id parameter, unable to find admin subclass for path 'publish/1/'.
My order at inherit's it's : PublisherAdmin, TranslatableAdmin
Whatever, when changing the order to : TranslatableAdmin, PublisherAdmin
here are missing the buttons from publisher
package
jakubnowak@MBP-Jakub:website $ pip install django-model-publisher
Downloading/unpacking django-model-publisher
Could not find any downloads that satisfy the requirement django-model-publisher
Cleaning up...
No distributions at all found for django-model-publisher
Storing debug log for failure in /var/folders/hl/gvnsh9c17rjc3tylvp079nq80000gn/T/tmpOnGDoU
/usr/local/bin/pip run on Mon Jan 12 19:13:35 2015
Downloading/unpacking django-model-publisher
Getting page https://pypi.python.org/simple/django-model-publisher/
URLs to search for versions for django-model-publisher:
* https://pypi.python.org/simple/django-model-publisher/
Analyzing links from page https://pypi.python.org/simple/django-model-publisher/
Could not find any downloads that satisfy the requirement django-model-publisher
Cleaning up...
Removing temporary dir /private/var/folders/hl/gvnsh9c17rjc3tylvp079nq80000gn/T/pip_build_jakubnowak...
No distributions at all found for django-model-publisher
Exception information:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/commands/install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 1177, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/index.py", line 277, in find_requirement
raise DistributionNotFound('No distributions at all found for %s' % req)
DistributionNotFound: No distributions at all found for django-model-publisher
Django 1.7 has as_manager()
now which does the same thing as PassThroughManager
. For PassThroughManagerMixin
, I think people can use PublisherManager.from_queryset(...)()
instead.
Alternatively, you will need to pin to django-model-utils<2.4
, which doesn't have Django 1.9 compatibility.
It's happening everytime when i try assert or print
some function at SomeClassAdmin.__init__()
ERROR Internal Server Error: /en/admin/news/news/18/
Traceback (most recent call last):
File "/home/user/.virtualenvs/projects/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in get_response
response = middleware_method(request, response)
File "/home/user/.virtualenvs/projects/local/lib/python2.7/site-packages/publisher/middleware.py", line 18, in process_response
del PublisherMiddleware._draft_status[current_thread()]
KeyError: <Thread(Thread-1, started 139973582857984)>
Hey there,
I'm trying to integrate django-model-publisher within a django 1.6.x app with django parler 1.0 (runs as a django-cms 3.x app). My Model looks something like this:
class Article(PublisherModel, TranslatableModel):
translations = TranslatedFields(
title = models.CharField(_('Title'),
max_length=256
),
content = HTMLField(_('Inhalt'),
blank=True
)
)
pub_date = models.DateTimeField(
default = datetime.datetime.now,
blank=False)
while my admin looks like this:
class NewsAdmin(TranslatableAdmin, PublisherAdmin):
list_display = ['title']
admin.site.register(Article, NewsAdmin)
When I try to save a model, it throws an error about the QuerySet....
Exception Type: ImproperlyConfigured at /de/admin/news/article/
Exception Value: PublisherQuerySet class does not inherit from TranslatableQuerySet
... and since I'm pretty new to django I don't really have a clue whats going on :)
Am I doing something completely wrong here? Could someone please point me in the right direction on how to integrate the model-publisher together with django-parler ?
Thanks
Steffen
Hey @leesolway, @jake74
Can anyone upload new version (master branch) on pypi or grant me permission (nickname on pypi: bashu) to do it myself.
Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Users/bashu/Projects/django-sigma-cms-demo/virtualenv/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
utility.execute()
File "/Users/bashu/Projects/django-sigma-cms-demo/virtualenv/lib/python2.7/site-packages/django/core/management/__init__.py", line 312, in execute
django.setup()
File "/Users/bashu/Projects/django-sigma-cms-demo/virtualenv/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/Users/bashu/Projects/django-sigma-cms-demo/virtualenv/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/Users/bashu/Projects/django-sigma-cms-demo/virtualenv/lib/python2.7/site-packages/django/apps/config.py", line 112, in create
mod = import_module(mod_path)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/Users/bashu/Projects/django-sigma-cms-demo/djangoapp/sigmacms/apps.py", line 8, in <module>
from fluent_pages.extensions import page_type_pool
File "/Users/bashu/Projects/django-sigma-cms-demo/virtualenv/src/django-fluent-pages/fluent_pages/extensions/__init__.py", line 11, in <module>
from .pagetypebase import PageTypePlugin
File "/Users/bashu/Projects/django-sigma-cms-demo/virtualenv/src/django-fluent-pages/fluent_pages/extensions/pagetypebase.py", line 18, in <module>
from fluent_pages.adminui import PageAdmin
File "/Users/bashu/Projects/django-sigma-cms-demo/virtualenv/src/django-fluent-pages/fluent_pages/adminui/__init__.py", line 14, in <module>
from .overrides import PageParentAdmin, PageChildAdmin, PageAdmin
File "/Users/bashu/Projects/django-sigma-cms-demo/virtualenv/src/django-fluent-pages/fluent_pages/adminui/overrides.py", line 11, in <module>
PageParentAdmin = type("PageParentAdmin", (import_settings_class('FLUENT_PAGES_PARENT_ADMIN_MIXIN'), DefaultPageParentAdmin), {})
File "/Users/bashu/Projects/django-sigma-cms-demo/virtualenv/src/django-fluent-utils/fluent_utils/load.py", line 23, in import_settings_class
return import_class(config_value, setting_name)
File "/Users/bashu/Projects/django-sigma-cms-demo/virtualenv/src/django-fluent-utils/fluent_utils/load.py", line 33, in import_class
mod = _import_module(mod_name, classnames=(class_name,))
File "/Users/bashu/Projects/django-sigma-cms-demo/virtualenv/src/django-fluent-utils/fluent_utils/load.py", line 67, in _import_module
return __import__(module_label, fromlist=classnames)
File "/Users/bashu/Projects/django-sigma-cms-demo/djangoapp/sigmacms/integration/admin.py", line 9, in <module>
from publisher.admin import PublisherAdmin as PublisherAdminBase
File "/Users/bashu/Projects/django-sigma-cms-demo/virtualenv/lib/python2.7/site-packages/publisher/admin.py", line 19, in <module>
make_published.short_description = _('Publish')
File "/Users/bashu/Projects/django-sigma-cms-demo/virtualenv/lib/python2.7/site-packages/django/utils/translation/__init__.py", line 84, in ugettext
return _trans.ugettext(message)
File "/Users/bashu/Projects/django-sigma-cms-demo/virtualenv/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 323, in ugettext
return do_translate(message, 'ugettext')
File "/Users/bashu/Projects/django-sigma-cms-demo/virtualenv/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 300, in do_translate
_default = _default or translation(settings.LANGUAGE_CODE)
File "/Users/bashu/Projects/django-sigma-cms-demo/virtualenv/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 206, in translation
_translations[language] = DjangoTranslation(language)
File "/Users/bashu/Projects/django-sigma-cms-demo/virtualenv/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 116, in __init__
self._add_installed_apps_translations()
File "/Users/bashu/Projects/django-sigma-cms-demo/virtualenv/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 164, in _add_installed_apps_translations
"The translation infrastructure cannot be initialized before the "
django.core.exceptions.AppRegistryNotReady: The translation infrastructure cannot be initialized before the apps registry is ready. Check that you don't make non-lazy gettext calls at import time.```
It seems that this project is not alive, isn't it?
If django-model-publisher
doesn't absolutely require version 2.0.3 of django-model-utils
, the version spec should be removed or at least changed to >=2.0.3
instead of ==2.0.3
. I'm trying to use model-django-publisher
in a project that also uses django-model-utils
and I'd like to be able to use a more recent version in my project, and this is causing version conflicts.
Likewise, is wheel==0.23.0
absolutely required, or is it even required at all? It might be needed when creating a package for PyPI, but probably isn't necessary to run the package when installed from PyPI?
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.