[mezzanine-users] fabfile for subversion questions

2014-10-06 Thread Mike Dewhirst
I have been using Subversion for years. It doesn't seem to be broken.

So I'm trying to broaden fabfile.py to also use subversion and don't know 
what this means in the deploy method ...

# approximately line 503
last_commit = "git rev-parse HEAD" if git else "hg id -i"

I have tried to decipher the git docs and tutorials but don't understand 
them. Can someone please explain for me what "hg -d -i" means? In 
particular, I want to work out what svn command would do the same thing. 

Looking at http://mezzanine.jupo.org/docs/deployment.html it would seem the 
fabfile is expecting to find Mezzanine in my repo. In which case, I am 
responsible for merging any revisions from 
https://github.com/stephenmcd/mezzanine/archive/master.zip when new 
releases are announced. That is not so much a question as an assumption.

And the rollback method looks a bit tricky. deploy would need to have 
backed up the svn revision number.  But anyway, what does "git pull origin 
master" or "hg pull && hg up" mean in the context of a rollback? Sounds to 
me it is more like an update from the master.

Second last question: Is there a killer reason related to Mezzanine I 
should investigate and maybe start using Mercurial?

Final question: Is it actually worthwhile tweaking fabfile so it can also 
handle svn?

Thanks

Mike

-- 
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] Having trouble deploying.

2014-12-23 Thread Mike Dewhirst

On 24/12/2014 2:43 AM, Ken Bolton wrote:




Some would respond to this by saying they got Mezzanine working under
Ubuntu 14 or running under uWSGI or behind Apache. That is great and
pride in that accomplishment is valid. They value challenge and will
push the field forward. Individuals are strongly encouraged to package
their deployment into a Fabric script for inclusion in Mezzanine. I
would be delighted to provide assistance in the task.


I tweaked the fabric file so it will deploy from subversion as well as 
git/mercurial (but untested wit git/mercurial) to Ubuntu 14.04. I stuck 
with gunicorn and nginx. It is yours if that helps ...


Mike








--
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] Re: IntegrityError when importing fixtures to postgres Key (page_ptr_id)

2015-04-27 Thread Mike Dewhirst

Marek

I have never tried fixtures in Mezzanine but I have just learned that I
must abandon dumpdata fixtures for unit testing in migrated apps in 
ordinary Django. This was in an upgrade attempt from 1.6 to 1.7.


makemigrations worked, the upgrade succeeded with migrate --fake, the 
project runs in 1.7 but trying to test with fixtures is a disaster.


I'm currently investigating factory-boy and model-mommy with a view to
replacing fixtures completely for >= 1.7. Which is probably a red 
herring for your scenario.


If you are just trying to reload an unchanged database from dumpdata and 
you can re-dump that data you might be able to choose the natural key 
option with better success.


Using Postgres to dump and reload will also work if there is no change 
to the schema. In the past I have edited the Postgres dump successfully 
for minor schema tweaks but I'm hoping in future migration will make 
that unnecessary.


Good luck

Mike

On 28/04/2015 10:45 AM, ma...@webounty.com wrote:

Tried a new db again, this time migrating my app so that the
constraint was included, and loading the Mezzanine pages fixture
before my own. Still got the error when importing my pages:

DETAIL:  Key (page_ptr_id)=(11) is not present in table "pages_page"

On Monday, April 27, 2015 at 5:23:47 PM UTC-7, ma...@webounty.com
wrote:

I found my pages weren't showing up in admin, so I also did: $ python
manage.py loaddata pages and then imported that into the new db as
well.  Though after trying to go into admin I got the error:

Could not load the model for the following page, was it removed?
"MyPage"

I found posts here from a few years ago that recommended against
using dumpdata or loaddata with Mezzanine.  Should I just be
resorting to pg_dump for all of this?



On Monday, April 27, 2015 at 4:56:14 PM UTC-7, ma...@webounty.com
wrote:

So I tried a few more times and was able to get passed the
IntegrityError when importing fixtures.  However, I don't feel
confident about the way I did it.

I ended being able to get rid of the constraint on my app's page
table by faking the migration of my app.  However, in order to do
that, I first ran: $ python manage.py createdb - and had it crash
after "Synchronizing apps without migrations" with the
InvalidBaseError mentioned before.  After that I ran: $ python
manage.py makemigrations my_app Then: $ python manage.py createdb -
again.  Only when in that order would the migration of my app be
faked.  I'm curious if anyone can recommend a better
process/solution?


On Monday, April 27, 2015 at 2:35:10 PM UTC-7, ma...@webounty.com
wrote:

Hi Mezzanine Users!  Been running into an issue that have made it
hard to deploy reliably on other machines.  I'm fairly new to
Django/Mezzanine, so it may be my process that needs tweaking.  I'm
also trying to develop on very recent releases, which could be the
bigger issue.  I'm running Mezzanine from source on Github, with
Django 1.7.7, Python 3, and Postgres.

While trying to run migrations on a new database, I often ran into:
InvalidBasesError: Cannot resolve bases for []

Which I would resolve by first manually running, python manage.py
makemigrations 'my_app' Then: python manage.py createdb

Things seemed fine, until I tried importing fixtures for those pages,
and I got the error:

psycopg2.IntegrityError: insert or update on table
"my_app_page_model" violates foreign key constraint
"my_app_in_page_ptr_id_617c7a37bb2eb82e_fk_pages_page_id" DETAIL:
Key (page_ptr_id)=(11) is not present in table "pages_page".

SQLite is much more forgiving with the constraints and doesn't throw
these errors.  However, looking at the schema in either Postgres or
SQLite, I can confirm that the page_ptr_id field is not present on
the pages_page model. Is it supposed to be added by the first
migration of my app?  Seems like the migration is being ignored,
whether it gets "FAKED" or not.  I've run "createdb" on a new db
without the "FAKED" message, and still the fields don't get created.

The 0001_initial.py migration file for my app includes lines like the
following:

fields=[ ('page_ptr', models.OneToOneField(auto_created=True,
serialize=False, to='pages.Page', parent_link=True,
primary_key=True)), ],

I've tried removing "auto_created" as some digging led me to believe
it was intended for Django 1.8, but still no luck in getting the
fields created on pages_page model.  Any suggestions?  Am I just
asking for too many headaches by trying to fit Mezz from source on
Django 1.7.7 right now?

Thanks! Marek

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

Re: [mezzanine-users] Re: IntegrityError when importing fixtures to postgres Key (page_ptr_id)

2015-04-27 Thread Mike Dewhirst

On 28/04/2015 1:09 PM, ma...@webounty.com wrote:

