Re: [mezzanine-users] drum

2016-04-18 Thread Icham Achtir
Thanks steven,

it's working now.


>
> -- 
> Stephen McDonald
> http://jupo.org
>

-- 
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.


Re: [mezzanine-users] Image Expires Tag - how can I alter this? [Basic user with no understanding query]

2016-04-18 Thread Ken Bolton
Hi Richard,

If you are using the Fabric script to deploy your site behind an nginx
web server, the default configuration includes thirty-day expires
headers at 
https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/project_template/deploy/nginx.conf.template#L41.

-ken

On Mon, Apr 18, 2016 at 12:02 PM, Richard Jackson  wrote:
> Hi there,
>
> I recently ran an SEO check on my site which is telling me (amongst other
> things) that I'm not using expires headers for my images. The explanation
> advises that to resolve this I some lines to the .htaccess file,
> specifically:
>
> 
> ExpiresActive on
>
> ExpiresByType image/jpg "access plus 1 month"
> ExpiresByType image/jpeg "access plus 1 month"
> ExpiresByType image/gif "access plus 1 month"
> ExpiresByType image/png "access plus 1 month"
> 
>
> What should I be doing to make use of these tags? I haven't come across the
> .htaccess file in Django/Mezzanine so am not sure of how I can make such an
> alteration.
>
> Any advice/feedback/best practice suggestions would be greatly appreciated
> as this isn't an area I'm in any way familiar with.
>
> Thanks!
>
> Rich
>
> --
> 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.

-- 
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.


Re: [mezzanine-users] What is the best way to edit sections/part of a page?

2016-04-18 Thread Ken Bolton
I expected that you would end up there. For good or ill, this was the
solution for SPA before onepage and blocks existed and had required no
maintenance as Mezzanine has changed.

-ken

On Mon, Apr 18, 2016 at 1:03 PM, Sebastian Wain
 wrote:
