Coder Social home page Coder Social logo

django-app-plugins's Introduction

Hi there

This is the place where I opensource stuff and break things ๐Ÿคฃ

  • ๐Ÿ”ญ Iโ€™m currently working on something cool ๐Ÿ˜‰
  • ๐ŸŒฑ Iโ€™m currently learning SICP (https://github.com/xiez/SICP-exercises)
  • ๐Ÿ’ฌ Ask me about anything related to Python/Django/Flask or Javascript/ReactJS/Docker/Emacs
  • ๐Ÿ“ซ How to reach me: xiez1989 AT gmail DOT com
  • โšก Fun fact: I โค๏ธ ๐Ÿถs

Xiez's GitHub stats

Top Langs

django-app-plugins's People

Watchers

 avatar

django-app-plugins's Issues

No license

Though this website says that you release the code under the MIT license,
there is no legal notices in the SVN source. It would helpful me use your
project if you add a LICENSE or COPYING file, and a copyright
notice/license text at the top of each source file.

Thanks for the cool project.

Richard

Original issue reported on code.google.com by [email protected] on 11 Feb 2009 at 6:56

management views

Views for managing the plugins and options instead of using the admin.

Breakdown by pluginpoint by app.

Maybe use databrowse to make things easier?

Original issue reported on code.google.com by [email protected] on 12 Jun 2008 at 5:37

UNIQUE index on VARCHAR(512) causes failure on MySQL 5.

What steps will reproduce the problem?
1. Try to ./manage.py syncdb with a MySQL backend (specifically from Pinax)
2. Error: ERROR 1071 (42000): Specified key was too long; max key length is
999 bytes

Solution: Change 'Label' to varchar(256) I think is best. 

MySQL 5.0.45 on Fedora 8

Here is reproducibility:

mysql> CREATE TABLE `app_plugins_plugin` (
    ->     `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    ->     `point_id` integer NOT NULL,
    ->     `label` varchar(512) NOT NULL UNIQUE,
    ->     `index` integer NOT NULL,
    ->     `registered` bool NOT NULL,
    ->     `status` smallint NOT NULL,
    ->     `required` bool NOT NULL,
    ->     `template` longtext NOT NULL,
    ->     `_order` integer NULL
    -> )
    -> ;
ERROR 1071 (42000): Specified key was too long; max key length is 999 bytes

mysql> CREATE TABLE `tester` (`tester_column` varchar(512) NOT NULL UNIQUE);
ERROR 1071 (42000): Specified key was too long; max key length is 999 bytes
mysql> CREATE TABLE `tester` (`tester_column` varchar(512) NOT NULL);
Query OK, 0 rows affected (0.01 sec)

mysql> drop table tester;
Query OK, 0 rows affected (0.00 sec)

mysql> CREATE TABLE `tester` (`tester_column` varchar(256) NOT NULL UNIQUE);
Query OK, 0 rows affected (0.00 sec)



Original issue reported on code.google.com by [email protected] on 16 Oct 2008 at 9:51

Allow plugins to be attached to any/multiple point(s)

It would be nice to be able to have a plugin be attached to any of a set of
plugin points, and or multiple points.

The model would not need to be changed over much for that to happen.
The key would be to have a separate instance per point connected to
(crucual for order preference and visible setting), but have them point to
the same library registration point.

This would allow for WordPress style plugin widgets.

Original issue reported on code.google.com by [email protected] on 12 Jun 2008 at 5:49

typos

summary (from "setup.py"):
 writting -> writing 

"docs/overview.txt":
 applictions -> applications
 connonical -> canonical
 applicaiton -> application 
 applicaitons -> applications
 visiability -> visibility

Original issue reported on code.google.com by [email protected] on 13 Apr 2010 at 11:42

Create NewForms-Admin branch

Would you be kind enough to create an NewForms-Admin branch with the following 
patch applied, 
or something similar to your liking?  We're trying to move projects over to 
NewForms-Admin for 
testing.

Original issue reported on code.google.com by [email protected] on 24 Jun 2008 at 1:48

Attachments:

Syncdb error with mysql - key too long creating table app_plugins_plugin

What steps will reproduce the problem?
1. install pinax
2. using mysql db
3. run syncdb

Syncdb stops at creating app_plugins_plugin with error:
 _mysql_exceptions.OperationalError: (1071, 'Specified key was too long;
max key length is 1000 bytes')

Reducing Plugin.label  max_length to 290 fixed it.  Sorry don't have time
to find max value that will work. 

Set up is:
django trunk r8031
app_plugins r9
mac osx
python 2.5.2
mysql5.0.51a
pinax database is UTF-8


Original issue reported on code.google.com by [email protected] on 21 Jul 2008 at 8:41

document

hi,nice project
i am new django 
is there some document than show how to use the django-app-plugins

Original issue reported on code.google.com by [email protected] on 10 Oct 2008 at 10:15

Jquery integration

http://www.sunshinesista.plus.com/worthing_test/sortables.html

yea.. that is nice...

Original issue reported on code.google.com by [email protected] on 12 Jun 2008 at 5:43

Please provide a tarball

It would vastly simplify buildouts for apps that use django-app-plugins if
every one in a while version is bumped in setup.py and "python setup.py
sdist -d .." is run and the resulting tarball added to the downloads.

Thanks.

Original issue reported on code.google.com by [email protected] on 29 Jul 2009 at 5:40

Registering plugins results in error.

This patch addresses two issues - trying to register a plugin causes errors
on syncdb due to a bug, and after fixing this bug, multiple
sync_app_plugins calls cause any plugin registrations to break. Attached is
a patch to fix the issues discussed.

Thanks for all the work on this! This app is great, but would also
appreciate a bit more documentation - understanding how to use plugins and
user preferences wasn't overly apparent, even from the source.

Cheers,

Ben

What steps will reproduce the problem?
(Tracebacks are listed at end of report)

1. In an app, add a new plugin and its appropriate template:
import app_plugins
register = app_plugins.Library()
def my_plugin(point, context, user, *args, **kwargs):
    return {}
register.plugin(takes_context=True, takes_user=True)(my_plugin)

2. Run a syncdb - Traceback #1 appears. Fix that by changing the typo cal
to call in library.py

3. Run a syncdb again - Traceback #2 appears. The joiner . is not being
stripped from the point_label (line 118 of sync_plugins.py), so correct for
this by stripping any dots.

4. Run syncdb again everything works without error.

5. Run another syncdb. Check the status of
PluginPoint.objects.get(label='my_plugin'). It will be 2 (removed). This is
due to section 2 in sync_app_plugins that removes any unregistered
plugin_points. Since our plugin_point is associated with a plugin, it is
unregistered, but should not be removed. Add in a check to line 105 of
sync_plugins.py to keep any PluginPoints with active Plugins enabled.


What version of the product are you using? On what operating system?
Same bug appears in pinax0.7-beta2 and pinax-0.7-beta3, although the patch
is against the svn trunk. Bug appears to remain in the trunk as well.
Running on Ubuntu 9.04, python2.6.

Please provide any additional information below.

Tracebacks:
Traceback #1:
Traceback (most recent call last):
  File "./manage.py", line 28, in <module>
    execute_from_command_line()
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/Django-1.0
.2_final-py2.6.egg/django/core/management/__init__.py",
line 331, in execute_from_command_line
    utility.execute()
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/Django-1.0
.2_final-py2.6.egg/django/core/management/__init__.py",
line 295, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/Django-1.0
.2_final-py2.6.egg/django/core/management/base.py",
line 192, in run_from_argv
    self.execute(*args, **options.__dict__)
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/Django-1.0
.2_final-py2.6.egg/django/core/management/base.py",
line 210, in execute
    translation.activate('en-us')
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/Django-1.0
.2_final-py2.6.egg/django/utils/translation/__init__.py",
line 73, in activate
    return real_activate(language)
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/Django-1.0
.2_final-py2.6.egg/django/utils/translation/__init__.py",
line 43, in delayed_loader
    return g['real_%s' % caller](*args, **kwargs)
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/Django-1.0
.2_final-py2.6.egg/django/utils/translation/trans_real.py",
line 209, in activate
    _active[currentThread()] = translation(language)
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/Django-1.0
.2_final-py2.6.egg/django/utils/translation/trans_real.py",
line 198, in translation
    default_translation = _fetch(settings.LANGUAGE_CODE)
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/Django-1.0
.2_final-py2.6.egg/django/utils/translation/trans_real.py",
line 183, in _fetch
    app = __import__(appname, {}, {}, [])
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/django_db_
log-1.0.1-py2.6.egg/djangodblog/__init__.py",
line 1, in <module>
    import djangodblog.admin
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/django_db_
log-1.0.1-py2.6.egg/djangodblog/admin.py",
line 14, in <module>
    admin.site.register(ErrorBatch, ErrorBatchAdmin)
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/Django-1.0
.2_final-py2.6.egg/django/contrib/admin/sites.py",
line 76, in register
    validate(admin_class, model)
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/Django-1.0
.2_final-py2.6.egg/django/contrib/admin/validation.py",
line 22, in validate
    models.get_apps()
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/Django-1.0
.2_final-py2.6.egg/django/db/models/loading.py",
line 97, in get_apps
    self._populate()
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/Django-1.0
.2_final-py2.6.egg/django/db/models/loading.py",
line 57, in _populate
    self.load_app(app_name, True)
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/Django-1.0
.2_final-py2.6.egg/django/db/models/loading.py",
line 72, in load_app
    mod = __import__(app_name, {}, {}, ['models'])
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/django_ope
nid-0.1.1-py2.6.egg/django_openid/models.py",
line 118, in <module>
    user_model = models.get_model('auth', 'User')
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/Django-1.0
.2_final-py2.6.egg/django/db/models/loading.py",
line 153, in get_model
    self._populate()
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/Django-1.0
.2_final-py2.6.egg/django/db/models/loading.py",
line 57, in _populate
    self.load_app(app_name, True)
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/Django-1.0
.2_final-py2.6.egg/django/db/models/loading.py",
line 72, in load_app
    mod = __import__(app_name, {}, {}, ['models'])
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/django_mes
sages-0.4.0-py2.6.egg/messages/models.py",
line 101, in <module>
    notification = get_app('notification')
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/Django-1.0
.2_final-py2.6.egg/django/db/models/loading.py",
line 111, in get_app
    self._populate()
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/Django-1.0
.2_final-py2.6.egg/django/db/models/loading.py",
line 57, in _populate
    self.load_app(app_name, True)
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/Django-1.0
.2_final-py2.6.egg/django/db/models/loading.py",
line 72, in load_app
    mod = __import__(app_name, {}, {}, ['models'])
  File "/home/bbest/PinaxProjects/myewb/myewb/apps/ideas_app/__init__.py",
line 8, in <module>
    register.plugin(takes_context=True, takes_user=True)(my_plugin)
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/django_app
_plugins-0.1.0-py2.6.egg/app_plugins/library.py",
line 57, in plugin
    if not callable(call) and cal is not None:
NameError: global name 'cal' is not defined

Traceback #2:
Traceback (most recent call last):
  File "./manage.py", line 28, in <module>
    execute_from_command_line()
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/Django-1.0
.2_final-py2.6.egg/django/core/management/__init__.py",
line 331, in execute_from_command_line
    utility.execute()
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/Django-1.0
.2_final-py2.6.egg/django/core/management/__init__.py",
line 295, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/Django-1.0
.2_final-py2.6.egg/django/core/management/base.py",
line 192, in run_from_argv
    self.execute(*args, **options.__dict__)
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/Django-1.0
.2_final-py2.6.egg/django/core/management/base.py",
line 219, in execute
    output = self.handle(*args, **options)
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/Django-1.0
.2_final-py2.6.egg/django/core/management/base.py",
line 348, in handle
    return self.handle_noargs(**options)
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/Django-1.0
.2_final-py2.6.egg/django/core/management/commands/syncdb.py",
line 101, in handle_noargs
    emit_post_sync_signal(created_models, verbosity, interactive)
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/Django-1.0
.2_final-py2.6.egg/django/core/management/sql.py",
line 205, in emit_post_sync_signal
    interactive=interactive)
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/Django-1.0
.2_final-py2.6.egg/django/dispatch/dispatcher.py",
line 148, in send
    response = receiver(signal=self, sender=sender, **named)
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/django_app
_plugins-0.1.0-py2.6.egg/app_plugins/management/__init__.py",
line 6, in do_sync
    sync_app_plugins(verbosity=kwdargs.get("verbosity", 1))
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/django_app
_plugins-0.1.0-py2.6.egg/app_plugins/management/commands/sync_plugins.py",
line 145, in sync_app_plugins
    options = lib.get_plugin_call(point_label).options
  File
"/home/bbest/.virtualenvs/pinax-env-beta2/lib/python2.6/site-packages/django_app
_plugins-0.1.0-py2.6.egg/app_plugins/library.py",
line 51, in get_plugin_call
    return self.plugin_calls[name]
KeyError: '.my_plugin'


Original issue reported on code.google.com by [email protected] on 11 Aug 2009 at 9:26

Attachments:

templates are not packaged by setup.py

What steps will reproduce the problem?
1. python setup.py build
2. python setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT

What is the expected output? What do you see instead?
The templates directory should be copied to $RPM_BUILD_ROOT (in the
directory used by the Python package). Without this, the Satchmo Django
application fails to work.

What version of the product are you using? On what operating system?
Revision 19 with python-2.6-9.fc11.x86_64 and
python-setuptools-0.6c9-4.fc11.noarch.

Please provide any additional information below.
I've attached a patch that fixes the issue. I'm not an expert on
setuptools, so the patch might not be perfect.

Original issue reported on code.google.com by [email protected] on 14 Oct 2009 at 1:34

Attachments:

Add registered plugin points and plugins with user preferences

We want a way to document plugins and plugin points, have a means of
enabling/disabling them in the database, and manage their display order,
both on a global and per-user level.

These would be registered similar to filters and tags (because its such a
great system).

Features of registered plugins and plugin points:
1. Allow for enabling and disabling both plugin points and the plugins
2. Allow for custom default order of the plugins
3. Allow for per-user preference for the order of plugins
4. Allow for per-user selection of which plugins at a point are visible
5. Allow for system setting of 'required' plugins which users do not get to
make invisible.
6. Allow for documentation of plugins and points in some sane manner
7. Callbacks for when plugins and points are rendered (like include tags)
8. Dynamic intelligent namespace management

The last one is the hardish part. We want these to behave like include
tags, but also allow for the unregistered form. Points and plugins should
have labels representing the app and identifier on both ends. Example:

PluginPoint 'point' in app 'myapp' would have the label: 'myapp.point'.

Plugin for 'point' in app 'otherapp' would have the label:
'otherapp.myapp.point' (template: 'otherapp/plugins/myapp/point.html')

example use case:
{{{
#!python
register = app_plugins.Library()

@register.plugin_point
def pointname(pointobj):
    'doc string'
    return {'newcontextvar': 'value'}

@register.plugin('otherapp')
def plugin(pluginobj):
    'doc string'
    return newcontext

}}}

some optional arguments for those decorators:

{{{
#!python
@register.plugin_point(takes_context=True, takes_user=True,
takes_args=True, ext=".txt")
def pointname(pointobj, context, user, arg1, arg2):
    return {}

{% plugin_point "app.pointname" user=user arg1=var1 arg2=var2 %}
}}}

{{{
#!python
@register.plugin("app", takes_context=True, takes_user=True,
takes_args=True, template="alternative/template/foo.html")
def pointname(pluginobj, context, user, arg1, arg2):
    return {}
}}}

Original issue reported on code.google.com by [email protected] on 12 Jun 2008 at 5:28

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.