Re: [mezzanine-users] Password reset URL scheme in email templates is hard coded as HTTP

2017-04-15 Thread Ryne Everett
I went ahead and submitted the patch:
.

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] "Cannot use None as a query value"

2017-04-15 Thread Richard Jackson
Hi everyone, happy Easter!

I made a simple model with a foreign-keyed orderable - however, when I try 
to delete one of the orderable objects I get a "Cannot use None as a query 
value"

*Code snippets from models.py/admin.py:*

models.py

class TuitionPage(Page):
class Meta:
verbose_name = _("Tuition page")
verbose_name_plural = _("Tuition pages")


class TuitionContent(Orderable):
tuition = models.ForeignKey(TuitionPage, related_name='tuitioncontent')
title = models.CharField(max_length=2000, blank=True)
content = RichTextField(null=True, blank=True)

def __unicode__(self):
return self.title

admin.py

class TuitionInline(StackedDynamicInlineAdmin):
model = TuitionContent

class TuitionAdmin(PageAdmin):
inlines = (TuitionInline,)

admin.site.register(TuitionPage, TuitionAdmin)

*Image of Tuition Content, about to be deleted:*



*Traceback from "ValueError at /admin/vital_theme/tuitionpage/318/ - Cannot 
use None as a query value":*

Traceback:
File 
"/Users/majora/venv/lib/python2.7/site-packages/django/core/handlers/base.py" 
in get_response
  132. response = wrapped_callback(request, 
*callback_args, **callback_kwargs)
File 
"/Users/majora/venv/lib/python2.7/site-packages/django/contrib/admin/options.py"
 
in wrapper
  616. return self.admin_site.admin_view(view)(*args, 
**kwargs)
File 
"/Users/majora/venv/lib/python2.7/site-packages/django/utils/decorators.py" 
in _wrapped_view
  110. response = view_func(request, *args, **kwargs)
File 
"/Users/majora/venv/lib/python2.7/site-packages/django/views/decorators/cache.py"
 
in _wrapped_view_func
  57. response = view_func(request, *args, **kwargs)
File 
"/Users/majora/venv/lib/python2.7/site-packages/django/contrib/admin/sites.py" 
in inner
  233. return view(request, *args, **kwargs)
File 
"/Users/majora/venv/lib/python2.7/site-packages/Mezzanine-4.0.1-py2.7.egg/mezzanine/pages/admin.py"
 
in change_view
  125. return super(PageAdmin, self).change_view(request, 
object_id, **kwargs)
File 
"/Users/majora/venv/lib/python2.7/site-packages/django/contrib/admin/options.py"
 
in change_view
  1519. return self.changeform_view(request, object_id, form_url, 
extra_context)
File 
"/Users/majora/venv/lib/python2.7/site-packages/django/utils/decorators.py" 
in _wrapper
  34. return bound_func(*args, **kwargs)
File 
"/Users/majora/venv/lib/python2.7/site-packages/django/utils/decorators.py" 
in _wrapped_view
  110. response = view_func(request, *args, **kwargs)
File 
"/Users/majora/venv/lib/python2.7/site-packages/django/utils/decorators.py" 
in bound_func
  30. return func.__get__(self, type(self))(*args2, 
**kwargs2)
File 
"/Users/majora/venv/lib/python2.7/site-packages/django/utils/decorators.py" 
in inner
  145. return func(*args, **kwargs)
File 
"/Users/majora/venv/lib/python2.7/site-packages/django/contrib/admin/options.py"
 
in changeform_view
  1468. self.save_related(request, form, formsets, not add)
File 
"/Users/majora/venv/lib/python2.7/site-packages/django/contrib/admin/options.py"
 
in save_related
  1102. self.save_formset(request, form, formset, change=change)
File 
"/Users/majora/venv/lib/python2.7/site-packages/django/contrib/admin/options.py"
 
in save_formset
  1090. formset.save()
File 
"/Users/majora/venv/lib/python2.7/site-packages/django/forms/models.py" in 
save
  640. return self.save_existing_objects(commit) + 
self.save_new_objects(commit)
File 
"/Users/majora/venv/lib/python2.7/site-packages/django/forms/models.py" in 
save_existing_objects
  754. obj.delete()
File 
"/Users/majora/venv/lib/python2.7/site-packages/Mezzanine-4.0.1-py2.7.egg/mezzanine/core/models.py"
 
in delete
  446. after = concrete_model.objects.filter(**lookup)
File 
"/Users/majora/venv/lib/python2.7/site-packages/django/db/models/manager.py" 
in manager_method
  127. return getattr(self.get_queryset(), name)(*args, 
**kwargs)
File 
"/Users/majora/venv/lib/python2.7/site-packages/django/db/models/query.py" 
in filter
  679. return self._filter_or_exclude(False, *args, **kwargs)
File 
"/Users/majora/venv/lib/python2.7/site-packages/django/db/models/query.py" 
in _filter_or_exclude
  697. clone.query.add_q(Q(*args, **kwargs))
File 
"/Users/majora/venv/lib/python2.7/site-packages/django/db/models/sql/query.py" 
in add_q
  1309. clause, require_inner = self._add_q(where_part, 
self.used_aliases)
File 
"/Users/majora/venv/lib/python2.7/site-packages/django/db/models/sql/query.py" 
in _add_q
  1337. allow_joins=allow_joins, split_subq=split_subq,
File 

Re: [mezzanine-users] upload thumbnails rendering with relative URLs instead of absolute (AWS S3)

2017-04-15 Thread jamie
"error":"Unicode-objects must be encoded before hashing",
  "stacktrace":"Traceback (most recent call last):\n  File 