Thanks Mike!

I'll steer clear of fixtures.  Seems that they are being deprecated
in favor of "data migrations".
https://docs.djangoproject.com/en/1.7/howto/initial-data/#automatically-loading-initial-data-fixtures


Yes. I'm still reviewing my options.



 I'd still be interested to know if page_ptr_id not being added to
Mezzanine pages.page is intended behavior (when inheriting Page).  If
it is, then I should always be faking the first migration of my app.


I believe that is correct. If the database exists and the schema matches 
your models then fake the first migration.


If it doesn't match, change your models to match then fake the first 
migration. Then adjust/migrate until you achieve nirvana.


Mike


 Otherwise, the extra constraint gets added to my_pages table without
a corresponding key in the pages_page table.  Seems bad... maybe
not?


On Monday, April 27, 2015 at 6:36:47 PM UTC-7, Mike Dewhirst wrote:

Marek

I have never tried fixtures in Mezzanine but I have just learned that
I must abandon dumpdata fixtures for unit testing in migrated apps
in ordinary Django. This was in an upgrade attempt from 1.6 to 1.7.

makemigrations worked, the upgrade succeeded with migrate --fake,
the project runs in 1.7 but trying to test with fixtures is a
disaster.

I'm currently investigating factory-boy and model-mommy with a view
to replacing fixtures completely for >= 1.7. Which is probably a red
herring for your scenario.

If you are just trying to reload an unchanged database from dumpdata
and you can re-dump that data you might be able to choose the natural
key option with better success.

Using Postgres to dump and reload will also work if there is no
change to the schema. In the past I have edited the Postgres dump
successfully for minor schema tweaks but I'm hoping in future
migration will make that unnecessary.

Good luck

Mike

On 28/04/2015 10:45 AM, ma...@webounty.com  wrote:

Tried a new db again, this time migrating my app so that the
constraint was included, and loading the Mezzanine pages fixture
before my own. Still got the error when importing my pages:

DETAIL:  Key (page_ptr_id)=(11) is not present in table
"pages_page"

On Monday, April 27, 2015 at 5:23:47 PM UTC-7, ma...@webounty.com
wrote:

I found my pages weren't showing up in admin, so I also did: $

python

manage.py loaddata pages and then imported that into the new db as
well.  Though after trying to go into admin I got the error:

Could not load the model for the following page, was it removed?
"MyPage"

I found posts here from a few years ago that recommended against
using dumpdata or loaddata with Mezzanine.  Should I just be
resorting to pg_dump for all of this?



On Monday, April 27, 2015 at 4:56:14 PM UTC-7, ma...@webounty.com
wrote:

So I tried a few more times and was able to get passed the
IntegrityError when importing fixtures.  However, I don't feel
confident about the way I did it.

I ended being able to get rid of the constraint on my app's page
table by faking the migration of my app.  However, in order to do
that, I first ran: $ python manage.py createdb - and had it crash
after "Synchronizing apps without migrations" with the
InvalidBaseError mentioned before.  After that I ran: $ python
manage.py makemigrations my_app Then: $ python manage.py createdb
- again.  Only when in that order would the migration of my app be
faked.  I'm curious if anyone can recommend a better
process/solution?


On Monday, April 27, 2015 at 2:35:10 PM UTC-7, ma...@webounty.com
wrote:

Hi Mezzanine Users!  Been running into an issue that have made it
hard to deploy reliably on other machines.  I'm fairly new to
Django/Mezzanine, so it may be my process that needs tweaking.
I'm also trying to develop on very recent releases, which could be
the bigger issue.  I'm running Mezzanine from source on Github,
with Django 1.7.7, Python 3, and Postgres.

While trying to run migrations on a new database, I often ran
into: InvalidBasesError: Cannot resolve bases for []

Which I would resolve by first manually running, python manage.py
makemigrations 'my_app' Then: python manage.py createdb

Things seemed fine, until I tried importing fixtures for those

pages,

and I got the error:

psycopg2.IntegrityError: insert or update on table
"my_app_page_model" violates foreign key constraint
"my_app_in_page_ptr_id_617c7a37bb2eb82e_fk_pages_page_id" DETAIL:
Key (page_ptr_id)=(11) is not present in table "pages_page".

SQLite is much more forgiving with the constraints and doesn't
throw these errors.  However, looking at the schema in either
Postgres or SQLite, I can confirm that the page_ptr_id field is not
present on the pages_page model. Is it supposed to be added by the
first migration of my app?  Seems like the migration is being
ignored, whether it 

Re: [mezzanine-users] Support for multiple currencies?

2015-05-21 Thread Mike Dewhirst

On 22/05/2015 4:24 AM, longnecks@gmail.com wrote:

Dear all,

In cartridge, how can I set prices for different currencies?
E.g. I have a product that has a price in CHF, EUR and USD.
Users should be able to switch between them, independent of the
currently selected language.

Is this possible?


I think it is a bad idea to switch currencies unless someone is paying 
you to develop a switching mechanism with a very clearly defined set of 
specifications. Such as how you treat the forex swings and roundabouts.


You could end up becoming a money changer.

Currency exchange rates vary non-stop. The best strategy (IMO) is to 
choose the currency which suits the vendor and provide a link to an 
exchange-rate site. Let the buyer worry about exchanging.


Good luck

Mike



Thanks,
Claude

--
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] I just deployed my mezzanine website using fab all and the website is empty (database not found)

2015-07-29 Thread Mike Dewhirst

On 29/07/2015 5:23 PM, Bhavani Shankar wrote:

I figured there's a problem in detecting the postgresql database. I went
to local_settings.py and saw that the user and name of the database were
set to the project's name. (different from my local machine) How can I
fix this?


In settings.py you need something like this ...

DATABASES = {
'default': {
'ENGINE':   'django.db.backends.postgresql_psycopg2',
'NAME': 'project-name',
'USER': 'User',
'PASSWORD': 'secret',
'HOST': 'dbserver-host',
'PORT': '5432',
}
}

See Django docs for full detail



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


[mezzanine-users] Aborting, no hosts defined.

2015-08-11 Thread Mike Dewhirst
Trying to start up a new CMS is causing me strife with fab deploy and I 
would appreciate a hint ...


This is the dev/deploy setup:

Windows -> svn repo -> pq4 (Ubuntu server) -> (fab) -> pq5 (Ubuntu server)

fab deploy/install/create on pq4 delivers the "Aborting, no hosts 
defined" error.


pq4 is a Django/Apache dedicated server and I suspect the error is 
because Apache exports DJANGO_SETTINGS_MODULE for *that* non-CMS 
project. I don't really know but I can't play with it.