> Thank you again. Finally I am following your suggestion (detracting from my
> worst case scenario position) because just adding an editable block for each
> subpage makes the trick. In this way the user will be able to edit all the
> parts individually on the parent page.
>
> Thanks,
> Sebastian
>
> On Wednesday, April 13, 2016 at 2:48:57 PM UTC-3, Kenneth Bolton wrote:
>>
>> Hi Sebastian,
>>
>> Pages can have parent/child relationships to one another. In your
>> template, you can loop through the children of the current page, and those
>> children's children, to create SPA sites. Does that start to get you there?
>>
>> -ken
>>
>> On Wed, Apr 13, 2016 at 1:38 PM, Sebastian Wain 
>> wrote:
>>>
>>> Hi,
>>>
>>> We plan to migrate our current Mezzanine based site
>>> (http://www.nektra.com) to a typical modern (multiple) one-page design but I
>>> can't find an easy way to edit individual website sections on a single page
>>> except developing our own extensions. I have checked mezzanine-blocks and
>>> mezzanine-onepage but they don't work with the latest Mezzanine version.
>>>
>>> Is there any existing alternative to those modules?
>>>
>>> Thank you very much,
>>> Sebastian
>>>
>>>
>>> --
>>> 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-use...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>
>>
> --
> 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.

-- 
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.


Re: [mezzanine-users] What is the best way to edit sections/part of a page?

2016-04-18 Thread Sebastian Wain
Thank you again. Finally I am following your suggestion (detracting from my 
worst case scenario position) because just adding an editable block for 
each subpage makes the trick. In this way the user will be able to edit all 
the parts individually on the parent page.

Thanks,
Sebastian

On Wednesday, April 13, 2016 at 2:48:57 PM UTC-3, Kenneth Bolton wrote:
>
> Hi Sebastian,
>
> Pages can have parent/child relationships to one another. In your 
> template, you can loop through the children of the current page, and those 
> children's children, to create SPA sites. Does that start to get you there?
>
> -ken
>
> On Wed, Apr 13, 2016 at 1:38 PM, Sebastian Wain  > wrote:
>
>> Hi,
>>
>> We plan to migrate our current Mezzanine based site (
>> http://www.nektra.com) to a typical modern (multiple) one-page design 
>> but I can't find an easy way to edit individual website sections on a 
>> single page except developing our own extensions. I have checked 
>> mezzanine-blocks and mezzanine-onepage but they don't work with the latest 
>> Mezzanine version.
>>
>> Is there any existing alternative to those modules?
>>
>> Thank you very much,
>> Sebastian
>>
>>
>> -- 
>> 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-use...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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] Image Expires Tag - how can I alter this? [Basic user with no understanding query]

2016-04-18 Thread Richard Jackson
Hi there,

I recently ran an SEO check on my site which is telling me (amongst other 
things) that I'm not using expires headers for my images. The explanation 
advises that to resolve this I some lines to the .htaccess file, 
specifically:


ExpiresActive on
 
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"


What should I be doing to make use of these tags? I haven't come across the 
.htaccess file in Django/Mezzanine so am not sure of how I can make such an 
alteration.

Any advice/feedback/best practice suggestions would be greatly appreciated as 
this isn't an area I'm in any way familiar with.

Thanks!

Rich

-- 
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.


Re: [mezzanine-users] Templates

2016-04-18 Thread Cameron Burnett
Thanks for the info.


On Monday, April 18, 2016 at 8:37:53 PM UTC+10, Stephen McDonald wrote:
>
> See https://github.com/stephenmcd/mezzanine/issues/1512
>
> On Mon, Apr 18, 2016 at 8:08 PM, Cameron Burnett  > wrote:
>
>> Probably an easy question. I'm just a little confused about how the 
>> templates are meant to work. I'm using Mezzanine 4.1.0, Django 1.8.11, and 
>> Python 3.3.6.
>>
>> If I run...
>>
>> python manage.py collecttemplates -t base.html
>>
>>
>> I get the following traceback...
>>
>> Traceback (most recent call last):
>>   File "manage.py", line 14, in 
>> execute_from_command_line(sys.argv)
>>   File 
>> "/home/cameron/.pyenv/versions/django18/lib/python3.3/site-packages/django/core/management/__init__.py",
>>  
>> line 354, in execute_from_command_line
>> utility.execute()
>>   File 
>> "/home/cameron/.pyenv/versions/django18/lib/python3.3/site-packages/django/core/management/__init__.py",
>>  
>> line 346, in execute
>> self.fetch_command(subcommand).run_from_argv(self.argv)
>>   File 
>> "/home/cameron/.pyenv/versions/django18/lib/python3.3/site-packages/django/core/management/base.py",
>>  
>> line 394, in run_from_argv
>> self.execute(*args, **cmd_options)
>>   File 
>> "/home/cameron/.pyenv/versions/django18/lib/python3.3/site-packages/django/core/management/base.py",
>>  
>> line 445, in execute
>> output = self.handle(*args, **options)
>>   File 
>> "/home/cameron/.pyenv/versions/django18/lib/python3.3/site-packages/mezzanine/core/management/commands/collecttemplates.py",
>>  
>> line 42, in handle
>> to_dir = settings.TEMPLATE_DIRS[0]
>> IndexError: tuple index out of range
>>
>>
>> So I added the following to settings.py which solved my problem but I got 
>> a message saying that it was no longer the way to do it...
>>
>> TEMPLATE_DIRS = (
>> PROJECT_ROOT + '/templates',
>> )
>>
>> WARNINGS:
>> ?: (1_8.W001) The standalone TEMPLATE_* settings were deprecated in 
>> Django 1.8 and the TEMPLATES dictionary takes precedence. You must put the 
>> values of the following settings into your default TEMPLATES dict: 
>> TEMPLATE_DIRS.
>>
>> Copied 1 template
>>
>>
>>
>> The TEMPLATES section is just standard. I haven't changed it. It's 
>> already got a path for "templates" but it doesn't seem to use it.
>>
>> TEMPLATES = [
>> {
>> "BACKEND": "django.template.backends.django.DjangoTemplates",
>> "DIRS": [
>> os.path.join(PROJECT_ROOT, "templates")
>> ],
>> "APP_DIRS": True,
>> "OPTIONS": {
>> "context_processors": [
>> "django.contrib.auth.context_processors.auth",
>> "django.contrib.messages.context_processors.messages",
>> "django.template.context_processors.debug",
>> "django.template.context_processors.i18n",
>> "django.template.context_processors.static",
>> "django.template.context_processors.media",
>> "django.template.context_processors.request",
>> "django.template.context_processors.tz",
>> "mezzanine.conf.context_processors.settings",
>> "mezzanine.pages.context_processors.page",
>> ],
>> "builtins": [
>> "mezzanine.template.loader_tags",
>> ],
>> },
>> },
>> ]
>>
>>
>>
>> So, how am I meant to do it???
>>
>> Thanks.
>>
>> -- 
>> 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-use...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Stephen McDonald
> http://jupo.org
>

-- 
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.


Re: [mezzanine-users] Templates

2016-04-18 Thread Stephen McDonald
See https://github.com/stephenmcd/mezzanine/issues/1512

On Mon, Apr 18, 2016 at 8:08 PM, Cameron Burnett 
wrote:

> Probably an easy question. I'm just a little confused about how the
> templates are meant to work. I'm using Mezzanine 4.1.0, Django 1.8.11, and
> Python 3.3.6.
>
> If I run...
>
> python manage.py collecttemplates -t base.html
>
>
> I get the following traceback...
>
> Traceback (most recent call last):
>   File "manage.py", line 14, in 
> execute_from_command_line(sys.argv)
>   File
> "/home/cameron/.pyenv/versions/django18/lib/python3.3/site-packages/django/core/management/__init__.py",
> line 354, in execute_from_command_line
> utility.execute()
>   File
> "/home/cameron/.pyenv/versions/django18/lib/python3.3/site-packages/django/core/management/__init__.py",
> line 346, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File
> "/home/cameron/.pyenv/versions/django18/lib/python3.3/site-packages/django/core/management/base.py",
> line 394, in run_from_argv
> self.execute(*args, **cmd_options)
>   File
> "/home/cameron/.pyenv/versions/django18/lib/python3.3/site-packages/django/core/management/base.py",
> line 445, in execute
> output = self.handle(*args, **options)
>   File
> "/home/cameron/.pyenv/versions/django18/lib/python3.3/site-packages/mezzanine/core/management/commands/collecttemplates.py",
> line 42, in handle
> to_dir = settings.TEMPLATE_DIRS[0]
> IndexError: tuple index out of range
>
>
> So I added the following to settings.py which solved my problem but I got
> a message saying that it was no longer the way to do it...
>
> TEMPLATE_DIRS = (
> PROJECT_ROOT + '/templates',
> )
>
> WARNINGS:
> ?: (1_8.W001) The standalone TEMPLATE_* settings were deprecated in Django
> 1.8 and the TEMPLATES dictionary takes precedence. You must put the values
> of the following settings into your default TEMPLATES dict: TEMPLATE_DIRS.
>
> Copied 1 template
>
>
>
> The TEMPLATES section is just standard. I haven't changed it. It's already
> got a path for "templates" but it doesn't seem to use it.
>
> TEMPLATES = [
> {
> "BACKEND": "django.template.backends.django.DjangoTemplates",
> "DIRS": [
> os.path.join(PROJECT_ROOT, "templates")
> ],
> "APP_DIRS": True,
> "OPTIONS": {
> "context_processors": [
> "django.contrib.auth.context_processors.auth",
> "django.contrib.messages.context_processors.messages",
> "django.template.context_processors.debug",
> "django.template.context_processors.i18n",
> "django.template.context_processors.static",
> "django.template.context_processors.media",
> "django.template.context_processors.request",
> "django.template.context_processors.tz",
> "mezzanine.conf.context_processors.settings",
> "mezzanine.pages.context_processors.page",
> ],
> "builtins": [
> "mezzanine.template.loader_tags",
> ],
> },
> },
> ]
>
>
>
> So, how am I meant to do it???
>
> Thanks.
>
> --
> 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.
>



-- 
Stephen McDonald
http://jupo.org

-- 
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] Templates