\"/usr/local/lib/python3.5/site-packages/watchman/decorators.py\", line 17, 
in wrapped\nresponse = func(*args, **kwargs)\n  File 
\"/usr/local/lib/python3.5/site-packages/watchman/checks.py\", line 63, in 
_check_storage\npath = default_storage.save(filename, 
ContentFile(content))\n  File 
\"/usr/local/lib/python3.5/site-packages/django/core/files/storage.py\", 
line 54, in save\nreturn self._save(name, content)\n  File 
\"/usr/local/lib/python3.5/site-packages/storages/backends/s3boto3.py\", 
line 452, in _save\nself._save_content(obj, content, 
parameters=parameters)\n  File 
\"/usr/local/lib/python3.5/site-packages/storages/backends/s3boto3.py\", 
line 467, in _save_content\nobj.upload_fileobj(content, 
ExtraArgs=put_parameters)\n  File 
\"/usr/local/lib/python3.5/site-packages/boto3/s3/inject.py\", line 509, in 
object_upload_fileobj\nExtraArgs=ExtraArgs, Callback=Callback, 
Config=Config)\n  File 
\"/usr/local/lib/python3.5/site-packages/boto3/s3/inject.py\", line 427, in 
upload_fileobj\nreturn future.result()\n  File 
\"/usr/local/lib/python3.5/site-packages/s3transfer/futures.py\", line 73, 
in result\nreturn self._coordinator.result()\n  File 
\"/usr/local/lib/python3.5/site-packages/s3transfer/futures.py\", line 233, 
in result\nraise self._exception\n  File 
\"/usr/local/lib/python3.5/site-packages/s3transfer/tasks.py\", line 126, 
in __call__\nreturn self._execute_main(kwargs)\n  File 
\"/usr/local/lib/python3.5/site-packages/s3transfer/tasks.py\", line 150, 
in _execute_main\nreturn_value = self._main(**kwargs)\n  File 
\"/usr/local/lib/python3.5/site-packages/s3transfer/upload.py\", line 679, 
in _main\nclient.put_object(Bucket=bucket, Key=key, Body=body, 
**extra_args)\n  File 
\"/usr/local/lib/python3.5/site-packages/botocore/client.py\", line 253, in 
_api_call\nreturn self._make_api_call(operation_name, kwargs)\n  File 
\"/usr/local/lib/python3.5/site-packages/botocore/client.py\", line 525, in 
_make_api_call\nrequest_signer=self._request_signer, 
context=request_context)\n  File 
\"/usr/local/lib/python3.5/site-packages/botocore/hooks.py\", line 242, in 
emit_until_response\nresponses = self._emit(event_name, kwargs, 
stop_on_response=True)\n  File 
\"/usr/local/lib/python3.5/site-packages/botocore/hooks.py\", line 210, in 
_emit\nresponse = handler(**kwargs)\n  File 
\"/usr/local/lib/python3.5/site-packages/botocore/handlers.py\", line 200, 
in conditionally_calculate_md5\ncalculate_md5(params, **kwargs)\n  File 
\"/usr/local/lib/python3.5/site-packages/botocore/handlers.py\", line 178, 
in calculate_md5\nbinary_md5 = _calculate_md5_from_file(body)\n  File 
\"/usr/local/lib/python3.5/site-packages/botocore/handlers.py\", line 192, 
in _calculate_md5_from_file\nmd5.update(chunk)\nTypeError: 
Unicode-objects must be encoded before hashing\n",

I am also getting this error showing up in django-watchman in regards to 
this plugin.

On Friday, April 14, 2017 at 4:10:06 PM UTC+1, mic...@mozillafoundation.org 
wrote:
>
> I'll extend the readme with that information (
> https://github.com/Pomax/filebrowser_s3/issues/1). in the mean time:
>
> AWS_ACCESS_KEY_ID - your AWS access key
> AWS_SECRET_ACCESS_KEY - your AWS secret
> AWS_STORAGE_BUCKET_NAME - the bucket name to use on your AWS account
> AWS_STORAGE_ROOT - the name of the "directory" to use in your bucket
> AWS_S3_CUSTOM_DOMAIN - whatever custom domain you need used, such as "
> assets.mydomain.com"
>
> The AWS_LOCATION is effectively an alias for AWS_STORAGE_ROOT, and upon 
> review shouldn't really be necessary. I've filed 
> https://github.com/Pomax/filebrowser_s3/issues/2 to see if we can just 
> take it out entirely, thanks for asking about it!
>
> On Friday, April 14, 2017 at 6:42:04 AM UTC-7, ja...@bitflight.io wrote:
>>
>> Hi,
>> What are these variables for? They don't seem to be documented:
>>
>> AWS_LOCATION = env('AWS_STORAGE_ROOT', default=None)
>>
>>
>> On Friday, April 14, 2017 at 12:13:00 AM UTC+1, 
>> mic...@mozillafoundation.org wrote:
>>>
>>> We decided to, rather than a PR, release the fix as a separate package 
>>> that people can install alongside Mezzanine, that just "bolts on" to 
>>> Mezzanine with pretty much zero effort:
>>>
>>> https://pypi.python.org/pypi/filebrowser-s3/ (this *should* be 
>>> filebrowser_s3 but there's something weird with pypi)
>>>
>>> With associated github repo https://github.com/Pomax/filebrowser_s3 
>>>
>>> The REAMDE.md pretty much covers what is necessary to make it work: add 
>>> it as installed app, and then make sure to set the storage variable to use 
>>> the filebrowser_s3 storage class instead. 
>>>
>>> - Pomax
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from