I have installed virtualenv (mez4) on pq4 in the hope I can isolate the

pq5 is the production server for the CMS. It used to work under Django 
1.6.x and Mezzanine 3.x but is now broken causing me much distress. I 
have tried and failed to get it going again as such. So then I figured a 
complete fresh install under Django 1.8 and Mezzanine 4 might get it 
going again and I could reload the data from backup.


How can I get past this error?

Thanks

Mike

--
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] Aborting, no hosts defined.

2015-08-11 Thread Mike Dewhirst
Stephen

On Wednesday, August 12, 2015 at 9:57:14 AM UTC+10, Stephen McDonald wrote:
>
> Searching for the error message would hopefully lead you to the fabfile in 
> your project:
>
>
> https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/project_template/fabfile.py#L42
>
> Try debugging there.
>

Thanks Stephen, yes. That was why I said I suspected the other Django 
project. 

I have just rolled back Django to 1.6.11 and Mezzanine to 3.1.10 on both 
machines (pq4 and pq5) and the error has gone away and the CMS is working. 

That has introduced a 500 error on a particular URL on the other project 
which was using Django 1.7.9 so I'll try and fix that next. 

I think I'll wait until the other project can be upgraded to 1.8.x and then 
upgrade everything at once. I'll try and introduce virtualenv for the other 
project. Except I have a 24hr flight on Sunday so that will have to wait a 
month.

Distress somewhat dissolved :)

Cheers

Mike


 

>
> On Tue, Aug 11, 2015 at 11:16 PM, Mike Dewhirst  > wrote:
>
>> Trying to start up a new CMS is causing me strife with fab deploy and I 
>> would appreciate a hint ...
>>
>> This is the dev/deploy setup:
>>
>> Windows -> svn repo -> pq4 (Ubuntu server) -> (fab) -> pq5 (Ubuntu server)
>>
>> fab deploy/install/create on pq4 delivers the "Aborting, no hosts 
>> defined" error.
>>
>> pq4 is a Django/Apache dedicated server and I suspect the error is 
>> because Apache exports DJANGO_SETTINGS_MODULE for *that* non-CMS project. I 
>> don't really know but I can't play with it.
>>
>> I have installed virtualenv (mez4) on pq4 in the hope I can isolate the
>>
>> pq5 is the production server for the CMS. It used to work under Django 
>> 1.6.x and Mezzanine 3.x but is now broken causing me much distress. I have 
>> tried and failed to get it going again as such. So then I figured a 
>> complete fresh install under Django 1.8 and Mezzanine 4 might get it going 
>> again and I could reload the data from backup.
>>
>> How can I get past this error?
>>
>> Thanks
>>
>> Mike
>>
>> -- 
>> 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.


[mezzanine-users] index.html image problem

2015-08-14 Thread Mike Dewhirst

Is there a rule which says index.html cannot extend base.html?

It does seem to work - at least until I try and use an  tag. It 
then barfs with an uninformative "there has been an error" or similar.


The base.html blocks all render nicely - but not the content.

Could it be that I need a plain and self-contained index.html page which 
is not a Django template?


Thanks

Mike

--
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] index.html image problem

2015-08-14 Thread Mike Dewhirst

On 14/08/2015 11:59 PM, Ryne Everett wrote:

Is there a rule which says index.html cannot extend base.html?


No. That's what I do.

It does seem to work - at least until I try and use an  tag. It
then barfs with an uninformative "there has been an error" or similar.


I suspect a more detailed error message will be necessary to figure out
what's going wrong. I'm assuming this message is in the logs?


Thanks Ryne, unfortunately no. Nothing in the supervisor, gunicorn or 
nginx logs. Are there any others?




On Fri, Aug 14, 2015 at 9:14 AM, Mike Dewhirst mailto:mi...@dewhirst.com.au>> wrote:

Is there a rule which says index.html cannot extend base.html?

It does seem to work - at least until I try and use an  tag. It
then barfs with an uninformative "there has been an error" or similar.

The base.html blocks all render nicely - but not the content.

Could it be that I need a plain and self-contained index.html page
which is not a Django template?

Thanks

Mike

--
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
<mailto:mezzanine-users%2bunsubscr...@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
<mailto: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] index.html image problem

2015-08-14 Thread Mike Dewhirst

On 15/08/2015 10:45 AM, Ryne Everett wrote:

Thanks Ryne, unfortunately no. Nothing in the supervisor, gunicorn
or nginx logs. Are there any others?


Oh, I didn't realize this was a production environment. Do you
experience the same thing using runserver? Also, where are you getting
the "uninformative "there has been an error" or similar"?


In the middle of the space for content. The base.html menus all appear OK.

BTW, I suspected my image at first and swapped it with the same image 
which appears successfully in the top menu. I copied and pasted these 
lines from base.html ...



width="271" />



... which are inside the base.html container div

I also tried it without the  tags.

I appreciate your persistence. Thanks.

Mike



On Fri, Aug 14, 2015 at 8:00 PM, Mike Dewhirst mailto:mi...@dewhirst.com.au>> wrote:

On 14/08/2015 11:59 PM, Ryne Everett wrote:

    Is there a rule which says index.html cannot extend base.html?


No. That's what I do.

    It does seem to work - at least until I try and use an
 tag. It
    then barfs with an uninformative "there has been an error"
or similar.


I suspect a more detailed error message will be necessary to
figure out
what's going wrong. I'm assuming this message is in the logs?


Thanks Ryne, unfortunately no. Nothing in the supervisor, gunicorn
or nginx logs. Are there any others?


On Fri, Aug 14, 2015 at 9:14 AM, Mike Dewhirst
mailto:mi...@dewhirst.com.au>
<mailto:mi...@dewhirst.com.au <mailto:mi...@dewhirst.com.au>>>
wrote:

    Is there a rule which says index.html cannot extend base.html?

    It does seem to work - at least until I try and use an
 tag. It
    then barfs with an uninformative "there has been an error"
or similar.

    The base.html blocks all render nicely - but not the content.

    Could it be that I need a plain and self-contained
index.html page
    which is not a Django template?

    Thanks

    Mike

    --
    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
<mailto:mezzanine-users%2bunsubscr...@googlegroups.com>
    <mailto:mezzanine-users%2bunsubscr...@googlegroups.com
<mailto:mezzanine-users%252bunsubscr...@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
<mailto:mezzanine-users%2bunsubscr...@googlegroups.com>
<mailto:mezzanine-users+unsubscr...@googlegroups.com
<mailto:mezzanine-users%2bunsubscr...@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
<mailto:mezzanine-users%2bunsubscr...@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
<mailto: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] index.html image problem