2016-04-18 Thread Cameron Burnett
Probably an easy question. I'm just a little confused about how the 
templates are meant to work. I'm using Mezzanine 4.1.0, Django 1.8.11, and 
Python 3.3.6.

If I run...

python manage.py collecttemplates -t base.html


I get the following traceback...

Traceback (most recent call last):
  File "manage.py", line 14, in 
execute_from_command_line(sys.argv)
  File 
"/home/cameron/.pyenv/versions/django18/lib/python3.3/site-packages/django/core/management/__init__.py",
 
line 354, in execute_from_command_line
utility.execute()
  File 
"/home/cameron/.pyenv/versions/django18/lib/python3.3/site-packages/django/core/management/__init__.py",
 
line 346, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File 
"/home/cameron/.pyenv/versions/django18/lib/python3.3/site-packages/django/core/management/base.py",
 
line 394, in run_from_argv
self.execute(*args, **cmd_options)
  File 
"/home/cameron/.pyenv/versions/django18/lib/python3.3/site-packages/django/core/management/base.py",
 
line 445, in execute
output = self.handle(*args, **options)
  File 
"/home/cameron/.pyenv/versions/django18/lib/python3.3/site-packages/mezzanine/core/management/commands/collecttemplates.py",
 
line 42, in handle
to_dir = settings.TEMPLATE_DIRS[0]
IndexError: tuple index out of range


