Date: Thu, 19 Dec 2013 16:45:58 +0000 (UTC) From: William Grzybowski <wg@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r336935 - in head/www/py-dojango: . files Message-ID: <201312191645.rBJGjwSD010037@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: wg Date: Thu Dec 19 16:45:57 2013 New Revision: 336935 URL: http://svnweb.freebsd.org/changeset/ports/336935 Log: www/py-dojango: fix for django 1.6 and minor fixes - Fix port to work with django 1.6 - Remove leading article from COMMENT - Adjust run depends to use package name and version - Allow staging - Use python auto plist Approved by: maintainer Added: head/www/py-dojango/files/ head/www/py-dojango/files/patch-dojango-forms-models.py (contents, props changed) Deleted: head/www/py-dojango/pkg-plist Modified: head/www/py-dojango/Makefile head/www/py-dojango/pkg-descr Modified: head/www/py-dojango/Makefile ============================================================================== --- head/www/py-dojango/Makefile Thu Dec 19 16:17:39 2013 (r336934) +++ head/www/py-dojango/Makefile Thu Dec 19 16:45:57 2013 (r336935) @@ -3,22 +3,22 @@ PORTNAME= dojango PORTVERSION= 0.5.6 +PORTREVISION= 1 CATEGORIES= www python java MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= jpaetzel@FreeBSD.org -COMMENT= A django application for building dojo +COMMENT= Django application for building dojo USE_PYTHON= yes USE_PYDISTUTILS= yes -PYDISTUTILS_PKGNAME= ${PORTNAME} +PYDISTUTILS_AUTOPLIST= yes -RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/django/bin/django-admin.py:${PORTSDIR}/www/py-django +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}django>=1.6:${PORTSDIR}/www/py-django OPTIONS_DEFINE= JAVA -NO_STAGE= yes .include <bsd.port.options.mk> .if ${PORT_OPTIONS:MJAVA} Added: head/www/py-dojango/files/patch-dojango-forms-models.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/py-dojango/files/patch-dojango-forms-models.py Thu Dec 19 16:45:57 2013 (r336935) @@ -0,0 +1,46 @@ +--- dojango/forms/models.py.orig 2013-12-19 05:09:15.062402990 -0800 ++++ dojango/forms/models.py 2013-12-19 05:11:27.052422916 -0800 +@@ -2,7 +2,7 @@ + from django.forms.models import BaseModelFormSet + from django.forms.models import BaseInlineFormSet + from django.forms.models import ModelChoiceIterator +-from django.forms.models import InlineForeignKeyHiddenInput, InlineForeignKeyField ++from django.forms.models import InlineForeignKeyField + + from django.utils.text import capfirst + +@@ -32,32 +32,12 @@ + + # Fields ##################################################################### + +-class InlineForeignKeyHiddenInput(DojoWidgetMixin, InlineForeignKeyHiddenInput): +- """ +- Overwritten InlineForeignKeyHiddenInput to use the dojango widget mixin +- """ +- dojo_type = 'dijit.form.TextBox' # otherwise dijit.form.Form can't get its values +- + class InlineForeignKeyField(DojoFieldMixin, InlineForeignKeyField, Field): + """ +- Overwritten InlineForeignKeyField to use the dojango field mixin and passing ++ Overwritten InlineForeignKeyField to use the dojango HiddenInput + the dojango InlineForeignKeyHiddenInput as widget. + """ +- def __init__(self, parent_instance, *args, **kwargs): +- self.parent_instance = parent_instance +- self.pk_field = kwargs.pop("pk_field", False) +- self.to_field = kwargs.pop("to_field", None) +- if self.parent_instance is not None: +- if self.to_field: +- kwargs["initial"] = getattr(self.parent_instance, self.to_field) +- else: +- kwargs["initial"] = self.parent_instance.pk +- +- kwargs["required"] = False +- kwargs["widget"] = InlineForeignKeyHiddenInput +- # don't call the the superclass of this one. Use the superclass of the +- # normal django InlineForeignKeyField +- Field.__init__(self, *args, **kwargs) ++ widget = HiddenInput + + # our customized model field => form field map + # here it is defined which form field is used by which model field, when creating a ModelForm Modified: head/www/py-dojango/pkg-descr ============================================================================== --- head/www/py-dojango/pkg-descr Thu Dec 19 16:17:39 2013 (r336934) +++ head/www/py-dojango/pkg-descr Thu Dec 19 16:45:57 2013 (r336935) @@ -6,4 +6,4 @@ Delivers helping utilities, that makes t internet applications in combination with dojo more comfortable. It makes the building of your own packed dojo release easier. -WWW: http://code.google.com/p/dojango/ +WWW: https://github.com/klipstein/dojango/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312191645.rBJGjwSD010037>