2015-08-14 Thread Mike Dewhirst

On 15/08/2015 10:45 AM, Ryne Everett wrote:

Thanks Ryne, unfortunately no. Nothing in the supervisor, gunicorn
or nginx logs. Are there any others?


Oh, I didn't realize this was a production environment. Do you
experience the same thing using runserver?


Sorry, meant to answer this. It is a long story but I can't use 
runserver at the moment. I'm developing on Windows, updating from the 
repo on a spare Ubuntu server with no GUI and using fab deploy to get it 
across to the production server - also sans GUI.


TLDR: Before wheels I could get anything working on Windows by using 
Chris Gholke's nightly binaries. But now it seems I need a Microsoft C++ 
compiler. I'm thinking I now need to find some brainspace for Virtualbox 
so I can run a Linux GUI for development. And then move acres of stuff 
across. I feel depressed just thinking about it. I'm locked into Windows 
for various reasons.


Thanks again

Mike

Also, where are you getting

the "uninformative "there has been an error" or similar"?

On Fri, Aug 14, 2015 at 8:00 PM, Mike Dewhirst mailto:mi...@dewhirst.com.au>> wrote:

On 14/08/2015 11:59 PM, Ryne Everett wrote:

    Is there a rule which says index.html cannot extend base.html?


No. That's what I do.

    It does seem to work - at least until I try and use an
 tag. It
    then barfs with an uninformative "there has been an error"
or similar.


I suspect a more detailed error message will be necessary to
figure out
what's going wrong. I'm assuming this message is in the logs?


Thanks Ryne, unfortunately no. Nothing in the supervisor, gunicorn
    or nginx logs. Are there any others?


On Fri, Aug 14, 2015 at 9:14 AM, Mike Dewhirst
mailto:mi...@dewhirst.com.au>
<mailto:mi...@dewhirst.com.au <mailto:mi...@dewhirst.com.au>>>
wrote:

    Is there a rule which says index.html cannot extend base.html?

    It does seem to work - at least until I try and use an
 tag. It
    then barfs with an uninformative "there has been an error"
or similar.

    The base.html blocks all render nicely - but not the content.

    Could it be that I need a plain and self-contained
index.html page
    which is not a Django template?

    Thanks

    Mike

    --
    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
<mailto:mezzanine-users%2bunsubscr...@googlegroups.com>
    <mailto:mezzanine-users%2bunsubscr...@googlegroups.com
<mailto:mezzanine-users%252bunsubscr...@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
<mailto:mezzanine-users%2bunsubscr...@googlegroups.com>
<mailto:mezzanine-users+unsubscr...@googlegroups.com
<mailto:mezzanine-users%2bunsubscr...@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
<mailto:mezzanine-users%2bunsubscr...@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
<mailto: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] index.html image problem

2015-08-15 Thread Mike Dewhirst

On 15/08/2015 11:37 PM, Ryne Everett wrote:

Sorry, meant to answer this. It is a long story but I can't use
runserver at the moment. I'm developing on Windows, updating from
the repo on a spare Ubuntu server with no GUI and using fab deploy
to get it across to the production server - also sans GUI.


Ah, I figured it was something like that. Well even if you can't use
runserver you ought to find some way to log verbosely for debugging. The
most reasonable way would probably be to use the DJANGO_SETTINGS_MODULE
environmental variable to point to an alternative settings.py with
DEBUG=True. You'll may need to set up logging
<https://docs.djangoproject.com/en/1.8/topics/logging/> manually in
order to get the verbose output.


Thank you kind sir! I'm packing to get on a long flight so it might be a 
day or so before I can tackle that. It hadn't occurred to me to look at 
it with DEBUG true.


Cheers

Mike



On Sat, Aug 15, 2015 at 2:46 AM, Mike Dewhirst mailto:mi...@dewhirst.com.au>> wrote:

On 15/08/2015 10:45 AM, Ryne Everett wrote:

    Thanks Ryne, unfortunately no. Nothing in the supervisor,
gunicorn
    or nginx logs. Are there any others?


Oh, I didn't realize this was a production environment. Do you
experience the same thing using runserver?


Sorry, meant to answer this. It is a long story but I can't use
runserver at the moment. I'm developing on Windows, updating from
the repo on a spare Ubuntu server with no GUI and using fab deploy
to get it across to the production server - also sans GUI.

TLDR: Before wheels I could get anything working on Windows by using
Chris Gholke's nightly binaries. But now it seems I need a Microsoft
C++ compiler. I'm thinking I now need to find some brainspace for
Virtualbox so I can run a Linux GUI for development. And then move
acres of stuff across. I feel depressed just thinking about it. I'm
locked into Windows for various reasons.

Thanks again

Mike

Also, where are you getting

the "uninformative "there has been an error" or similar"?

On Fri, Aug 14, 2015 at 8:00 PM, Mike Dewhirst
mailto:mi...@dewhirst.com.au>
<mailto:mi...@dewhirst.com.au <mailto:mi...@dewhirst.com.au>>>
wrote:

    On 14/08/2015 11:59 PM, Ryne Everett wrote:

            Is there a rule which says index.html
cannot extend base.html?


        No. That's what I do.

            It does seem to work - at least until I
try and use an
         tag. It
            then barfs with an uninformative "there
has been an error"
        or similar.


        I suspect a more detailed error message will be
necessary to
        figure out
        what's going wrong. I'm assuming this message is in
the logs?


    Thanks Ryne, unfortunately no. Nothing in the supervisor,
    gunicorn
    or nginx logs. Are there any others?


        On Fri, Aug 14, 2015 at 9:14 AM, Mike Dewhirst
        mailto:mi...@dewhirst.com.au> <mailto:mi...@dewhirst.com.au
<mailto:mi...@dewhirst.com.au>>
        <mailto:mi...@dewhirst.com.au
<mailto:mi...@dewhirst.com.au> <mailto:mi...@dewhirst.com.au
<mailto:mi...@dewhirst.com.au>>>>
        wrote:

            Is there a rule which says index.html
cannot extend base.html?

            It does seem to work - at least until I
try and use an
         tag. It
            then barfs with an uninformative "there
has been an error"
        or similar.

            The base.html blocks all render nicely -
but not the content.

            Could it be that I need a plain and
self-contained
        index.html page
            which is not a Django template?

            Thanks

            Mike

            --
            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
<mailto:mezzanine-users%2bunsubscr...@googlegroups.com>
      Â
<mailto

Re: [mezzanine-users] Why custom css is not being applied

2015-09-04 Thread Mike Dewhirst

