Permalink
Browse files

Merge branch 'master' of http://github.com/divio/django-cms

  • Loading branch information...
2 parents 657500d + 7b00e24 commit 11a0a1fbf8b8b1899ace1c8e54a8336a5b899537 @oversize committed Oct 29, 2010
@@ -86,8 +86,8 @@ def formfield_for_dbfield(self, db_field, **kwargs):
If kwargs are given, they're passed to the form Field's constructor.
"""
- request = kwargs.pop("request", None)
if isinstance(db_field, PlaceholderField):
+ request = kwargs.pop("request", None)
return db_field.formfield_for_admin(request, self.placeholder_plugin_filter, **kwargs)
return super(PlaceholderAdmin, self).formfield_for_dbfield(db_field, **kwargs)
File renamed without changes.
View
@@ -33,7 +33,7 @@
templates_path = ['templates']
# The suffix of source filenames.
-source_suffix = '.txt'
+source_suffix = '.rst'
# The encoding of source files.
source_encoding = 'utf-8'
File renamed without changes.
View
@@ -0,0 +1,69 @@
+Contribution Guide
+==================
+
+Community
+---------
+
+People interested in developing for the django-cms should join the
+`django-cms-developers`_ mailing list as well as heading over to #django-cms on
+freenode for help and to discuss the development.
+
+You may also be interested in following @djangocmsstatus on twitter to get the
+github commits as well as the hudson build reports.
+
+
+Translate the CMS
+-----------------
+
+For translators we have a `transifex account
+<http://www.transifex.net/projects/p/django-cms/>`_ where you can translate
+the .po files and don't need to install git or mercurial to be able to
+contribute. All changes there will be automatically sent to the project.
+
+
+Review or write documentation
+-----------------------------
+
+People interested in writing documentation and/or reviewing the documentation
+already existing are more than welcome to do so. The best way to do so is to
+`fork`_ the cms on github, change the relevant files and send us a pull request.
+
+For our documentation we use `sphinx`_, which is based off Restructured Text.
+
+
+Contributing code
+-----------------
+
+To contribute code you should be familiar with git and have an account on
+github.com (although we'd also accept plain old patches of course).
+
+The usual process to contribute code is:
+
+- `fork`_ the cms on github.
+- Make your changes.
+- Send us a pull request.
+
+Please note that each pull request should fix exactly one issue or add exactly
+one new feature, don't send pull requests which have several things mixed in,
+since that lowers their chances of getting pulled in.
+
+New Features
+~~~~~~~~~~~~
+
+If you're interested in developing a new feature for the cms, it is recommended
+that you first discuss it on the `django-cms-developers`_ mailing list so as
+not to do any work that will not get merged in anyway.
+
+Coding Guidelines
+~~~~~~~~~~~~~~~~~
+
+- Follow the `PEP8`_ coding style guidelines whenever possible.
+- All code **must** be unittest covered. Tests are not optional!
+- If you change a public API you must also change their documentation.
+- Please comment your code.
+
+
+.. _fork: http://github.com/divio/django-cms
+.. _sphinx: http://sphinx.pocoo.org/
+.. _PEP8: http://www.python.org/dev/peps/pep-0008/
+.. _django-cms-developers: http://groups.google.com/group/django-cms-developers
View
@@ -1,97 +0,0 @@
-Contribution Guide
-==================
-
-Translators
------------
-
-For translators we have a `transifex account
-<http://www.transifex.net/projects/p/django-cms/>`_ where you can translate
-the .po files and don't need to install git or mercurial to be able to
-contribute. All changes there will be automatically sent to the project.
-
-Developers
-----------
-
-For contributing to django-cms follow these steps:
-
-* You need either `git <http://git-scm.com/>`_ or `Mercurial
- <http://www.selenic.com/mercurial/>`_ with the `hg-git
- <http://hg-git.github.com/>`_ extension installed.
-
-* You need an account on `github <http://www.github.com/>`_.
-
-* On github you can see all the `open tickets
- <http://github.com/divio/django-cms/issues>`_. Please be sure to check there
- first before you open a new one.
-
-* Go to the `project-page <http://github.com/divio/django-cms/>`_ and click on
- the fork button. This creates your own repository of django-cms2 and enables
- you to push updates to this repository. On your fork you should see "Your
- Clone URL:". Copy the URL and clone it with git or hg-git.
-
-::
-
- $ git clone YOURURL
-
-or::
-
- $ hg gclone YOURURL
-
-Make your changes and commit.
-::
-
- $ git commit
-
-or::
-
- $ hg commit
-
-After you are finished you can push to github.
-::
-
- $ git push origin
-
-or::
-
- $ hg gpush origin
-
-After you have done the push, your changes should show up in the `project
-network <http://github.com/divio/django-cms/network>`_.
-
-You can now press on "pull request" to send the project leaders a message of
-what your changes contain and inform them that there are new changes ready to
-be incorporated into the master tree.
-
-After some time your local checkout and your github repository will probably
-become out-of-sync with the official repository. To get the newest changesets,
-add a new remote:
-::
-
- $ git remote add upstream git://github.com/divio/django-cms.git
-
-or::
-
- $ hg gremote add upstream git://github.com/divio/django-cms.git
-
-After this you can do a fetch from upstream:
-::
-
- $ git fetch upstream # only download
- $ git pull upstream master # download and merge master branch
-
-or::
-
- $ hg gfetch upstream # download
- $ hg update # merge
-
-Now your repository is up-to-date again.
-
-It is also good practice to use a branch for every bug / feature you commit if
-you have more than one or you need more then one commit. This helps that we
-can merge the whole branch and don't have to cherry-pick the single commits
-that make up the fix / feature. Also it allows us to give you instructions if
-something is missing (tests, docs) and you don't have to interfere with other
-things you might be working on.
-
-If you have questions you may wish to read some tutorials about git or
-Mercurial or ask on IRC or the mailing list.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -2,7 +2,21 @@
from cms.admin.placeholderadmin import PlaceholderAdmin
from testapp.placeholderapp.models import *
-class Example1Admin(PlaceholderAdmin):
+
+class MixinAdmin(admin.ModelAdmin):
+ def formfield_for_dbfield(self, db_field, **kwargs):
+ """
+ Hook for specifying the form Field instance for a given database Field
+ instance.
+
+ If kwargs are given, they're passed to the form Field's constructor.
+ """
+ # silly test that placeholderadmin doesn't fuck stuff up
+ request = kwargs.pop('request', None)
+ return super(MixinAdmin, self).formfield_for_dbfield(db_field, request=request, **kwargs)
+
+
+class Example1Admin(PlaceholderAdmin, MixinAdmin):
pass
class Example2Admin(PlaceholderAdmin):

0 comments on commit 11a0a1f

Please sign in to comment.