Fixes on contacts

This commit is contained in:
Marc Aymerich 2014-11-24 20:09:44 +00:00
parent 4732925f63
commit 02b8e24f45
3 changed files with 29 additions and 6 deletions

21
TODO.md
View File

@ -161,4 +161,23 @@
* Rename apache logs ending on .log in order to logrotate easily * Rename apache logs ending on .log in order to logrotate easily
* SaaS wordpress multiple blogs per user? separate users from sites? * SaaS wordpress multiple blogs per user? separate users from sites? SaaSUser SaaSSite models
* Custom domains for SaaS apps (wordpress Vhost) SaaSSite.domain ?
* Change account and orders
==== SaaS ====
Wordpress
---------
* site_name
* email
* site_title
* site_domain (optional)
BSCW
----
* email
* username
* quota
* password (optional)

View File

@ -12,5 +12,7 @@ class EmailUsageListFilter(SimpleListFilter):
return Contact.email_usage.field.choices return Contact.email_usage.field.choices
def queryset(self, request, queryset): def queryset(self, request, queryset):
value = self.value().split(',') value = self.value()
return queryset.filter(email_usages=value) if value is None:
return queryset
return queryset.filter(email_usages=value.split(','))

View File

@ -92,13 +92,15 @@ class Resource(models.Model):
try: try:
self.get_model_path(monitor) self.get_model_path(monitor)
except (RuntimeError, LookupError): except (RuntimeError, LookupError):
monitor_errors.append(monitor) model = get_model(ServiceMonitor.get_backend(monitor).model)
monitor_errors.append(model._meta.model_name)
if monitor_errors: if monitor_errors:
model_name = self.content_type.model_class()._meta.model_name
raise validators.ValidationError({ raise validators.ValidationError({
'monitors': [ 'monitors': [
_("Path does not exists between '%s' and '%s'") % ( _("Path does not exists between '%s' and '%s'") % (
get_model(ServiceMonitor.get_backend(monitor).model)._meta.model_name, error,
self.content_type.model_class()._meta.model_name, model_name,
) for error in monitor_errors ) for error in monitor_errors
]}) ]})