On 2/09/2015 5:38 AM, automotive...@gmail.com wrote:

It seems that my custom css styles for my home page and content pages
are no longer being applied.

I applied them via additional css files and listed those add'l files
after the default css files that ship with Mezzanine. I did it that way
so that my added styles aren't deleted on upgrades. Â Its been awhile
since I worked on the CMS part (Mezzanine) of my website but I don't see
that having anything to do with it.

I used home.css for home page and custom.site.css for the content pages
and it seems that those styles simply aren't being applied, the files
are being loaded.

The divs are in the html templates - totally stumped. Can someone point
me to some settings that I can check or have any ideas.Â

I'm on Mezzanine 3.1.10 - Django 1.6.11 - Python 2.7.6 - on Ubuntu 14.04
machine, using Google Chrome


Me too, and this works for me ... I have copied base.html into my 
project templates directory and edited the following extra_css block:


{% block extra_css %}

{% endblock %}

Cheers

Mike




--
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] Non-ascii slug transliteration

2016-01-10 Thread Mike Dewhirst

On 11/01/2016 1:25 PM, dboriso...@gmail.com wrote:

Yes it is but it is not that i want =)
Sorry for my poor english. May be you did not correctly understand my
previous message.
I want to convert any unicode symbols to english ascii symbols.
slugify_unicode makes url with russian characters if page title is in
russian. It is not that i want.
And django's slugify simply strips non-ascii characters. It not that I
want too.
Is there any way to convert (transliterate) unicode to ascii on the fly
without additional programming? Any config option or something like this?


I haven't seen one but I'm interested so I googled and found ...

http://stackoverflow.com/questions/816285/where-is-pythons-best-ascii-for-this-unicode-database

... which might let you get some of the transliteration done in your own 
slugify() based on Django's slugify() in django/utils/text.py. You might 
also need to maintain a list of unicode chars you don't like and replace 
them with your preferred ascii chars before using slugify.


Good luck and please post your solution

Thanks

Mike



понедельник, 11 Ñ Ð½Ð²Ð°Ñ€Ñ  2016 г., 1:48:31 UTC+3
пользователь Stephen McDonald Ð½Ð°Ð¿Ð¸Ñ Ð°Ð»:

The first dozen or so results in Google when searching for
"slugify unicode" reveal exact what you want.

On Mon, Jan 11, 2016 at 12:01 AM, >
wrote:

Hi guys,

I have a site with russian locale and want to convert non-ascii
slugs into ascii one to avoid ugly urlencoded urls.
I've replaced Mezzanine's slugify with Django's
default django.template.defaultfilters.slugify but it just
strips non-ascii characters but i want to transliterate them.
Is there any way to do it in Mezzanine without making own slugify?

Thnx for any answer.

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


--
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] keepachangelog.com

2016-05-31 Thread Mike Dewhirst

On 1/06/2016 6:12 AM, Ryne Everett wrote:

 ### Why can’t people just use a `git log` diff?

Because log diffs are full of noise — by nature. They could not make a 
suitable
change log even in a hypothetical project run by perfect humans who never 
make
typos, never forget to commit new files, never miss any part of a 
refactoring.
The purpose of a commit is to document one atomic step in the process by 
which
the code evolves from one state to another. The purpose of a change log is 
to
document the noteworthy differences between these states.



We use Trac for ticketing and modified the ticket to include a custom 
field called, wait for it ... "Release note" ... which is filled in when 
the ticket is written. It contains the exact words the ticket writers 
want used when release notes are compiled.



--
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] How to adjust page width without Twitter feed

2017-06-19 Thread Mike Dewhirst

I have commented out the twitter app and base template like this ...





{% block left_panel %}
{% page_menu 
"pages/menus/tree.html" %}

{% endblock %}



{% block main %}{% endblock %}


{% comment %}
  
{% nevercache %}
{% include "includes/user_panel.html" %}
{% endnevercache %}

  
  {% block right_panel %}
   {% ifinstalled mezzanine.twitter %}
   {% include "twitter/tweets.html" %}
   {% endifinstalled %}
  {% endblock %}
  

  
{% endcomment %}




... and it has disappeared successfully. My question is - how do I widen 
the main part of the page to take advantage of the new space?


Thanks for any hints

Mike

--
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] How to adjust page width without Twitter feed

2017-06-19 Thread Mike Dewhirst

:) :) :)

Thank you Ken

M

On 20/06/2017 1:01 AM, Ken Bolton wrote:


On Mon, Jun 19, 2017 at 10:45 AM, Mike Dewhirst <mailto:mi...@dewhirst.com.au>> wrote:







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


[mezzanine-users] wysiwyg

2017-06-20 Thread Mike Dewhirst
How should I get wysiwyg editing happening in Mezzanine 4.2.3? Django 
1.10 and Py2.7


The docs seem to suggest it is already there. I can see tinymce in the 
grapelli folder. I have run collectstatic but no cigar.


Is it documented?

Do I follow the Django way and install django-tinymce?

Thanks

Mike

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

2017-06-20 Thread Mike Dewhirst

On 21/06/2017 11:48 AM, Ryne Everett wrote:

Tinymce comes bundled with the project. Once you log into the admin a
lot of content becomes inline-editable if that's what you're after.

Ryne

Yes it is. I installed Django 1.10.7 and Mezzanine 4.2.3 in a 
virtualenv, adopted the identical database (Postgres 9.3) previously 
used by Mezzanine 3.?, migrated the tables and pointed Gunicorn to the 
new wsgi file.


It all worked splendidly except the page contents in the Admin had no 
tinymce controls and the field contents are plain text with html markup 
everywhere.


The website is working fine but I'd like tinymce to wake itself up 
before I try and edit anything.


I have to admit to being terribly unfamiliar with Mezzanine. I got it 
going a few years ago and have just used it for (very) plain and (very) 
ordinary content management. I realise ignorance and forgetfulness is no 
excuse but I have done a bit of rtfm and it seems tinymce should 
actually be working.


Is it possible there needs to be something updated in the data?

Thanks for responding

Mike






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

2017-06-22 Thread Mike Dewhirst

On 21/06/2017 8:18 PM, Melvyn Sopacua wrote:

On Wednesday 21 June 2017 14:48:52 Mike Dewhirst wrote:

On 21/06/2017 11:48 AM, Ryne Everett wrote:

Tinymce comes bundled with the project. Once you log into the admin
a
lot of content becomes inline-editable if that's what you're after.

Ryne

Yes it is. I installed Django 1.10.7 and Mezzanine 4.2.3 in a
virtualenv, adopted the identical database (Postgres 9.3) previously
used by Mezzanine 3.?, migrated the tables and pointed Gunicorn to the
new wsgi file.

