GithubHelp home page GithubHelp logo

krischer / django-plugins Goto Github PK

View Code? Open in Web Editor NEW
37.0 37.0 33.0 134 KB

A Simple Plugin Framework for Django

Home Page: http://pypi.python.org/pypi/django-plugins

License: GNU Lesser General Public License v3.0

Python 96.12% Makefile 0.76% HTML 3.12%

django-plugins's People

Contributors

albertas avatar krischer avatar lfalvarez avatar sirex avatar tfroehlich82 avatar veryhappythings 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

Watchers

 avatar  avatar  avatar  avatar

django-plugins's Issues

Example project doesn't work with Django 1.8

The eample-project does not run with Django 1.8.
"ImproperlyConfigured at /
Creating a ModelForm without either the 'fields' attribute or the 'exclude' attribute is prohibited; form ContentForm needs updating."

Error on makemigrations: Couldn't construct m2m field [DJANGO 1.7]

I'm following the tutorial of Django-Plugins but I cannot get the migration to the DB to work.

Each time I migrate the model python manage.py makemigrations MyApp

Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/django/db/migrations/state.py", line 193, in from_model
    fields.append((name, field_class(*args, **kwargs)))
TypeError: __init__() missing 1 required positional argument: 'point'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.4/dist-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.4/dist-packages/django/core/management/__init__.py", line 377, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.4/dist-packages/django/core/management/base.py", line 288, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/local/lib/python3.4/dist-packages/django/core/management/base.py", line 338, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.4/dist-packages/django/core/management/commands/makemigrations.py", line 90, in handle
    ProjectState.from_apps(apps),
  File "/usr/local/lib/python3.4/dist-packages/django/db/migrations/state.py", line 108, in from_apps
    model_state = ModelState.from_model(model)
  File "/usr/local/lib/python3.4/dist-packages/django/db/migrations/state.py", line 198, in from_model
    e,
TypeError: Couldn't reconstruct m2m field plugins on MyModel: __init__() missing 1 required positional argument: 'point'

How can I solve this problem?

Thanks

django-celery + django-plugins error during migrate

Hi,

I make my project based on https://github.com/pydanny/cookiecutter-django and I added django-plugins to manage some part of my app.

However after adding djangoplugins in my INSTALLED_APPS if I execute manage.py migrate I got this error:

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/home/vagrant/.virtualenvs/vagrant/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
    utility.execute()
  File "/home/vagrant/.virtualenvs/vagrant/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 346, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/vagrant/.virtualenvs/vagrant/local/lib/python2.7/site-packages/django/core/management/base.py", line 394, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/vagrant/.virtualenvs/vagrant/local/lib/python2.7/site-packages/django/core/management/base.py", line 445, in execute
    output = self.handle(*args, **options)
  File "/home/vagrant/.virtualenvs/vagrant/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 226, in handle
    emit_post_migrate_signal(created_models, self.verbosity, self.interactive, connection.alias)
  File "/home/vagrant/.virtualenvs/vagrant/local/lib/python2.7/site-packages/django/core/management/sql.py", line 288, in emit_post_migrate_signal
    db=db)
  File "/home/vagrant/.virtualenvs/vagrant/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py", line 189, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/home/vagrant/.virtualenvs/vagrant/local/lib/python2.7/site-packages/djangoplugins/management/__init__.py", line 8, in sync_plugins
    SyncPlugins(False, verbosity).all()
  File "/home/vagrant/.virtualenvs/vagrant/local/lib/python2.7/site-packages/djangoplugins/management/commands/syncplugins.py", line 39, in __init__
    load_plugins()
  File "/home/vagrant/.virtualenvs/vagrant/local/lib/python2.7/site-packages/djangoplugins/utils.py", line 51, in load_plugins
    mod = import_module(app)
  File "/home/vagrant/.virtualenvs/vagrant/local/lib/python2.7/site-packages/django/utils/importlib.py", line 45, in import_module
    __import__(name)
ImportError: No module named CeleryConfig

In my settings I import Celery with:
INSTALLED_APPS += ('myapp.taskapp.celery.CeleryConfig',)

and celery.py is like:

from __future__ import absolute_import
import os
from celery import Celery
from django.apps import AppConfig
from django.conf import settings


if not settings.configured:
    # set the default Django settings module for the 'celery' program.
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local")  # pragma: no cover


app = Celery('myapp')


class CeleryConfig(AppConfig):
    name = 'myapp.taskapp'
    verbose_name = 'Celery Config'

    def ready(self):
        # Using a string here means the worker will not have to
        # pickle the object when using Windows.
        app.config_from_object('django.conf:settings')
        app.autodiscover_tasks(lambda: settings.INSTALLED_APPS, force=True)

        if hasattr(settings, 'RAVEN_CONFIG'):
            # Celery signal registration
            from raven import Client
            from raven.contrib.celery import register_signal
            client = Client(dsn=settings.RAVEN_CONFIG['DSN'])
            register_signal(client)

Do you have an idea of what could happen ?

My assumption is the sync command is the origin of the issue but I don't know how to fixed it and why it happen.

Cheers!

Django 1.9 PluginField migrate error

Hi
I've been trying to use django-plugins to help me writing an extendible tournament management site. but I've run into an issue trying to use the migrate command in django.

When I add a "PluginField" to my model and try to create a migration I get the following error "ValueError: ModelState.fields cannot refer to a model class - "game_plugin.to" does. Use a string reference instead."

I've currently setup 1 pluginpoint and 2 derived plugins

You can find my work here: https://github.com/Quildra/GvsC_EP/

Install through code

Hi,
I'm developing an app using your plugin system, and I have a question.

There is a way to force to install a new plugin without restart the application?
I put the files in the correct folder, and call syncplugins command, but anything happens.

Can you help me? thanks

Can some one explain how this works? Need it for askbot

I would like to integrate this with askbot.

So, that I wouldn't have to do modify code much every time askbot is updated.

The problem is the docs are kinda hard for me and I don't get what the part of the docs code that implements the main app is and the parts that the docs code that implements the plugin is.

For example I'd like to implement a Plugin for the profile system which would make it extensible and be able to add some data I want for profiles.

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.