So I added the following to settings.py which solved my problem but I got a 
message saying that it was no longer the way to do it...

TEMPLATE_DIRS = (
PROJECT_ROOT + '/templates',
)

WARNINGS:
?: (1_8.W001) The standalone TEMPLATE_* settings were deprecated in Django 
1.8 and the TEMPLATES dictionary takes precedence. You must put the values 
of the following settings into your default TEMPLATES dict: TEMPLATE_DIRS.

Copied 1 template



The TEMPLATES section is just standard. I haven't changed it. It's already 
got a path for "templates" but it doesn't seem to use it.

TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [
os.path.join(PROJECT_ROOT, "templates")
],
"APP_DIRS": True,
"OPTIONS": {
"context_processors": [
"django.contrib.auth.context_processors.auth",
"django.contrib.messages.context_processors.messages",
"django.template.context_processors.debug",
"django.template.context_processors.i18n",
"django.template.context_processors.static",
"django.template.context_processors.media",
"django.template.context_processors.request",
"django.template.context_processors.tz",
"mezzanine.conf.context_processors.settings",
"mezzanine.pages.context_processors.page",
],
"builtins": [
"mezzanine.template.loader_tags",
],
},
},
]



So, how am I meant to do it???

Thanks.

-- 
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] Re: Adding pagination to Mezzanine TabularDynamicInlineAdmin

2016-04-18 Thread Cajoline
Hi !

For exemple, if you want paginate TabularDynamicInline or 
StackedDynamiqueInline model, create a page_processor for your model page
and paginate Tabular Model look at this:

https://gist.github.com/Cajoline/99a7610fad9f97567b35e4a635504d57


Le samedi 4 juillet 2015 20:19:52 UTC+2, Lee H. a écrit :
>
> I get how to do this on a normal page, but I'm still struggling to see how 
> to do this in the Mezz admin. Which views/templates should I be looking at 
> in order to wrap the code that generates the tabular inlines in a {% 
> pagination_for ... %} etc
>
> On Wednesday, 1 July 2015 00:33:03 UTC+7, Lee H. wrote:
>>
>>
>> Many thanks Josh, that's very helpful!
>>
>

-- 
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.