It all worked splendidly except the page contents in the Admin had no
tinymce controls and the field contents are plain text with html
markup everywhere.

Your first order of business is to determine where the problem is:
- Is the js/css for tinymce inserted into the HTML? (backend issue)

Yes - see  section below for an admin page

- Are there js errors generated because it's not found or ordering
problems or ... ? (frontend issue)
Can't see anything in the supervisord log. No files in 
/var/log/gunicorn. Nothing of interest in the nginx log.


What you're looking for in the source is:






I have checked to see they all exist in 
~/mike/envs/m4d10p2/mezpq5/static/...


I also took the following static dirs out-of-play by prefixing them with 
'x' so the ones in site-packages/mezzanine/core/static would be used. 
I'm guessing they all ended up there because I ran collectstatic a day 
or so ago.


xadmin
xcss
xfilebrowser
xfonts
xgrappelli
xjs
xmezzanine

The virtualenv is active. gunicorn and nginx have both been restarted. 
The public side of the site is working. Admin is working excpt for 
needing to hand-edit html.


Here is the  to  section (verbatim) from an admin page 
(wonder why it isn't html5?) ...



"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>

http://www.w3.org/1999/xhtml"; lang="en" xml:lang="en" >

Change Rich text page | Mezzanine








href="/static/grappelli/css/base.css" />




</pre><tt>/* These are set in PageAdmin's view methods, and 
</tt><tt>mezzanine.utils.admin.SingletonAdmin */
</tt><pre style="margin: 0em;">

















window.__home_link = '<a href="/">View site</a>';
</pre><tt>window.__csrf_token = 
</tt><tt>'oH3MgFIrkDtzbDM3z1QtbhthlD3O88NTN3B8j9gW71fi1vRoNIEfh4NP7F7PqJEl';
</tt><pre style="margin: 0em;">
window.__admin_keywords_submit_url = '/admin/admin_keywords_submit/';
window.__filebrowser_url = '/admin/media-library/browse/';
window.__link_list_url = '/admin/displayable_links.js';
window.__tinymce_css = '/static/mezzanine/css/tinymce.css';
window.__admin_url = '/admin/';
window.__static_proxy = '/admin/asset_proxy/';
window.__admin_media_prefix__ = '/static/admin/';
window.__grappelli_installed = true;
window.__admin_menu_collapsed = false;
window.__language_code = 'en';



<tt>src="/static/mezzanine/js/jquery-1.8.3.min.js">


// Ensures jQuery does not pollute the global namespace
$.noConflict();

var ADMIN_URL = "/admin/";



jQuery(function($) {
$('.admin-title').click(function() {location = window.__admin_url;});
</pre><tt>// This line can be removed after a decent amount of time has 
</tt><tt>passed since
</tt><tt>// <a  rel="nofollow" href="https://github.com/stephenmcd/grappelli-safe/pull/56/files">https://github.com/stephenmcd/grappelli-safe/pull/56/files</a> 
</tt><tt>occurring.
</tt><pre style="margin: 0em;">
$("#id_sitepermissions-__prefix__-sites").parent().parent().parent().remove();
});




media="all" rel="stylesheet" />


<tt>src="/static/admin/js/vendor/jquery/jquery.js">
<tt>src="/static/admin/js/jquery.init.js">
<tt>src="/static/admin/js/admin/RelatedObjectLookups.js">



<tt>src="/static/admin/js/prepopulate.js">
<tt>src="/static/admin/js/vendor/xregexp/xregexp.js">


<tt>src="/static/admin/js/admin/DateTimeShortcuts.js">
<tt>src="/static/mezzanine/tinymce/tinymce.min.js">
<tt>src="/static/mezzanine/tinymce/jquery.tinymce.min.js">
<tt>src="/static/mezzanine/js/tinymce_setup.js">
<tt>src="/static/mezzanine/js/admin/keywords_field.js">











Thank you for you focus

Cheers

Mike


--
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] Docs typo

2017-06-25 Thread Mike Dewhirst

About a third of the way down the page at ...

http://mezzanine.jupo.org/docs/overview.html#installation

Users on Debian or Ubuntu will require some system packages to support 
the imaging library:


$ apt-get install libjpeg8 libjpeg8-dev
$ apt-get build-dep python-imaging

Ubuntu 16.04 returns an error ...

E: Unable to locate package build-dep

Maybe you mean build-essential?

Mike

--
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] TinyMCE debugging - Mezzanine 4, Django 10, Python 2.7

2017-08-22 Thread Mike Dewhirst
I'm revisiting a longstanding problem where the TinyMCE editor doesn't 
appear and I have edit html by hand.


Not knowing where to start I chose a page in the admin and viewed source 
and checked on the existence of all scripts which showed. On clicking 
the links, I got some 404 errors but on others the js appearead. I 
suspected missing scripts but no - they all appear to be in place. See 
"yes" below indicating I have looked in those dirs. I have stripped out 
the distracting tags here ...


href="/static/mezzanine/tinymce/tinymce.css"  404 - yes
src="/static/admin/js/core.js" OK - yes
src="/static/admin/js/vendor/jquery/jquery.js" 404 - yes
src="/static/admin/js/jquery.init.js" OK - yes
src="/static/admin/js/admin/RelatedObjectLookups.js" OK - yes
src="/static/admin/js/actions.js" OK - yes
src="/static/admin/js/urlify.js" OK - yes
src="/static/admin/js/prepopulate.js" OK - yes
src="/static/admin/js/vendor/xregexp/xregexp.js" 404 - yes
src="/static/admin/js/calendar.js" OK - yes
src="/static/admin/js/admin/DateTimeShortcuts.js" OK - yes
src="/static/mezzanine/tinymce/tinymce.min.js" 404 - yes
src="/static/mezzanine/tinymce/jquery.tinymce.min.js" 404 - yes
src="/static/mezzanine/js/tinymce_setup.js" OK - yes
src="/static/mezzanine/js/admin/keywords_field.js" OK - yes
src="/static/admin/js/collapse.js" OK - yes


The locations are apparently constructed in settings.py as follows:

# URL prefix for static files.
# Example: "http://media.lawrence.com/static/";
STATIC_URL = "/static/"

# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
STATIC_ROOT = os.path.join(PROJECT_ROOT, STATIC_URL.strip("/"))

# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://media.lawrence.com/media/";, "http://example.com/media/";
MEDIA_URL = STATIC_URL + "media/"

# Absolute filesystem path to the directory that will hold user-uploaded 
files.

# Example: "/home/media/media.lawrence.com/media/"
MEDIA_ROOT = os.path.join(PROJECT_ROOT, *MEDIA_URL.strip("/").split("/"))

I'm not sure about that asterisk.

Any ideas?

Thanks

Mike

--
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] TinyMCE debugging - Mezzanine 4, Django 10, Python 2.7

2017-08-22 Thread Mike Dewhirst

On 23/08/2017 2:05 AM, Ken Bolton wrote:

Hi Mike,

Spitballing here, have you run the "collectstatic" command?


Ken

Yes I had. But I (re-)discovered the real problem. I checked the nginx 
conf and found that in the past I had switched back to the old (Mezz 3, 
Django 1.8) site because Mezz 4 and Django 1.10 was not showing me any 
content in the Admin.


So I switched forward again, restarted nginx and refreshed the admin 
page to see no content again.


I checked the actual site and saw an Admin link top-left and clicked it. 
Bingo, everything is now working as advertised. I closed the dumb admin 
page and hope to never see it again.


Many thanks for responding. Got me going.

Cheers

Mike




-ken

On Tue, Aug 22, 2017 at 4:20 AM, Mike Dewhirst <mailto:mi...@dewhirst.com.au>> wrote:


I'm revisiting a longstanding problem where the TinyMCE editor
doesn't appear and I have edit html by hand.

Not knowing where to start I chose a page in the admin and viewed
source and checked on the existence of all scripts which showed.
On clicking the links, I got some 404 errors but on others the js
appearead. I suspected missing scripts but no - they all appear to
be in place. See "yes" below indicating I have looked in those
dirs. I have stripped out the distracting tags here ...

href="/static/mezzanine/tinymce/tinymce.css"  404 - yes
src="/static/admin/js/core.js" OK - yes
src="/static/admin/js/vendor/jquery/jquery.js" 404 - yes
src="/static/admin/js/jquery.init.js" OK - yes
src="/static/admin/js/admin/RelatedObjectLookups.js" OK - yes
src="/static/admin/js/actions.js" OK - yes
src="/static/admin/js/urlify.js" OK - yes
src="/static/admin/js/prepopulate.js" OK - yes
src="/static/admin/js/vendor/xregexp/xregexp.js" 404 - yes
src="/static/admin/js/calendar.js" OK - yes
src="/static/admin/js/admin/DateTimeShortcuts.js" OK - yes
src="/static/mezzanine/tinymce/tinymce.min.js" 404 - yes
src="/static/mezzanine/tinymce/jquery.tinymce.min.js" 404 - yes
src="/static/mezzanine/js/tinymce_setup.js" OK - yes
src="/static/mezzanine/js/admin/keywords_field.js" OK - yes
src="/static/admin/js/collapse.js" OK - yes


The locations are apparently constructed in settings.py as follows:

# URL prefix for static files.
# Example: "http://media.lawrence.com/static/
<http://media.lawrence.com/static/>"
STATIC_URL = "/static/"

# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static
files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/
<http://media.lawrence.com/static/>"
STATIC_ROOT = os.path.join(PROJECT_ROOT, STATIC_URL.strip("/"))

# URL that handles the media served from MEDIA_ROOT. Make sure to
use a
# trailing slash.
# Examples: "http://media.lawrence.com/media/
<http://media.lawrence.com/media/>", "http://example.com/media/";
MEDIA_URL = STATIC_URL + "media/"

# Absolute filesystem path to the directory that will hold
user-uploaded files.
# Example: "/home/media/media.lawrence.com/media/
<http://media.lawrence.com/media/>"
MEDIA_ROOT = os.path.join(PROJECT_ROOT,
*MEDIA_URL.strip("/").split("/"))

I'm not sure about that asterisk.

Any ideas?

Thanks

Mike

-- 
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
<mailto:mezzanine-users%2bunsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout
<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 
<mailto: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.


[mezzanine-users] captcha suggestions

2017-08-29 Thread Mike Dewhirst

Is there a clear choice for choosing a captcha app for Mezzanine?

Thanks

Mike

--
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] css or html question re image width

2017-09-18 Thread Mike Dewhirst

Sorry for being off-topic.

When the browser window size is adjusted the website images stretch and 
shrink but even maximised, never stretch to full width of the image. 
Height and width dimensions are set correctly.


They are screen shots of a Django Admin site and are therefore 
necessarily wider than the column width available in vanilla Mezzanine. 
See https://www.sharedsds.com/user-docs/quick-start/


I'm not a css/html (nor any other type of) guru so any advice will be 
reverentially followed.


Thanks

Mike

--
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] css or html question re image width

2017-09-19 Thread Mike Dewhirst

On 19/09/2017 6:43 PM, Roger van Schie wrote:
For those images, I would remove any css classes or styles that you've 
added, and just add the ".image-responsive" class from bootstrap to them.


Thanks Roger

I'm researching ".image-responsive" and will report success.

Cheers

Mike




On 19 September 2017 at 06:09, Mike Dewhirst <mailto:mi...@dewhirst.com.au>> wrote:


Sorry for being off-topic.

When the browser window size is adjusted the website images
stretch and shrink but even maximised, never stretch to full width
of the image. Height and width dimensions are set correctly.

They are screen shots of a Django Admin site and are therefore
necessarily wider than the column width available in vanilla
Mezzanine. See https://www.sharedsds.com/user-docs/quick-start/
<https://www.sharedsds.com/user-docs/quick-start/>

I'm not a css/html (nor any other type of) guru so any advice will
be reverentially followed.

Thanks

Mike

-- 
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
<mailto:mezzanine-users%2bunsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout
<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 
<mailto: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.


[mezzanine-users] mezzanine-captcha problem

2017-11-15 Thread Mike Dewhirst
I'm running Mezzanine 4.2.3, Django 1.10.8 and Python 2.7.12 and have 
just gone through all the steps specified in 
https://github.com/mjtorn/mezzanine-captcha including ...


edited settings.py
edited urls.py
migrate captcha
reloaded nginx
refreshed the mezzanine site

Unfortunately I have omitted something because no captcha is showing and 
the spammers are adding comments to my blog all the time.


What is the secret?

Thanks anyone

Mike




--
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] mezzanine-captcha problem

2017-11-15 Thread Mike Dewhirst

On 16/11/2017 12:56 AM, Iain Mac Donald wrote:

Did you remember to add:
COMMENT_FORM_CLASS = "mezzacaptcha.forms.CaptchaThreadedCommentForm"


I most certainly did. I'm happy to post settings.py if that is necessary.

Thanks

Mike




which is needed for use in the blog?

Regards,
Iain.



--
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] mezzanine-captcha problem

2017-11-15 Thread Mike Dewhirst

On 16/11/2017 9:33 AM, Iain Mac Donald wrote:

I'm using 0.0.5


That's the version I'm using


on a site and it works for me (using the instructions
on Github). The captcha doesn't appear in the blog admin but you should
see it on the front-end. The captcha should appear, as a selectable
field, on the admin contact form.


Not sure what the admin contact form might be. In the admin I have 
looked at every link and cannot see any reference to captcha. I 
re-enabled comments for one blog post and added a comment myself without 
seeing a prompt or captcha field.




I also have this set:
CAPTCHA_CHALLENGE_FUNCT = 'captcha.helpers.math_challenge'
but I don't think this is required for captcha to work.


agreed



Have you tried installing it on a fresh Mezzanine without any other
apps?


No. That is not easy for me. I'll try some other things and report back.

Thanks

Mike



Regards,
Iain.



--
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] Deploying with Python3 seems to install Python2.7

2019-04-29 Thread Mike Dewhirst
Just tried deploying Mezzanine 4.3.1 to a DigitalOcean droplet with 
Python3.6.


Fabric3 and Python3 were used on the dev machine and Python3.6 is 
installed on the droplet. It seems however that fabfile.py line 58 calls 
for python rather than python3 ...


env.manage = "%s/bin/python %s/manage.py" % (env.venv_path, env.proj_path)


I don't know enough about how virtualenv names its python interpreter so 
I may be wrong about all this. The droplet was created with Ubuntu 18.04 
and did not have Python2.7 before the deployment but it certainly did 
afterwards.


How can I get away from Python 2.7?

Thanks

Mike

--
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] Deploying with Python3 seems to install Python2.7

2019-05-05 Thread Mike Dewhirst

Ken, Travis

Thank you for your support. I found the going very boggy and have come 
to the conclusion there must be an easier way.


I'll try and find that and document it.

TL DR;

I got Mezzanine going some years ago with Python2.7 and I have dim 
memory of difficulties back then.


This time I tried really hard for a few days to tweak things so they 
worked in Python3.6 and discovered Travis's video useful but it didn't 
work for me. The process kept aborting with errors. I did try a number 
of manual installation workarounds but In the end I decided to to give 
in and just go back to Python2.7.


So I installed Py2.7 on the droplet and was about to go through the fab 
steps but decided I should first capture the exact errors I was getting 
with Py3.6 in order to report back to the list. So I cranked up a Py3.6 
machine again and used "fab remove > fab_remove.txt" and so on to 
process remove, install, create and deploy.


I can send these four text files off-list if you like. I think it would 
be too much to send on-list.


To my surprise, that installed Mezzanine on the droplet under Python3.6. 
I'm guessing it worked because I had installed Python2.7 on the droplet. 
Can't be sure but that's a strong hunch.


The SSL template side of deploy was a disaster so I started from scratch 
and went to certbot for SSL. With a bit of fiddling and adjusting 
permissions for the unix:// socket I finally got the deployed website 
running. It hasn't been my finest hour(s).


Now a semi-related question for you.

I understand virtualenv for development of a Mezzanine project but why 
is it necessary for a deployed site?


If I'm to document an easier way, I need to first state an assumed 
workflow and deployment objective for an assumed target audience.


At this point I am the easiest of target audiences. All I have done to 
"tweak" my Mezzanine deployment is disable Twitter. So that would be my 
assumed target audience.


While I am a Django developer and happily use virtualenv I deploy all 
sites from a repo directly to vhosts on staging and production machines.


Is that a fair "easy" scenario?

Thanks again

Mike


On 1/05/2019 10:26 pm, Ken Bolton wrote:

Mike,

Ignore my last email, follow the tutorial expertly produced by Travis.

-ken

On Wed, May 1, 2019 at 1:19 AM > wrote:


Thanks Ken

I have made a start but its heavy going. Mercurial demands
Python2.7 unless there is an env var HGPYTHON3=1 and then there
are pip things falling over as well.

I'll keep trying

M

On Tuesday, April 30, 2019 at 10:29:46 PM UTC+10, Ken Bolton wrote:

Hi Mike,

Fabric3 and Python3 were used on the dev machine and
Python3.6 is


You need to use an earlier version with the fabfile;
`fabric==1.2.2` works, if the mailing list archives are to be
believed. The alternative would be a rewrite of the fabfile to
account for changes in the Fabric api.
To start using python3, modify your fabfile

https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/project_template/fabfile.py#L446-L447:

apt("nginx libjpeg-dev python3-dev python3-setuptools git-core
" "postgresql libpq-dev memcached supervisor python3-pip")



Not sure what else you might have to change, but if you manage
to deploy, a pull request of your changes would be greatly
appreciated!

-ken

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


--
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] Are fabric deployments popular?

2020-02-18 Thread Mike Dewhirst

Ed

I really appreciate your work and love Mezzanine and Fabric.

I would like to see the fabfile kept in Mezzanine and enhanced slightly 
by removing repo specifics to make it repo-agnostic.


I use and support a number of Subversion repos. I have done this for 
more than a decade and although I have occasionally tried, I don't have 
the brainspace or need for Git (or Hg) as well as svn. Occasionally I'm 
forced to use it so I have to resort to googling Git recipes. It isn't 
pleasant and I always need a stiff whisky afterwards.


I once enhanced the fabfile to work with svn and was about to contribute 
it back to the project when a new release came out. That meant I needed 
to redo the work and I never did find the time to do it again. Since 
then I have been muddling along manually and my Mezz work has gradually 
diminished.


I'd be happy to contribute to any svn stuff and test it.

Cheers

Mike

On 19/02/2020 12:16 pm, Eduardo Rivas wrote:

Hello everyone,

I'm Ed, one of the collaborators helping maintain Mezzanine. As we 
prepare to release the next version of Mezzanine (supporting Python 3 
and Django 2.2 only) an issue was recently filed 
 wondering about 
the future of mezzanine's built-in fabfile (which only works with 
Python 2).


This made me wonder: Are Fabric deployments widely used by the 
community? What are your thoughts on the following options:


  * Stop maintaining a fabfile of our own and just point people to
general Django deployment docs
  * Extract the fabfile as a separate package/project
  * Keep the fabfile as part of Mezzanine

Looking forward to hearing from the community.
--
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 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mezzanine-users/02b090b5-2d83-485d-aee3-f5997da14844%40googlegroups.com 
.


--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mezzanine-users/ab47f973-5e3d-9c91-5eb8-613279cbd147%40dewhirst.com.au.