Re: [mezzanine-users] Re: Mezzanine master version in requirements.txt

2015-05-25 Thread Federico Bruni
Ok, if I use -e option then pip freeze shows the exact commit used:

-e git+
https://github.com/stephenmcd/mezzanine.git@48776c2f5e19b780349da05f14b6527ffaa165e4#egg=Mezzanine-master

Thanks
Federico


2015-05-25 14:42 GMT+02:00 Mathias Ettinger :

> You can use the -e option of pip install. Example:
> pip install -e git+
> https://github.com/stephenmcd/mezzanine.git@master#egg=Mezzanine
> pip install -e git+
> https://github.com/stephenmcd/cartridge.git@master#egg=Cartridge
>
> If you need a requirements.txt file afterwards, just use the output of pip
> freeze.
>
>
>
> Le lundi 25 mai 2015 13:07:54 UTC+2, Federico Bruni a écrit :
>>
>> Even if I install mezzanine from git repository, the requirements file
>> created by mezzanine-project will be taken from the version present in
>> project_template:
>>
>> https://github.com/stephenmcd/mezzanine/blob/081dd68c8c53893c28c6c96cca666f6db15317ca/mezzanine/project_template/requirements.txt
>>
>> that is, the last stable release.
>>
>> How can I turn this:
>>
>> $ cat requirements.txt
>> Mezzanine==3.1.10
>>
>> into a git version?
>> I need it also for deploying.
>>
>> I've read this page
>> https://pip.pypa.io/en/stable/user_guide.html#requirements-files
>> and I tried several variants of this:
>>
>> Mezzanine==git+
>> https://github.com/stephenmcd/mezzanine@master#egg=mezzanine
>>
>> but nothing works and I get this error:
>>
>> File
>> "/home/fede/.virtualenvs/mezzanine/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py",
>> line 2880, in scan_list
>> raise ValueError(msg, line, "at", line[p:])
>> ValueError: ("Expected ',' or end-of-list in", 'Mezzanine==git+
>> https://github.com/stephenmcd/mezzanine@master#egg=mezzanine', 'at', '://
>> github.com/stephenmcd/mezzanine@master#egg=mezzanine')
>>
>>
>> Thanks in advance
>> Federico
>>
>>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Mezzanine Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/mezzanine-users/Av5nZzD4bLw/unsubscribe.
> To unsubscribe from this group and all its topics, 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] Mezzanine master version in requirements.txt

2015-05-25 Thread Federico Bruni
Even if I install mezzanine from git repository, the requirements file 
created by mezzanine-project will be taken from the version present in 
project_template:
https://github.com/stephenmcd/mezzanine/blob/081dd68c8c53893c28c6c96cca666f6db15317ca/mezzanine/project_template/requirements.txt

that is, the last stable release.

How can I turn this:

$ cat requirements.txt 
Mezzanine==3.1.10

into a git version?
I need it also for deploying.

I've read this page 
https://pip.pypa.io/en/stable/user_guide.html#requirements-files
and I tried several variants of this:

Mezzanine==git+https://github.com/stephenmcd/mezzanine@master#egg=mezzanine

but nothing works and I get this error:

File 
"/home/fede/.virtualenvs/mezzanine/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py",
 
line 2880, in scan_list
raise ValueError(msg, line, "at", line[p:])
ValueError: ("Expected ',' or end-of-list in", 
'Mezzanine==git+https://github.com/stephenmcd/mezzanine@master#egg=mezzanine', 
'at', '://github.com/stephenmcd/mezzanine@master#egg=mezzanine')


Thanks in advance
Federico

-- 
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] 404 - absolute link in the github README

2015-05-19 Thread Federico Bruni
Hi all

If you go here:
https://github.com/stephenmcd/mezzanine

and click on Multi-lingual-sites you get a 404, as it searches in jupo.org, 
where there's still version 3.1.10 and that page is still missing.

Better change this absolute link to readthedocs.org (where page is updated 
regularly)?
http://mezzanine.readthedocs.org/en/latest/multi-lingual-sites.html

-- 
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: Alternate Fabfile for deploying to VPS

2015-03-05 Thread Federico Bruni
Thanks a lot Eduardo!
I've struggled a lot with deploying in the past (and I still struggle 
sometimes).
I'll try the new fabfile as soon as it lands in the next release.

-- 
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] migration is failing when I run 'fab deploy'

2015-02-26 Thread Federico Bruni
Hi all

Mezzanine==3.1.10
South==0.8.4

I've updated my Mezzanine instance after a long time and I'm experiencing 
the same problem described here:
https://groups.google.com/forum/#!topic/mezzanine-users/7Hz_5DK_Q0Q

I know I can 'fab remove' the project and deploy again from scratch.
But this time I'd like to understand why this is happening and find a 
solution.

The step of the deployment which is failing is:
manage.py migrate --noinput

[xxx.xxx.xxx.xxx] out: Running migrations for conf:
[xxx.xxx.xxx.xxx] out:  - Migrating forwards to 
0004_ssl_account_settings_rename.
[xxx.xxx.xxx.xxx] out:  > conf:0001_initial
[xxx.xxx.xxx.xxx] out: FATAL ERROR - The following SQL query failed: CREATE 
TABLE "conf_setting" ("id" serial NOT NULL PRIMARY KEY, "value" 
varchar(2000) NOT NULL, "name" varchar(50) NOT NULL)
[xxx.xxx.xxx.xxx] out: The error was: ERRORE:  la relazione "conf_setting" 
esiste già

It cannot create an existing relation. It seems plausible.
Any idea of what I may be doing wrong? (don't take anything for granted, 
I've not found the time to study django yet)

BTW, south won't be needed any more in django >=1.7?
https://docs.djangoproject.com/en/1.7/topics/migrations/

Thanks
Federico

-- 
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: pg_restore error

2014-06-10 Thread Federico Bruni
I've just had this same problem and the command above didn't work at first.
It worked when I switched the local to english:

export LANG=C
pg_restore -c -d DATABASE FILE

Maybe it's just a coincidence?



2014-03-27 20:30 GMT+01:00 Federico Bruni :

> I've resolved following the suggestion of Ken in this thread: using the
> commands present in fabfile.py, that is:
>
> pg_dump -Fc DATABASE > FILE
> pg_restore -c -d DATABASE FILE
>
> Though I can't remember exactly what I used before.. probably I didn't use
> the -c  option in pg_restore:
>
> -c, --clean
>Clean (drop) database objects before recreating them. (This
> might
>generate some harmless error messages, if any objects were not
> present
>in the destination database.)
>
>
>
>
> 2014-03-27 18:15 GMT+01:00 Neum Schmickrath :
>
> What are the pg_ commands you are using? These are the commands I use to
>> dump and then restore and I've never had a problem.
>>
>> pg_dump -U USERNAME -F t -f NAMEOF.backup DATABASE-NAME
>>
>> pg_restore -d DATABASE-NAME -O -U USERNAME NAMEOF.backup
>>
>>
>>
>> On Monday, March 24, 2014 2:28:41 AM UTC-6, Federico Bruni wrote:
>>>
>>> I've made the dump of the local database and I've tried to restore it on
>>> the server, but I'm getting the error below.
>>> BTW, how can I force the output to be in english? I've tried LANG=C but
>>> didn't work. Should I change the locale on the server?
>>>
>>> Any help appreciated.
>>>
>>> _restore: [archiviatore (db)] Errore nella voce TOC 2142; 2606 26962 FK
>>> CONSTRAINT to_blogpost_id_refs_id_6404941b fede
>>> pg_restore: [archiviatore (db)] could not execute query: ERRORE:  il
>>> vincolo "to_blogpost_id_refs_id_6404941b" per la relazione
>>> "blog_blogpost_related_posts" esiste già
>>> Command was: ALTER TABLE ONLY blog_blogpost_related_posts
>>> ADD CONSTRAINT to_blogpost_id_refs_id_6404941b FOREIGN KEY
>>> (to_blogpost_id)...
>>> pg_restore: [archiviatore (db)] Errore nella voce TOC 2172; 2606 26967
>>> FK CONSTRAINT twitter_tweet_query_id_fkey fede
>>> pg_restore: [archiviatore (db)] could not execute query: ERRORE:  il
>>> vincolo "twitter_tweet_query_id_fkey" per la relazione "twitter_tweet"
>>> esiste già
>>> Command was: ALTER TABLE ONLY twitter_tweet
>>> ADD CONSTRAINT twitter_tweet_query_id_fkey FOREIGN KEY (query_id)
>>> REFERENCES twitter_quer...
>>> pg_restore: [archiviatore (db)] Errore nella voce TOC 2133; 2606 26972
>>> FK CONSTRAINT user_id_refs_id_40c41112 fede
>>> pg_restore: [archiviatore (db)] could not execute query: ERRORE:  il
>>> vincolo "user_id_refs_id_40c41112" per la relazione "auth_user_groups"
>>> esiste già
>>> Command was: ALTER TABLE ONLY auth_user_groups
>>> ADD CONSTRAINT user_id_refs_id_40c41112 FOREIGN KEY (user_id)
>>> REFERENCES auth_user(id)...
>>> pg_restore: [archiviatore (db)] Errore nella voce TOC 2135; 2606 26977
>>> FK CONSTRAINT user_id_refs_id_4dc23c39 fede
>>> pg_restore: [archiviatore (db)] could not execute query: ERRORE:  il
>>> vincolo "user_id_refs_id_4dc23c39" per la relazione
>>> "auth_user_user_permissions" esiste già
>>> Command was: ALTER TABLE ONLY auth_user_user_permissions
>>> ADD CONSTRAINT user_id_refs_id_4dc23c39 FOREIGN KEY (user_id)
>>> REFERENCES aut...
>>> ATTENZIONE: errore ignorato durante il ripristino: 219
>>>
>>  --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Mezzanine Users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/mezzanine-users/otAYtS2qLuE/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, 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] Re: database error while running migration

2014-06-10 Thread Federico Bruni
Hey Josh

no, South was not installed. I thought it was a dependency of Mezzanine,
but I see that it's optional:
https://pypi.python.org/pypi/Mezzanine/3.1.5

I've installed it, added it to the requirements and pushed to the
repository, but I'm getting the same error.

I've deployed from scratch. I'll see next time..

Thank you
Federico

2014-06-10 18:19 GMT+02:00 Josh Cartmell :

> Hey Federico, shot in the dark here, but was South definitely installed
> when you deployed in the first place?  I'm wondering if some of the records
> of migrations are missing.
>
> I could be totally off and I'm not sure how changing the language code
> would affect the db.
>
>
> On Tue, Jun 10, 2014 at 12:07 PM, Federico Bruni 
> wrote:
>
>> Any pointer?
>> I don't want to destroy the project and re-deploy from scratch.
>>
>> Il giorno mercoledì 4 giugno 2014 12:05:17 UTC+2, Federico Bruni ha
>> scritto:
>>
>>> Hi all
>>>
>>> I have a problem with the database migration during a deployment.
>>>
>>> I have changed only the LANGUAGE_CODE variable in settings.py
>>> When I launch 'fab deploy' I get this error:
>>>
>>> '''
>>> out: django.db.utils.ProgrammingError: ERROR:  the relation
>>> "conf_setting" already exists
>>> [xx.xx.xx.xx] out:
>>> [xx.xx.xx.xx] out:
>>>
>>> Fatal error: run() received nonzero return code 1 while executing!
>>>
>>> Requested: /home/fede/.virtualenvs/test/bin/python
>>> /home/fede/.virtualenvs/test/project/manage.py migrate --noinput
>>> Executed: /bin/bash -l -c "cd /home/fede/.virtualenvs/test/project &&
>>> source /home/fede/.virtualenvs/test/bin/activate &&
>>> /home/fede/.virtualenvs/test/bin/python 
>>> /home/fede/.virtualenvs/test/project/manage.py
>>> migrate --noinput"
>>>
>>> Aborting.
>>> '''
>>>
>>> What should I check?
>>> Thanks in advance
>>> Federico
>>>
>>>
>>>  --
>> 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 a topic in the
> Google Groups "Mezzanine Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/mezzanine-users/7Hz_5DK_Q0Q/unsubscribe.
> To unsubscribe from this group and all its topics, 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] Re: database error while running migration

2014-06-10 Thread Federico Bruni
Any pointer?
I don't want to destroy the project and re-deploy from scratch.

Il giorno mercoledì 4 giugno 2014 12:05:17 UTC+2, Federico Bruni ha scritto:
>
> Hi all
>
> I have a problem with the database migration during a deployment.
>
> I have changed only the LANGUAGE_CODE variable in settings.py
> When I launch 'fab deploy' I get this error:
>
> '''
> out: django.db.utils.ProgrammingError: ERROR:  the relation "conf_setting" 
> already exists
> [xx.xx.xx.xx] out: 
> [xx.xx.xx.xx] out: 
>
> Fatal error: run() received nonzero return code 1 while executing!
>
> Requested: /home/fede/.virtualenvs/test/bin/python 
> /home/fede/.virtualenvs/test/project/manage.py migrate --noinput
> Executed: /bin/bash -l -c "cd /home/fede/.virtualenvs/test/project && 
> source /home/fede/.virtualenvs/test/bin/activate && 
> /home/fede/.virtualenvs/test/bin/python 
> /home/fede/.virtualenvs/test/project/manage.py migrate --noinput"
>
> Aborting.
> '''
>
> What should I check?
> Thanks in advance
> Federico
>
>
>

-- 
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] database error while running migration

2014-06-04 Thread Federico Bruni
Hi all

I have a problem with the database migration during a deployment.

I have changed only the LANGUAGE_CODE variable in settings.py
When I launch 'fab deploy' I get this error:

'''
out: django.db.utils.ProgrammingError: ERROR:  the relation "conf_setting" 
already exists
[xx.xx.xx.xx] out: 
[xx.xx.xx.xx] out: 

Fatal error: run() received nonzero return code 1 while executing!

Requested: /home/fede/.virtualenvs/test/bin/python 
/home/fede/.virtualenvs/test/project/manage.py migrate --noinput
Executed: /bin/bash -l -c "cd /home/fede/.virtualenvs/test/project && 
source /home/fede/.virtualenvs/test/bin/activate && 
/home/fede/.virtualenvs/test/bin/python 
/home/fede/.virtualenvs/test/project/manage.py migrate --noinput"

Aborting.
'''

What should I check?
Thanks in advance
Federico


-- 
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: [Django] ERROR: Invalid HTTP_HOST header: 'domain.com'.You may need to add u'domain.com' to..

2014-05-26 Thread Federico Bruni
Hi Jared

thank you for the link, but I think that my situation is different.
Django (not the server) is issuing an error. It seems, from the
stackoverflow link below, that it may be someone probing the site for the
vulnerability by spoofing the header. Up to django < 1.7b4 this is
considered a 500 error (internal server error), and that's why it's
notified. From django 1.7b4 it's a 400 error, so it won't trigger any
notification.

This is at least my understanding as a newbie.
Read the links below to have all the information



2014-05-27 0:23 GMT+02:00 Jared Nielsen :

> Hi Federico,
> If you're using NGINX you can add a rewrite to your sites .conf file.
>
> http://jarednielsen.com/blog/how-to-configure-server-name-redirect-in-nginx/
> I was receiving the same error (and an inbox full of Django notices) but
> fixed it with the solution linked above.
> Cheers.
>
>
> On Monday, May 26, 2014 5:34:23 AM UTC-6, Federico Bruni wrote:
>>
>> I've been getting this error message since I've deployed my mezzanine
>> website:
>> [Django] ERROR: Invalid HTTP_HOST header: 'domain.com'.You may need to
>> add u'domain.com' to ALLOWED_HOSTS
>>
>> where domain.com is most of the times the IP of the server, few times a
>> secondary domain which redirects to the main one and one time www.fbi.gov:-)
>>
>> I've read the pages below, so I think that I can just ignore the error
>> (I'm sure that my ALLOWED_HOSTS is restrictive).
>> I guess that I can wait for Django >= 1.7b4 in Mezzanine and then I won't
>> get any error message. Right?
>>
>> http://stackoverflow.com/questions/15238506/djangos-
>> suspiciousoperation-invalid-http-host-header
>> https://code.djangoproject.com/ticket/19866
>> https://github.com/django/django/commit/d228c1192ed59ab0114d9eba82ac99
>> df611652d2 (added in django 1.7b4)
>>
>>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Mezzanine Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/mezzanine-users/NvuIO0occpw/unsubscribe.
> To unsubscribe from this group and all its topics, 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] [Django] ERROR: Invalid HTTP_HOST header: 'domain.com'.You may need to add u'domain.com' to..

2014-05-26 Thread Federico Bruni
I've been getting this error message since I've deployed my mezzanine 
website:
[Django] ERROR: Invalid HTTP_HOST header: 'domain.com'.You may need to add 
u'domain.com' to ALLOWED_HOSTS

where domain.com is most of the times the IP of the server, few times a 
secondary domain which redirects to the main one and one time www.fbi.gov 
:-)

I've read the pages below, so I think that I can just ignore the error (I'm 
sure that my ALLOWED_HOSTS is restrictive).
I guess that I can wait for Django >= 1.7b4 in Mezzanine and then I won't 
get any error message. Right?

http://stackoverflow.com/questions/15238506/djangos-suspiciousoperation-invalid-http-host-header
https://code.djangoproject.com/ticket/19866
https://github.com/django/django/commit/d228c1192ed59ab0114d9eba82ac99df611652d2
 
(added in django 1.7b4)

-- 
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: pg_restore error

2014-03-27 Thread Federico Bruni
I've resolved following the suggestion of Ken in this thread: using the
commands present in fabfile.py, that is:

pg_dump -Fc DATABASE > FILE
pg_restore -c -d DATABASE FILE

Though I can't remember exactly what I used before.. probably I didn't use
the -c  option in pg_restore:

-c, --clean
   Clean (drop) database objects before recreating them. (This might
   generate some harmless error messages, if any objects were not
present
   in the destination database.)




2014-03-27 18:15 GMT+01:00 Neum Schmickrath :

> What are the pg_ commands you are using? These are the commands I use to
> dump and then restore and I've never had a problem.
>
> pg_dump -U USERNAME -F t -f NAMEOF.backup DATABASE-NAME
>
> pg_restore -d DATABASE-NAME -O -U USERNAME NAMEOF.backup
>
>
>
> On Monday, March 24, 2014 2:28:41 AM UTC-6, Federico Bruni wrote:
>>
>> I've made the dump of the local database and I've tried to restore it on
>> the server, but I'm getting the error below.
>> BTW, how can I force the output to be in english? I've tried LANG=C but
>> didn't work. Should I change the locale on the server?
>>
>> Any help appreciated.
>>
>> _restore: [archiviatore (db)] Errore nella voce TOC 2142; 2606 26962 FK
>> CONSTRAINT to_blogpost_id_refs_id_6404941b fede
>> pg_restore: [archiviatore (db)] could not execute query: ERRORE:  il
>> vincolo "to_blogpost_id_refs_id_6404941b" per la relazione
>> "blog_blogpost_related_posts" esiste già
>> Command was: ALTER TABLE ONLY blog_blogpost_related_posts
>> ADD CONSTRAINT to_blogpost_id_refs_id_6404941b FOREIGN KEY
>> (to_blogpost_id)...
>> pg_restore: [archiviatore (db)] Errore nella voce TOC 2172; 2606 26967 FK
>> CONSTRAINT twitter_tweet_query_id_fkey fede
>> pg_restore: [archiviatore (db)] could not execute query: ERRORE:  il
>> vincolo "twitter_tweet_query_id_fkey" per la relazione "twitter_tweet"
>> esiste già
>> Command was: ALTER TABLE ONLY twitter_tweet
>> ADD CONSTRAINT twitter_tweet_query_id_fkey FOREIGN KEY (query_id)
>> REFERENCES twitter_quer...
>> pg_restore: [archiviatore (db)] Errore nella voce TOC 2133; 2606 26972 FK
>> CONSTRAINT user_id_refs_id_40c41112 fede
>> pg_restore: [archiviatore (db)] could not execute query: ERRORE:  il
>> vincolo "user_id_refs_id_40c41112" per la relazione "auth_user_groups"
>> esiste già
>> Command was: ALTER TABLE ONLY auth_user_groups
>> ADD CONSTRAINT user_id_refs_id_40c41112 FOREIGN KEY (user_id)
>> REFERENCES auth_user(id)...
>> pg_restore: [archiviatore (db)] Errore nella voce TOC 2135; 2606 26977 FK
>> CONSTRAINT user_id_refs_id_4dc23c39 fede
>> pg_restore: [archiviatore (db)] could not execute query: ERRORE:  il
>> vincolo "user_id_refs_id_4dc23c39" per la relazione
>> "auth_user_user_permissions" esiste già
>> Command was: ALTER TABLE ONLY auth_user_user_permissions
>> ADD CONSTRAINT user_id_refs_id_4dc23c39 FOREIGN KEY (user_id)
>> REFERENCES aut...
>> ATTENZIONE: errore ignorato durante il ripristino: 219
>>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Mezzanine Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/mezzanine-users/otAYtS2qLuE/unsubscribe.
> To unsubscribe from this group and all its topics, 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] Re: Image order with zip import

2014-03-25 Thread Federico Bruni
Which version of Mezzanine are you using? See if this issue helps you:
https://github.com/stephenmcd/mezzanine/issues/843

I've used the zip import and the images were sorted alphabetically, so I'm 
surprised to read that it doesn't work for you.

Il giorno martedì 25 marzo 2014 11:43:07 UTC+1, antony@gmail.com ha 
scritto:
>
> Hello,
>
> In order to upload several images in one time for gallery, I use a zip 
> file.
>
> And then images are sorted in a reverse alphabetical order (z to a) in the 
> gallery page.
> There is away to have them sort in normal order (a to z) ?
>
> It seems i can't use filename with diacritic character like : "Düsseldorf" 
> when importing images in zip file because of an encoding issue (but works 
> during a single normal upload)
>
> 'ascii' codec can't encode character u'\xfc' in position 1: ordinal not in 
> range(128)
>
>
> Best regards
>
>
>

-- 
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] pg_restore error

2014-03-25 Thread Federico Bruni
Hi Ken

I used the commands in fabfile.py and it worked (despite an error about the
'public' scheme; error ignored).
Thanks!


2014-03-24 14:24 GMT+01:00 Ken Bolton :

> Hi Federico,
>
> Follow the Fabric task commands precisely to get a good dump/restore
> process:
> https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/project_template/fabfile.py#L290-L303
> .
>
> Make sure also that you created the DB properly – that is, with the
> correct locale – and that this locale matches the locale of your
> environment. The relevant part of the fabfile is highlighted here:
> https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/project_template/fabfile.py#L340-L350
> .
>
> hth.
>
> best,
> ken
>
>
> On Mon, Mar 24, 2014 at 4:29 AM, Federico Bruni wrote:
>
>> I've made the dump of the local database and I've tried to restore it on
>> the server, but I'm getting the error below.
>> BTW, how can I force the output to be in english? I've tried LANG=C but
>> didn't work. Should I change the locale on the server?
>>
>> Any help appreciated.
>>
>> $ pg_restore -d database db.dump
>> [skipping many lines]
>>
>> _restore: [archiviatore (db)] Errore nella voce TOC 2142; 2606 26962 FK
>> CONSTRAINT to_blogpost_id_refs_id_6404941b fede
>> pg_restore: [archiviatore (db)] could not execute query: ERRORE:  il
>> vincolo "to_blogpost_id_refs_id_6404941b" per la relazione
>> "blog_blogpost_related_posts" esiste già
>> Command was: ALTER TABLE ONLY blog_blogpost_related_posts
>> ADD CONSTRAINT to_blogpost_id_refs_id_6404941b FOREIGN KEY
>> (to_blogpost_id)...
>> pg_restore: [archiviatore (db)] Errore nella voce TOC 2172; 2606 26967 FK
>> CONSTRAINT twitter_tweet_query_id_fkey fede
>> pg_restore: [archiviatore (db)] could not execute query: ERRORE:  il
>> vincolo "twitter_tweet_query_id_fkey" per la relazione "twitter_tweet"
>> esiste già
>> Command was: ALTER TABLE ONLY twitter_tweet
>> ADD CONSTRAINT twitter_tweet_query_id_fkey FOREIGN KEY (query_id)
>> REFERENCES twitter_quer...
>> pg_restore: [archiviatore (db)] Errore nella voce TOC 2133; 2606 26972 FK
>> CONSTRAINT user_id_refs_id_40c41112 fede
>> pg_restore: [archiviatore (db)] could not execute query: ERRORE:  il
>> vincolo "user_id_refs_id_40c41112" per la relazione "auth_user_groups"
>> esiste già
>> Command was: ALTER TABLE ONLY auth_user_groups
>> ADD CONSTRAINT user_id_refs_id_40c41112 FOREIGN KEY (user_id)
>> REFERENCES auth_user(id)...
>> pg_restore: [archiviatore (db)] Errore nella voce TOC 2135; 2606 26977 FK
>> CONSTRAINT user_id_refs_id_4dc23c39 fede
>> pg_restore: [archiviatore (db)] could not execute query: ERRORE:  il
>> vincolo "user_id_refs_id_4dc23c39" per la relazione
>> "auth_user_user_permissions" esiste già
>> Command was: ALTER TABLE ONLY auth_user_user_permissions
>> ADD CONSTRAINT user_id_refs_id_4dc23c39 FOREIGN KEY (user_id)
>> REFERENCES aut...
>> ATTENZIONE: errore ignorato durante il ripristino: 219
>>
>> --
>> 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 a topic in the
> Google Groups "Mezzanine Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/mezzanine-users/4NwCIITBzBs/unsubscribe.
> To unsubscribe from this group and all its topics, 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] pg_restore error

2014-03-24 Thread Federico Bruni
I've made the dump of the local database and I've tried to restore it on 
the server, but I'm getting the error below.
BTW, how can I force the output to be in english? I've tried LANG=C but 
didn't work. Should I change the locale on the server?

Any help appreciated.

$ pg_restore -d database db.dump
[skipping many lines]

_restore: [archiviatore (db)] Errore nella voce TOC 2142; 2606 26962 FK 
CONSTRAINT to_blogpost_id_refs_id_6404941b fede
pg_restore: [archiviatore (db)] could not execute query: ERRORE:  il 
vincolo "to_blogpost_id_refs_id_6404941b" per la relazione 
"blog_blogpost_related_posts" esiste già
Command was: ALTER TABLE ONLY blog_blogpost_related_posts
ADD CONSTRAINT to_blogpost_id_refs_id_6404941b FOREIGN KEY 
(to_blogpost_id)...
pg_restore: [archiviatore (db)] Errore nella voce TOC 2172; 2606 26967 FK 
CONSTRAINT twitter_tweet_query_id_fkey fede
pg_restore: [archiviatore (db)] could not execute query: ERRORE:  il 
vincolo "twitter_tweet_query_id_fkey" per la relazione "twitter_tweet" 
esiste già
Command was: ALTER TABLE ONLY twitter_tweet
ADD CONSTRAINT twitter_tweet_query_id_fkey FOREIGN KEY (query_id) 
REFERENCES twitter_quer...
pg_restore: [archiviatore (db)] Errore nella voce TOC 2133; 2606 26972 FK 
CONSTRAINT user_id_refs_id_40c41112 fede
pg_restore: [archiviatore (db)] could not execute query: ERRORE:  il 
vincolo "user_id_refs_id_40c41112" per la relazione "auth_user_groups" 
esiste già
Command was: ALTER TABLE ONLY auth_user_groups
ADD CONSTRAINT user_id_refs_id_40c41112 FOREIGN KEY (user_id) 
REFERENCES auth_user(id)...
pg_restore: [archiviatore (db)] Errore nella voce TOC 2135; 2606 26977 FK 
CONSTRAINT user_id_refs_id_4dc23c39 fede
pg_restore: [archiviatore (db)] could not execute query: ERRORE:  il 
vincolo "user_id_refs_id_4dc23c39" per la relazione 
"auth_user_user_permissions" esiste già
Command was: ALTER TABLE ONLY auth_user_user_permissions
ADD CONSTRAINT user_id_refs_id_4dc23c39 FOREIGN KEY (user_id) 
REFERENCES aut...
ATTENZIONE: errore ignorato durante il ripristino: 219

-- 
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] pg_restore error

2014-03-24 Thread Federico Bruni
I've made the dump of the local database and I've tried to restore it on 
the server, but I'm getting the error below.
BTW, how can I force the output to be in english? I've tried LANG=C but 
didn't work. Should I change the locale on the server?

Any help appreciated.

_restore: [archiviatore (db)] Errore nella voce TOC 2142; 2606 26962 FK 
CONSTRAINT to_blogpost_id_refs_id_6404941b fede
pg_restore: [archiviatore (db)] could not execute query: ERRORE:  il 
vincolo "to_blogpost_id_refs_id_6404941b" per la relazione 
"blog_blogpost_related_posts" esiste già
Command was: ALTER TABLE ONLY blog_blogpost_related_posts
ADD CONSTRAINT to_blogpost_id_refs_id_6404941b FOREIGN KEY 
(to_blogpost_id)...
pg_restore: [archiviatore (db)] Errore nella voce TOC 2172; 2606 26967 FK 
CONSTRAINT twitter_tweet_query_id_fkey fede
pg_restore: [archiviatore (db)] could not execute query: ERRORE:  il 
vincolo "twitter_tweet_query_id_fkey" per la relazione "twitter_tweet" 
esiste già
Command was: ALTER TABLE ONLY twitter_tweet
ADD CONSTRAINT twitter_tweet_query_id_fkey FOREIGN KEY (query_id) 
REFERENCES twitter_quer...
pg_restore: [archiviatore (db)] Errore nella voce TOC 2133; 2606 26972 FK 
CONSTRAINT user_id_refs_id_40c41112 fede
pg_restore: [archiviatore (db)] could not execute query: ERRORE:  il 
vincolo "user_id_refs_id_40c41112" per la relazione "auth_user_groups" 
esiste già
Command was: ALTER TABLE ONLY auth_user_groups
ADD CONSTRAINT user_id_refs_id_40c41112 FOREIGN KEY (user_id) 
REFERENCES auth_user(id)...
pg_restore: [archiviatore (db)] Errore nella voce TOC 2135; 2606 26977 FK 
CONSTRAINT user_id_refs_id_4dc23c39 fede
pg_restore: [archiviatore (db)] could not execute query: ERRORE:  il 
vincolo "user_id_refs_id_4dc23c39" per la relazione 
"auth_user_user_permissions" esiste già
Command was: ALTER TABLE ONLY auth_user_user_permissions
ADD CONSTRAINT user_id_refs_id_4dc23c39 FOREIGN KEY (user_id) 
REFERENCES aut...
ATTENZIONE: errore ignorato durante il ripristino: 219

-- 
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] building the docs

2014-03-10 Thread Federico Bruni
Ok, I'm using a virtualenv where I've installed mezzanine and sphinx.
The SECRET_KEY value is in an environment variable within the virtualenv.

I'm getting the same error message, see log attached




2014-03-07 22:02 GMT+01:00 Stephen McDonald :

> Django gets loaded so that we can retrieve all of Mezzanine's settings
> (mezzanine.conf), which each contain names and descriptions - these are
> then used to generate the settings docs here:
> http://mezzanine.jupo.org/docs/configuration.html
>
> You can't load Django without SECRET_KEY defined.
>
>
> On Sat, Mar 8, 2014 at 4:38 AM, Federico Bruni  wrote:
>
>> Hi Ken
>>
>> I thought that building the docs was indipendent from starting a
>> mezzanine project. That's why I'm not using a virtualenv in this case.
>> My goal is being able to test a doc patch about deployment, in case I
>> manage to write something reasonable.
>> Il 07/mar/2014 18:13 "Ken Bolton"  ha scritto:
>>
>>>  Hi Federico,
>>>
>>> ALLOWED_HOSTS, TIME_ZONE, and SECRET_KEY do not have values. Make sure
>>> you have those set in your settings.py or local_settings.py.
>>>
>>> Backing up a moment, we see that Mezzanine is installed in
>>> /usr/local/lib/python2.7/dist-packages/. I urge you to follow the
>>> recommendations of
>>> http://effectivedjango.com/tutorial/getting-started.html and install
>>> Django, Mezzanine, and other applications in a virtualenv (
>>> http://www.virtualenv.org/en/latest/).
>>>
>>> hth,
>>> ken
>>>
>>>
>>> On Fri, Mar 7, 2014 at 12:03 PM, Federico Bruni wrote:
>>>
>>>> I've tried building the docs but I'm getting this error:
>>>>
>>>> $ sphinx-build -b html docs docs/build
>>>> Running Sphinx v1.2
>>>> /usr/local/lib/python2.7/dist-packages/mezzanine/utils/conf.py:51:
>>>> UserWarning: You haven't defined the ALLOWED_HOSTS settings, which Django
>>>> 1.5 requires. Will fall back to the domains configured as sites.
>>>>   warn("You haven't defined the ALLOWED_HOSTS settings, which "
>>>> /usr/local/lib/python2.7/dist-packages/mezzanine/utils/conf.py:59:
>>>> UserWarning: TIME_ZONE setting is not set, using closest match: Europe/Rome
>>>>   warn("TIME_ZONE setting is not set, using closest match: %s" % tz)
>>>>
>>>> Exception occurred:
>>>>   File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line
>>>> 151, in __init__
>>>> raise ImproperlyConfigured("The SECRET_KEY setting must not be
>>>> empty.")
>>>> ImproperlyConfigured: The SECRET_KEY setting must not be empty.
>>>> The full traceback has been saved in /tmp/sphinx-err-sEgI9d.log, if you
>>>> want to report the issue to the developers
>>>>
>>>> Find attached the full log.
>>>>
>>>>  --
>>>> 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 a topic in the
>>> Google Groups "Mezzanine Users" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/mezzanine-users/Q7rneOzrv8o/unsubscribe
>>> .
>>> To unsubscribe from this group and all its topics, 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.
>>
>
>
>
> --
> Stephen McDonald
> http://jupo.org
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Mezzanine Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/mezzanine-users/Q7rneOzrv8o/unsubscribe.
> To unsubscribe from this group and all its topi

Re: [mezzanine-users] building the docs

2014-03-07 Thread Federico Bruni
Hi Ken

I thought that building the docs was indipendent from starting a mezzanine
project. That's why I'm not using a virtualenv in this case.
My goal is being able to test a doc patch about deployment, in case I
manage to write something reasonable.
Il 07/mar/2014 18:13 "Ken Bolton"  ha scritto:

> Hi Federico,
>
> ALLOWED_HOSTS, TIME_ZONE, and SECRET_KEY do not have values. Make sure you
> have those set in your settings.py or local_settings.py.
>
> Backing up a moment, we see that Mezzanine is installed in
> /usr/local/lib/python2.7/dist-packages/. I urge you to follow the
> recommendations of
> http://effectivedjango.com/tutorial/getting-started.html and install
> Django, Mezzanine, and other applications in a virtualenv (
> http://www.virtualenv.org/en/latest/).
>
> hth,
> ken
>
>
> On Fri, Mar 7, 2014 at 12:03 PM, Federico Bruni wrote:
>
>> I've tried building the docs but I'm getting this error:
>>
>> $ sphinx-build -b html docs docs/build
>> Running Sphinx v1.2
>> /usr/local/lib/python2.7/dist-packages/mezzanine/utils/conf.py:51:
>> UserWarning: You haven't defined the ALLOWED_HOSTS settings, which Django
>> 1.5 requires. Will fall back to the domains configured as sites.
>>   warn("You haven't defined the ALLOWED_HOSTS settings, which "
>> /usr/local/lib/python2.7/dist-packages/mezzanine/utils/conf.py:59:
>> UserWarning: TIME_ZONE setting is not set, using closest match: Europe/Rome
>>   warn("TIME_ZONE setting is not set, using closest match: %s" % tz)
>>
>> Exception occurred:
>>   File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line
>> 151, in __init__
>> raise ImproperlyConfigured("The SECRET_KEY setting must not be
>> empty.")
>> ImproperlyConfigured: The SECRET_KEY setting must not be empty.
>> The full traceback has been saved in /tmp/sphinx-err-sEgI9d.log, if you
>> want to report the issue to the developers
>>
>> Find attached the full log.
>>
>>  --
>> 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 a topic in the
> Google Groups "Mezzanine Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/mezzanine-users/Q7rneOzrv8o/unsubscribe.
> To unsubscribe from this group and all its topics, 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] building the docs

2014-03-07 Thread Federico Bruni
I've tried building the docs but I'm getting this error:

$ sphinx-build -b html docs docs/build
Running Sphinx v1.2
/usr/local/lib/python2.7/dist-packages/mezzanine/utils/conf.py:51: 
UserWarning: You haven't defined the ALLOWED_HOSTS settings, which Django 
1.5 requires. Will fall back to the domains configured as sites.
  warn("You haven't defined the ALLOWED_HOSTS settings, which "
/usr/local/lib/python2.7/dist-packages/mezzanine/utils/conf.py:59: 
UserWarning: TIME_ZONE setting is not set, using closest match: Europe/Rome
  warn("TIME_ZONE setting is not set, using closest match: %s" % tz)

Exception occurred:
  File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 
151, in __init__
raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
ImproperlyConfigured: The SECRET_KEY setting must not be empty.
The full traceback has been saved in /tmp/sphinx-err-sEgI9d.log, if you 
want to report the issue to the developers

Find attached the full log.

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


sphinx-err-sEgI9d.log
Description: Binary data


Re: [mezzanine-users] step by step mezzanine deployment

2014-03-07 Thread Federico Bruni
2014-03-06 18:36 GMT+01:00 Federico Bruni :

> 2014-03-06 18:20 GMT+01:00 Federico Bruni :
>
> 2014-03-03 13:01 GMT+01:00 Federico Bruni :
>>
>> First of all, the DATABASES options are divided in 3 files:
>>>
>>> - local_settings.py: the setting for local development. By default,
>>> sqlite is used. I wonder what's the best approach if I know that I want to
>>> deploy on PostgreSQL on the server. Should I work on PostgreSQL locally as
>>> well?
>>> - live_settings.py: this also is pretty clear, it contains the server
>>> settings (I found out that it can be left untouched, as long as settings.
>>> py is complete)
>>> - settings.py: IIUC, any settings here will be overridden by the two
>>> settings above, so I can ignore the DATABASE section. Is it correct?
>>>
>>
>> Can anyone please reply on the last question above?
>>
>> I've managed to sync local and server manually, but I'd like to be able
>> to do it with Fabric.
>> One problem may be that the owner of the database created by Fabric is
>> always %(proj_name)s, no matter what I put in the settings. I've tried to
>> write the server user name (string) both in settings and live_settings.py,
>> but fabric seems to ignore it.
>>
>>
> The awful "workaround" is deleting the database created by fabric and then
> doing a manual dump.
> My site is live now, but I'd really like to know what's wrong with my
> configuration.
>
>
Or rather, why I don't keep a message in the drafts and send it just the
day after? :-)
I've already been told that Fabric doesn't sync the content of the
database. So the manual operation _is_ required.

Sorry for the noise, I've had few time to spend on Mezzanine lately

-- 
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: step by step mezzanine deployment

2014-03-07 Thread Federico Bruni
Hi Eduardo

thanks for the explanation! It would be nice if it was included in the
documentation...

2014-03-07 1:06 GMT+01:00 Eduardo Rivas :

> Hi Federico. The DATABASE setting that is applied is the one in
> live_settings.py. In production, this file is renamed to local_settings.py
> by Fabric (the local_settings.py in your dev machine should NOT be in
> version control). You'll see at the end of settings.py that it imports
> everything from local_settings.py, thus overriding the DATABASE from
> settings.py.
>

What's the purpose of DATABASE in settings.py then?

-- 
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] step by step mezzanine deployment

2014-03-06 Thread Federico Bruni
2014-03-06 18:20 GMT+01:00 Federico Bruni :

> 2014-03-03 13:01 GMT+01:00 Federico Bruni :
>
> First of all, the DATABASES options are divided in 3 files:
>>
>> - local_settings.py: the setting for local development. By default,
>> sqlite is used. I wonder what's the best approach if I know that I want to
>> deploy on PostgreSQL on the server. Should I work on PostgreSQL locally as
>> well?
>> - live_settings.py: this also is pretty clear, it contains the server
>> settings (I found out that it can be left untouched, as long as settings.
>> py is complete)
>> - settings.py: IIUC, any settings here will be overridden by the two
>> settings above, so I can ignore the DATABASE section. Is it correct?
>>
>
> Can anyone please reply on the last question above?
>
> I've managed to sync local and server manually, but I'd like to be able to
> do it with Fabric.
> One problem may be that the owner of the database created by Fabric is
> always %(proj_name)s, no matter what I put in the settings. I've tried to
> write the server user name (string) both in settings and live_settings.py,
> but fabric seems to ignore it.
>
>
The awful "workaround" is deleting the database created by fabric and then
doing a manual dump.
My site is live now, but I'd really like to know what's wrong with my
configuration.

If someone wants to help me privately, send me a message. I can offer some
small donation for the help.
Thanks
Federico

-- 
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/groups/opt_out.


Re: [mezzanine-users] step by step mezzanine deployment

2014-03-06 Thread Federico Bruni
2014-03-03 13:01 GMT+01:00 Federico Bruni :

> First of all, the DATABASES options are divided in 3 files:
>
> - local_settings.py: the setting for local development. By default,
> sqlite is used. I wonder what's the best approach if I know that I want to
> deploy on PostgreSQL on the server. Should I work on PostgreSQL locally as
> well?
> - live_settings.py: this also is pretty clear, it contains the server
> settings (I found out that it can be left untouched, as long as settings.
> py is complete)
> - settings.py: IIUC, any settings here will be overridden by the two
> settings above, so I can ignore the DATABASE section. Is it correct?
>

Can anyone please reply on the last question above?

I've managed to sync local and server manually, but I'd like to be able to
do it with Fabric.
One problem may be that the owner of the database created by Fabric is
always %(proj_name)s, no matter what I put in the settings. I've tried to
write the server user name (string) both in settings and live_settings.py,
but fabric seems to ignore it.

-- 
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/groups/opt_out.


Re: [mezzanine-users] Re: step by step mezzanine deployment

2014-03-05 Thread Federico Bruni
2014-03-05 17:25 GMT+01:00 Federico Bruni :

> I'll try again from scratch a new project and set up immediately
> PostgreSQL also in local_settings.py, before running 'manage.py createdb'.
>
>
I've done the sync local>server manually, set up nginx on the server and
started mezzanine in background. Everything works fine finally!
It was probably something related to the live settings. I'll try again a
deployment with fabric as soon as I have time.

Big thank to Ross, who found the good words to put me on the right track.

-- 
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/groups/opt_out.


Re: [mezzanine-users] Re: step by step mezzanine deployment

2014-03-05 Thread Federico Bruni
2014-03-04 18:15 GMT+01:00 Ross Laird :

> I don't actually use Fabric, so I have been a bit hesitant to make
> suggestions here. But my guess is that you have one problem and one problem
> only, and it just keeps changing how it looks depending on what you do. To
> step through a solution to this, I would take Fabric out of the equation
> and get the database connection running properly from the command line only
> (using pg_dump, pg_restore, and syncdb). If those commands work from the
> command line, then the problem is in the Fabric configuration. If those
> commands do not work from the command line, then you have a connection
> problem that sounds like it is related to permissions. In that case, try
> using psql from the command line to see who owns the database you are
> trying to connect to. Take as many things out of this equation as you can.
> Get right down to the core of it: who owns the database, what it's called,
> what its permissions are, and so on. Your problem lies in one of these
> areas, I think. Everything else that you try to do (using Fabric, Django,
> etc.) will fail -- and will give you different error messages -- until this
> one thing is resolved.


Thanks Ross! This is indeed the best approach.
I've found out that part of my problem is that the database and owner names
are different between local and server. I've solved following this tip:
http://stackoverflow.com/questions/12233046/django-permission-denied-when-trying-to-access-database-after-restore-migratio

and in particular:

psql database -c "GRANT ALL ON ALL TABLES IN SCHEMA public to user;"
psql database -c "GRANT ALL ON ALL SEQUENCES IN SCHEMA public to user;"
psql database -c "GRANT ALL ON ALL FUNCTIONS IN SCHEMA public to user;"

After this change, I did:

sudo supervisorctl stop all
python manage.py runserver

The server starts without errors but still it's not my local website.
I'll try again from scratch a new project and set up immediately PostgreSQL
also in local_settings.py, before running 'manage.py createdb'.

-- 
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/groups/opt_out.


Re: [mezzanine-users] Re: step by step mezzanine deployment

2014-03-04 Thread Federico Bruni
2014-03-03 23:33 GMT+01:00 Ross Laird :

> Postgresql authentication can be tricky.
> You may need to make changes to your pg_hba.conf file. Like so:
>
> # Database administrative login by Unix domain socket
> local   all postgrespeer
> # TYPE  DATABASEUSERADDRESS METHOD
> # "local" is for Unix domain socket connections only
> local   all all peer
> # IPv4 local connections:
> hostall all 127.0.0.1/32md5
> # IPv6 local connections:
> hostall all ::1/128 md5
> # Allow replication connections from localhost, by a user with the
> # replication privilege.
> #local   replication postgrespeer
> #hostreplication postgres127.0.0.1/32md5
>
>
Ross, thanks for the tips!
My pg_hba.conf is exactly the same.


> Also, this tutorial might help:
>
> http://rosslaird.com/blog/building-a-project-with-mezzanine/
>

I realized that I was not using the correct owner of the database on the
server
I've tried changing listen_addresses to accept any using * (as in your
tutorial) and now I get a different error, which I translate as:

 no entry in pg_hba.conf for host "x.x.x.x", user "project", database
"project", SSL disabled

The host is my public IP. It's listening to any address but it needs a
specific entry for my IP, so I've added:

hostall all x.x.x.x/32md5

I've repeated the commands above to sync the databases and I got no
messages in the terminal.
However, the problem persists. I've also tried to repeat the deploy with
'fab remove & fab create & fab deploy', but it's not using my database.

My last option is manually dumping the database. So I tried:

1. fab create
2. pg_dump -Fc dbname > db.dump (on localhost and copied db.dump on the
server)
3. pg_restore -d project db.dump (on the server)
4. fab deploy

But I get some errors when I run pg_restore and when I run 'fab deploy' I
get this error:

django.db.utils.ProgrammingError: ERROR:  permission denied for the
relation django_content_type

I'm starting running out of hope...
Your tutorial  about deployment is still on your TODO list?

-- 
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/groups/opt_out.


Re: [mezzanine-users] step by step mezzanine deployment

2014-03-03 Thread Federico Bruni
Ah! Here's what I was missing!
Now I'm trying to manually sync the databases:

pg_dump -C -h localhost -U localuser dbname | psql -h remotehost -U
remoteuser dbname

But I have problem with the port 5432. I already tried to add ip_private to
listen_addresses in postgresql.conf, as suggested here:
http://stackoverflow.com/questions/19916720/psql-cant-connect-to-postgresql-server-postmaster-on-ip-and-port-5432

But it doesn't help:

psql: could not connect to server: Connection refused
Is the server running on host "xx.xx.xx.xx" and accepting
TCP/IP connections on port 5432?

pg_dump: [archiver (db)] connection to database "xx" failed:
fe_sendauth: no password supplied



2014-03-03 16:26 GMT+01:00 Ken Bolton :

> Fabric does not sync the content of the databases.
>
> Fabric does sync the database schemas!
>
>
> On Mon, Mar 3, 2014 at 8:03 AM, Federico Bruni  wrote:
>
>> 2014-03-03 13:01 GMT+01:00 Federico Bruni :
>>
>> Now I should find out why my real project is failing. Maybe I could start
>>> it from scratch step by step and see what happens.
>>>
>>
>> I've just one more test: added a page in my local project and then
>> launched 'fab deploy' to send the changes to the server database.
>> But nothing happens (I'm sure I've forced the reload of the page).
>>
>> So I've managed to reproduce my original problem. Local and deployment
>> databases are not synced when I launch 'fab deploy'.
>> No error if I manually launch 'python manage.py runserver' from the
>> virtualenv in the server (after 'sudo supervisorctl stop all').
>>
>>  --
>> 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/groups/opt_out.
>>
>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Mezzanine Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/mezzanine-users/FSCD3RAdLww/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> mezzanine-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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/groups/opt_out.


Re: [mezzanine-users] first steps with fabric deployment

2014-03-03 Thread Federico Bruni
no error found


2014-03-03 13:22 GMT+01:00 :

> Did you try to run "python manage.py runserver" directly in your virtual
> env directory? And is there an error? I the port is in use you can try to
> stop the server by running supervisorctl stop all.
>
> ++
>
> On Friday, February 28, 2014 1:08:44 AM UTC+1, Federico Bruni wrote:
>>
>> 2014-02-26 13:18 GMT+01:00 :
>>
>> Yes, I think fab create has to restart from the beginning. One more
>>> advice, be sure that all Fabric settings in settings.py are completed
>>> (or as much as you can). I tried to leave the field REPO_URL empty and fab
>>> deploy didn't work until I set a real git repository.
>>
>>
>> Yes, I see that each time you run 'fab deploy' the git repository is
>> checked and pulled to get the updates.
>> I've followed your advice, added as many settings as possible and solved
>> an issue with the gunicorn file, see:
>> https://github.com/stephenmcd/mezzanine/issues/870
>>
>> Now the server is serving the contents, but... the database is still
>> wrong. All the static and theme files are correct (favicon, homepage), but
>> all the rest (other pages and access to admin) is wrong.
>> Something went wrong with manage.py migrate. How can I find the problem?
>> In the output I see many "Nothing to migrate".
>>
>>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Mezzanine Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/mezzanine-users/KFgqkys6rUM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> mezzanine-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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/groups/opt_out.


Re: [mezzanine-users] step by step mezzanine deployment

2014-03-03 Thread Federico Bruni
2014-03-03 13:01 GMT+01:00 Federico Bruni :

> Now I should find out why my real project is failing. Maybe I could start
> it from scratch step by step and see what happens.
>

I've just one more test: added a page in my local project and then launched
'fab deploy' to send the changes to the server database.
But nothing happens (I'm sure I've forced the reload of the page).

So I've managed to reproduce my original problem. Local and deployment
databases are not synced when I launch 'fab deploy'.
No error if I manually launch 'python manage.py runserver' from the
virtualenv in the server (after 'sudo supervisorctl stop all').

-- 
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/groups/opt_out.


[mezzanine-users] step by step mezzanine deployment

2014-03-03 Thread Federico Bruni
I'm opening a new thread and try to make the deploy of a simple test. Let's 
see if I understand the basics...

First of all, the DATABASES options are divided in 3 files:

- local_settings.py: the setting for local development. By default, sqlite 
is used. I wonder what's the best approach if I know that I want to deploy 
on PostgreSQL on the server. Should I work on PostgreSQL locally as well?
- live_settings.py: this also is pretty clear, it contains the server 
settings (I found out that it can be left untouched, as long as settings.py 
is complete)
- settings.py: IIUC, any settings here will be overridden by the two 
settings above, so I can ignore the DATABASE section. Is it correct?

Now, I assume that Fabric will handle the migration from sqlite to 
postgresql.
So all I have to do to deploy is defining the FABRIC={} variables in 
settings.py

I've learned that I'd better split 'fab all' in three steps. I'm trying to 
understand which options/settings are required for each step (it would be 
nice to organize them this way, sequentially, in default settings.py):

1. fab install
This is the easier part. It just installs the required packages on the 
server.
Options to be defined on FABRIC section of settings.py are: SSH_USER, 
SSH_KEYPATH, HOSTS, LOCALE, SECRET_KEY, NEVERCACHE_KEY.

2. fab create
Another note to add in the documentation is that a remote git/mercurial 
server is needed.
In this step I have to fill: VIRTUALENV_HOME, PROJECT_NAME, 
REQUIREMENTS_PATH, REPO_URL, DB_PASS.
I see that DB_PASS is shadowed so it's safe putting the password in the 
file (repository is private, of course). Or there's a better method?

3. fab deploy
I had nothing more to configure.
This test just worked smoothly. No error.

Now I should find out why my real project is failing. Maybe I could start 
it from scratch step by step and see what happens.
Anyway, I'd love to hear comments on above.. I may try writing a patch for 
the documentation to help other users, even if my understanding of 
mezzanine is still poor.

-- 
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/groups/opt_out.


Re: [mezzanine-users] Re: deployment issue --- gunicorn

2014-02-27 Thread Federico Bruni
If the commit or the pull request message contains a reference to the issue
#number, then they will be linked each other. See:
https://help.github.com/articles/closing-issues-via-commit-messages


2014-02-28 1:03 GMT+01:00 Stephen McDonald :

> Thanks Federico, I never stopped to realise that fix matched up with that
> issue - good to know!
>
>
> On Fri, Feb 28, 2014 at 10:42 AM, Federico Bruni wrote:
>
>> I confirm that this solved the same problem. More info here:
>>
>> http://gunicorn-docs.readthedocs.org/en/latest/configure.html#configuration-file
>>
>> It's been fixed two months ago:
>> https://github.com/stephenmcd/mezzanine/issues/870
>>
>>
>> Il giorno giovedì 16 gennaio 2014 12:35:58 UTC+1, Klamann, Norbert ha
>> scritto:
>>>
>>> I repeated the whole exercise and now it works .
>>>
>>> gunicorn.conf.py is changed an looks like that.
>>>
>>> mezzanine@wsa02:~/mezz_test/project$ cat gunicorn.conf.py
>>>
>>> from __future__ import unicode_literals
>>> import multiprocessing
>>> bind = "127.0.0.1:8000"
>>> workers = multiprocessing.cpu_count() * 2 + 1
>>> loglevel = "error"
>>> proc_name = "mezz_test"
>>>
>>> Now I get a Error 500  when I visit the new instance but that is another
>>> problem i presume.
>>>
>>>
>>> Thanks for your help
>>>
>>> Norbert
>>>
>>>
>>>
>>>
>>>
>>>
>>> 2014/1/16 Stephen McDonald 
>>>
>>>> Thanks Harry
>>>>
>>>> FWIW my successful test used 8000 for the gunicorn port.
>>>>
>>>>
>>>> On Thu, Jan 16, 2014 at 11:32 AM,  wrote:
>>>>
>>>>> At least for the most basic deployment of mezzanine (ie. no custom
>>>>> theme app yet) I seem to have resolved the issue.
>>>>>
>>>>> Although I did a few different things, I think that the major factor
>>>>> was changing the gunicorn port from 8000 to anything else (8001, ).
>>>>>
>>>>> I'll keep you posted as to whether this moment of success persists.
>>>>>
>>>>> Harry
>>>>>
>>>>>
>>>>> On Friday, 10 January 2014 13:41:31 UTC+8, har...@iinet.net.au wrote:
>>>>>
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I'm very new to Mezzanine and have been loving it --- especially the
>>>>>> fabric deploment.  However, I seem to be having some troubles with 
>>>>>> gunicorn.
>>>>>>
>>>>>> I started from a fresh linode running debian and allowed 'fab all' to
>>>>>> build the full system.
>>>>>>
>>>>>> I would very much appreciate some assistance with this.
>>>>>>
>>>>>> My basic process is:
>>>>>>
>>>>>> server:
>>>>>>
>>>>>> new linode profile
>>>>>> ssh as root
>>>>>> adduser user
>>>>>> apt-get install sudo vim
>>>>>> add harry to sudoers file
>>>>>> on local machine:
>>>>>> ssh-copy-id -i ~/.ssh/id_rsa.pub
>>>>>> sudo pip install virtualenvwrapper
>>>>>> add to bashrc:
>>>>>>
>>>>>> export WORKON_HOME=$HOME/.virtualenvs
>>>>>> source /usr/local/bin/virtualenvwrapper.sh
>>>>>> export PIP_VIRTUALENV_BASE=$WORKON_HOME
>>>>>>
>>>>>> local:
>>>>>>
>>>>>> mkvirtualenv black_earth_{project}
>>>>>> pip install -r requirements.txt
>>>>>> createdb {project}
>>>>>> mezzanine-project {project}
>>>>>> set database parameters in local_settings.py
>>>>>> copy keys and deploy setting (FABRIC) to local_settings.py
>>>>>> set allowed_hosts in settings.py
>>>>>> ALLOWED_HOSTS = [
>>>>>> 'localhosts',
>>>>>> '.mysite.org.au',
>>>>>> ]
>>>>>> python manage.py createdb
>>>>>> check local server
>>>>>> set up git repository
>>>>>> git init
>>>>>> git add .
>>>>>> git  git remote add origin {gitserver}
>>>>&g

Re: [mezzanine-users] first steps with fabric deployment

2014-02-27 Thread Federico Bruni
2014-02-26 13:18 GMT+01:00 :

> Yes, I think fab create has to restart from the beginning. One more
> advice, be sure that all Fabric settings in settings.py are completed (or
> as much as you can). I tried to leave the field REPO_URL empty and fab
> deploy didn't work until I set a real git repository.


Yes, I see that each time you run 'fab deploy' the git repository is
checked and pulled to get the updates.
I've followed your advice, added as many settings as possible and solved an
issue with the gunicorn file, see:
https://github.com/stephenmcd/mezzanine/issues/870

Now the server is serving the contents, but... the database is still wrong.
All the static and theme files are correct (favicon, homepage), but all the
rest (other pages and access to admin) is wrong.
Something went wrong with manage.py migrate. How can I find the problem? In
the output I see many "Nothing to migrate".

-- 
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/groups/opt_out.


Re: [mezzanine-users] Re: deployment issue --- gunicorn

2014-02-27 Thread Federico Bruni
I confirm that this solved the same problem. More info here:
http://gunicorn-docs.readthedocs.org/en/latest/configure.html#configuration-file

It's been fixed two months ago:
https://github.com/stephenmcd/mezzanine/issues/870


Il giorno giovedì 16 gennaio 2014 12:35:58 UTC+1, Klamann, Norbert ha 
scritto:
>
> I repeated the whole exercise and now it works .
>
> gunicorn.conf.py is changed an looks like that.
>
> mezzanine@wsa02:~/mezz_test/project$ cat gunicorn.conf.py
>
> from __future__ import unicode_literals
> import multiprocessing
> bind = "127.0.0.1:8000"
> workers = multiprocessing.cpu_count() * 2 + 1
> loglevel = "error"
> proc_name = "mezz_test"
>
> Now I get a Error 500  when I visit the new instance but that is another 
> problem i presume.
>
>
> Thanks for your help
>
> Norbert
>
>
>
>
>
>
> 2014/1/16 Stephen McDonald >
>
>> Thanks Harry
>>
>> FWIW my successful test used 8000 for the gunicorn port.
>>
>>
>> On Thu, Jan 16, 2014 at 11:32 AM, >wrote:
>>
>>> At least for the most basic deployment of mezzanine (ie. no custom theme 
>>> app yet) I seem to have resolved the issue.
>>>
>>> Although I did a few different things, I think that the major factor was 
>>> changing the gunicorn port from 8000 to anything else (8001, ).
>>>
>>> I'll keep you posted as to whether this moment of success persists.
>>>
>>> Harry
>>>
>>>
>>> On Friday, 10 January 2014 13:41:31 UTC+8, har...@iinet.net.au wrote:
>>>

 Hi,

 I'm very new to Mezzanine and have been loving it --- especially the 
 fabric deploment.  However, I seem to be having some troubles with 
 gunicorn.

 I started from a fresh linode running debian and allowed 'fab all' to 
 build the full system.

 I would very much appreciate some assistance with this.

 My basic process is:

 server:

 new linode profile
 ssh as root
 adduser user
 apt-get install sudo vim
 add harry to sudoers file
 on local machine:
 ssh-copy-id -i ~/.ssh/id_rsa.pub
 sudo pip install virtualenvwrapper
 add to bashrc:

 export WORKON_HOME=$HOME/.virtualenvs
 source /usr/local/bin/virtualenvwrapper.sh
 export PIP_VIRTUALENV_BASE=$WORKON_HOME

 local:

 mkvirtualenv black_earth_{project}
 pip install -r requirements.txt
 createdb {project}
 mezzanine-project {project}
 set database parameters in local_settings.py
 copy keys and deploy setting (FABRIC) to local_settings.py
 set allowed_hosts in settings.py
 ALLOWED_HOSTS = [
 'localhosts',
 '.mysite.org.au',
 ]
 python manage.py createdb
 check local server
 set up git repository
 git init
 git add .
 git  git remote add origin {gitserver}
 git push -u origin master
 pip freeze > requirements.txt
 fab all

 pip error:
 sudo pip install setuptools --no-use-wheel --upgrade

 At the final point in the deployment --- restart --- I get the error:

 $ supervisorctl start black_earth_semina:gunicorn_black_earth_semina ->

 [blackearthcollective.org.au] out: sudo password:
 [blackearthcollective.org.au] out: 
 black_earth_semina:gunicorn_black_earth_semina: 
 ERROR (abnormal termination)
 [blackearthcollective.org.au] out: 

 This is with a completely standard mezzanine setup.  I thought that the 
 problem was with my theme project.

 from the supervisor gunicorn log:

 !!!
 !!! WARNING: This command is deprecated.
 !!!
 !!! You should now run your application with the WSGI interface
 !!! installed with your project. Ex.:
 !!!
 !!! gunicorn myproject.wsgi:application
 !!!
 !!! See https://docs.djangoproject.com/en/1.4/howto/deployment/
 wsgi/gunicorn/
 !!! for more info.
 !!!

 2014-01-10 01:16:35 [12088] [CRITICAL] WORKER TIMEOUT (pid:12097)

>>>  -- 
>>> 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/groups/opt_out.
>>>
>>
>>
>>
>> -- 
>> Stephen McDonald
>> http://jupo.org 
>>
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "Mezzanine Users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/mezzanine-users/Ltmdrd3D2aw/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, send an email to 
>> mezzanine-use...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

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

Re: [mezzanine-users] first steps with fabric deployment

2014-02-25 Thread Federico Bruni
2014-02-25 11:47 GMT+01:00 :

> I have just deployed my first Mezzanine project and I agree with what you
> say: the deployment was clearly the most difficult part.
> I used fabric too, but it's not very easy but once it works it really
> saves you a lot of time. I have the feeling that when a step goes wrong in
> fab deploy, it begins to do strange things.
> So, instead running fab all, I run:
> * fab install
> * fab create
> * fab deploy


Thank you, it helped a lot.
I'm trying to make 'fab create' work until the end. I've made many step
forward, but now I'm getting this error:

django.db.utils.OperationalError: fe_sendauth: no password supplied

This is probably because I haven't defined DB_PASS in settings.py.
What's the secure way to define these sensible variables (passwords, secret
keys, etc.) out of the source repository (even if it's private)?

Another important question: if 'fab create' fails and I want to run it
again, it seems that I have no other option than accepting the removal and
start again from the beginning. A huge waste of time and resources. There's
no other way?

-- 
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/groups/opt_out.


Re: [mezzanine-users] first steps with fabric deployment

2014-02-24 Thread Federico Bruni
2014-02-23 20:24 GMT+01:00 Ken Bolton :

> You might have luck with the Django's dumpdata and loaddata management
> commands. Alternatively, django-extensions has a dumpscript command that
> may work.
>

Ok, I've used dumpdata and loaddata to move from sqlite to postgresql.
Now I'm still trying to make fabric work. I'm not that far away.. Now I
have the project folder copied inside the virtualenv, the postgresql
database on the server is set.
I've launched 'fab all', which _should_ have installed all the needed
packages. Then I launch 'fab deploy' and I get this error:

 File "", line 1, in 
[xxx.xxx.xxx.xxx] out: ImportError: No module named django.conf
[xxx.xxx.xxx.xxx] out:

I see that the virtualenv doesn't have any django package. fab failed? I
guess it was supposed to install also the pypi packages according to the
requirements file. In my settings.py the path is defined correctly:
"REQUIREMENTS_PATH": "requirements.txt"

Anyway, I decided to do it manually on the server.
But I'm still far away from the end and tons of questions on how to make
the deploy. Now I have just 4 hours to sleep.

I thought that deploying was the easier part. I was really wrong!

-- 
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/groups/opt_out.


Re: [mezzanine-users] doc: dead link in third party modules page

2014-02-23 Thread Federico Bruni
Ok, got it. I'll do it tomorrow.

BTW, I spotted a couple of errors in the Italian translation. I'll send a
pull request for this also, sooner or later
Il 24/feb/2014 00:07 "Stephen McDonald"  ha scritto:

> Rather than emailing the list it'd be better to make the change yourself
> and send a pull request.
>
> It's really no effort for myself, but it's worth making the point here :-)
>
> Could you do that?
>
>
> On Mon, Feb 24, 2014 at 9:02 AM, Federico Bruni wrote:
>
>> mezzanine-mailchimp is now here:
>> https://bitbucket.org/naritas/mezzanine-mailchimp
>>
>> the link in the doc should be updated
>>
>> --
>> 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/groups/opt_out.
>>
>
>
>
> --
> Stephen McDonald
> http://jupo.org
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Mezzanine Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/mezzanine-users/E0_GIsN2vJk/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> mezzanine-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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/groups/opt_out.


Re: [mezzanine-users] first steps with fabric deployment

2014-02-23 Thread Federico Bruni
2014-02-23 18:45 GMT+01:00 Federico Bruni :

> Ok, I should have looked up deploy/nginx.conf and deploy/live_settings.py
> in my project.
> How can I transfer the sqlite database of development to postgresql in
> production? Do you know a specific tutorial on this?
>

I've tried starting with sqlite3 and modified deploy/live_settings
accordingly, but still no luck. fab tries to set up the postgres database.
No idea where this is configured:

$ grep postgres deploy/*
deploy/live_settings.py:# Ends with "postgresql_psycopg2", "mysql",
"sqlite3" or "oracle".
deploy/live_settings.py:#"ENGINE":
"django.db.backends.postgresql_psycopg2",

This is the database section in my deploy/live_settings.py:

DATABASES = {
"default": {
# Ends with "postgresql_psycopg2", "mysql", "sqlite3" or "oracle".
#"ENGINE": "django.db.backends.postgresql_psycopg2",
"ENGINE": "sqlite3",
# DB name or path to database file if using sqlite3.
#"NAME": "%(proj_name)s",
"NAME": "dev.db",
# Not used with sqlite3.
#"USER": "%(proj_name)s",
# Not used with sqlite3.
#"PASSWORD": "%(db_pass)s",
# Set to empty string for localhost. Not used with sqlite3.
#"HOST": "127.0.0.1",
# Set to empty string for default. Not used with sqlite3.
#"PORT": "",
}
}

I guess that there's some problem with the path of dev.db or how it should
be synced to the server. But again I can't find any information about it.
(Mezzanine documentation is very clear, full of good links and probably
relatively easy to maintain.. but it's quite hard for a newbie).
Any help is much appreciated.

Thanks!
Federico

-- 
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/groups/opt_out.


[mezzanine-users] doc: dead link in third party modules page

2014-02-23 Thread Federico Bruni
mezzanine-mailchimp is now here:
https://bitbucket.org/naritas/mezzanine-mailchimp

the link in the doc should be updated

-- 
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/groups/opt_out.


Re: [mezzanine-users] first steps with fabric deployment

2014-02-23 Thread Federico Bruni
Il giorno domenica 23 febbraio 2014 18:37:14 UTC+1, Federico Bruni ha 
scritto:
>
>
> Let's start with the nginx error:
>
> Starting nginx: nginx: [emerg] 
> SSL_CTX_use_certificate_chain_file("/etc/nginx/conf/project.crt") failed 
> (SSL: error:02001002:system library:fopen:No such file or directory 
> error:20074002:BIO routines:FILE_CTRL:system lib error:140DC002:SSL 
> routines:SSL_CTX_use_certificate_chain_file:system lib)
> nginx: configuration file /etc/nginx/nginx.conf test failed
>  
> This is because /etc/nginx/sites-enabled/project.conf contains these two 
> lines:
>
> ssl_certificate  conf/project.crt;
> ssl_certificate_key  conf/project.key;
>
> This time I've deleted (instead of commenting) these lines, restarted 
> nginx and everything seems Ok.
> But I'd like to fix it, because if I have to re-run 'fab all' the nginx 
> conf file will probably be overwritten.
>
>
Ok, I should have looked up deploy/nginx.conf and deploy/live_settings.py 
in my project.
How can I transfer the sqlite database of development to postgresql in 
production? Do you know a specific tutorial on this?

-- 
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/groups/opt_out.


Re: [mezzanine-users] first steps with fabric deployment

2014-02-23 Thread Federico Bruni
Il giorno domenica 23 febbraio 2014 18:01:23 UTC+1, Kenneth Bolton ha 
scritto:

> Federico,
>
> Have you reviewed the tutorial at 
> http://bscientific.org/blog/mezzanine-fabric-git-vagrant-joy/? It may be 
> a bit dated, but should work.
>
>
Hi Ken

yes, I did before asking here. Unfortunately it didn't help me.

Let's start with the nginx error:

Starting nginx: nginx: [emerg] 
SSL_CTX_use_certificate_chain_file("/etc/nginx/conf/project.crt") failed 
(SSL: error:02001002:system library:fopen:No such file or directory 
error:20074002:BIO routines:FILE_CTRL:system lib error:140DC002:SSL 
routines:SSL_CTX_use_certificate_chain_file:system lib)
nginx: configuration file /etc/nginx/nginx.conf test failed
 
This is because /etc/nginx/sites-enabled/project.conf contains these two 
lines:

ssl_certificate  conf/project.crt;
ssl_certificate_key  conf/project.key;

This time I've deleted (instead of commenting) these lines, restarted nginx 
and everything seems Ok.
But I'd like to fix it, because if I have to re-run 'fab all' the nginx 
conf file will probably be overwritten.

There's only a *small* problem :-) Django is not running and my virtualenv 
doesn't contain the project/ folder. Probably the production database is 
not even setup.
What should  I tell to Fabric?

-- 
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/groups/opt_out.


[mezzanine-users] first steps with fabric deployment

2014-02-23 Thread Federico Bruni
Hi

I'm trying Fabric for the first time and after several tries I have to ask 
for help.
Do you know a simple step by step tutorial? There are many detailed 
tutorials but I need the big picture.

IIUC, 'fab all' should care for everything needed, if I set up correctly 
the variables in settings.py.
I managed to install the dependencies on my server and start the 
virtualenv. I had just an issue with the authentication to my private git 
repository. Not solved yet.

Then I had problem with the nginx configuration file in sites-enabled 
(created by fab), because it had two lines pointing to not existing files 
(conf/project.crt or something like that).
I uncommented those lines and managed to restart nginx. Then the conf file 
disappeared (!).

Now when I run 'fab all' I'm having issues with the PostgreSQL database. 
SHould I create it by myself or let fabric do it for me?

Fabric seems a very nice tool but I need an easy tutorial to get started.
Can you help me?

Many thanks
Federico

-- 
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/groups/opt_out.


Re: [mezzanine-users] gallery zip import and collections directory

2014-02-15 Thread Federico Bruni
yes, just upgraded to 3.0.9 and it works fine
thanks!

Il giorno venerdì 14 febbraio 2014 02:37:27 UTC+1, Josh Cartmell ha scritto:
>
> Hey frederico, I would guess that is the same issue with serving media on 
> the dev server that was recently fixed, see discussion at 
> https://groups.google.com/d/msg/mezzanine-users/SnSEsx0g3lo/DdI4KZW8v94J
>
>
> On Thu, Feb 13, 2014 at 3:58 PM, Federico Bruni 
> 
> > wrote:
>
>> I've realized that the problem is not specific of zip import. It occurs 
>> with any method used to add an image to a gallery.
>> I've verified also that the problem doesn't occur on version 3.0.7.
>>
>> I've added an issue here:
>> https://github.com/stephenmcd/mezzanine/issues/952
>>
>>  
>>
>> 2014-02-08 23:57 GMT+01:00 Federico Bruni 
>> >:
>>
>>>  I've just tried to upload some images into a gallery using the zip 
>>> import.
>>> The files are saved in static/media/uploads/collections/
>>>
>>> When I view the gallery, Mezzanine is not able to see these images, even 
>>> though the path is correct. I get a 404 error.
>>> If I create a gallery using images saved in 
>>> static/media/uploads/galleries, everything works fine. It seems that the 
>>> problem is in the collections/ directory, but I have no idea of what it may 
>>> be (for example, the permissions are correct).
>>>
>>> Can you help me to debug this problem?
>>> I'm using Mezzanine 3.0.8.
>>>
>>> Thanks
>>> Federico
>>>
>>> -- 
>>> You received this message because you are subscribed to a topic in the 
>>> Google Groups "Mezzanine Users" group.
>>> To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/mezzanine-users/lXx2v2NoFtE/unsubscribe
>>> .
>>> To unsubscribe from this group and all its topics, send an email to 
>>> mezzanine-use...@googlegroups.com .
>>>
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>  -- 
>> 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/groups/opt_out.
>>
>
>

-- 
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/groups/opt_out.


Re: [mezzanine-users] gallery zip import and collections directory

2014-02-13 Thread Federico Bruni
I've realized that the problem is not specific of zip import. It occurs
with any method used to add an image to a gallery.
I've verified also that the problem doesn't occur on version 3.0.7.

I've added an issue here:
https://github.com/stephenmcd/mezzanine/issues/952



2014-02-08 23:57 GMT+01:00 Federico Bruni :

> I've just tried to upload some images into a gallery using the zip import.
> The files are saved in static/media/uploads/collections/
>
> When I view the gallery, Mezzanine is not able to see these images, even
> though the path is correct. I get a 404 error.
> If I create a gallery using images saved in
> static/media/uploads/galleries, everything works fine. It seems that the
> problem is in the collections/ directory, but I have no idea of what it may
> be (for example, the permissions are correct).
>
> Can you help me to debug this problem?
> I'm using Mezzanine 3.0.8.
>
> Thanks
> Federico
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Mezzanine Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/mezzanine-users/lXx2v2NoFtE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> mezzanine-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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/groups/opt_out.


Re: [mezzanine-users] write raw html inside a page

2014-02-13 Thread Federico Bruni
2014-02-08 22:35 GMT+01:00 Danny :

> On 8/02/2014 11:54 PM, Federico Bruni wrote:
>
>> Hi
>>
>> I wonder what's currently the best method to include raw html in a page.
>> I found this thread:
>> https://groups.google.com/forum/#!topic/mezzanine-users/_amLgOCQD5Y
>>
>> But I see that there's an "Edit HTML source" button in the editor, which
>> _might_ allow to write raw html.
>> Unfortunately I get a Bad request (400) every time I click on it.
>>
>> I'm using Mezzanine 3.0.7
>>
>
> Update to 3.0.8, there were a few fixes for the 400 error from TinyMCE
> done there.
>
>
Hi Danny

I haven't had the time to reply so far, but indeed on 3.0.8 it works.


>
>
>> Thanks
>> Federico
>>
>> PS I'm trying to include a 

[mezzanine-users] gallery zip import and collections directory

2014-02-08 Thread Federico Bruni
I've just tried to upload some images into a gallery using the zip import.
The files are saved in static/media/uploads/collections/

When I view the gallery, Mezzanine is not able to see these images, even 
though the path is correct. I get a 404 error.
If I create a gallery using images saved in static/media/uploads/galleries, 
everything works fine. It seems that the problem is in the collections/ 
directory, but I have no idea of what it may be (for example, the 
permissions are correct).

Can you help me to debug this problem?
I'm using Mezzanine 3.0.8.

Thanks
Federico

-- 
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/groups/opt_out.


[mezzanine-users] write raw html inside a page

2014-02-08 Thread Federico Bruni
Hi

I wonder what's currently the best method to include raw html in a page. I 
found this thread:
https://groups.google.com/forum/#!topic/mezzanine-users/_amLgOCQD5Y

But I see that there's an "Edit HTML source" button in the editor, which 
_might_ allow to write raw html.
Unfortunately I get a Bad request (400) every time I click on it.

I'm using Mezzanine 3.0.7

Thanks
Federico

PS I'm trying to include a 

[mezzanine-users] Re: homepage: removing a column defined in base.html

2014-02-08 Thread Federico Bruni
Il giorno sabato 8 febbraio 2014 13:49:35 UTC+1, Federico Bruni ha scritto:
>
> I've just realized that I'd better change bootsrap.css
> I'm reading this page:
> http://getbootstrap.com/examples/grid/
>
>
Yes, sorry for the noise (again).
I changed base.html to use columns 2 and 10 of bootstrap and now I get what 
I want:





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



{% block main %}{% endblock %}




 

-- 
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/groups/opt_out.


[mezzanine-users] Re: homepage: removing a column defined in base.html

2014-02-08 Thread Federico Bruni
I've just realized that I'd better change bootsrap.css
I'm reading this page:
http://getbootstrap.com/examples/grid/


Il giorno sabato 8 febbraio 2014 13:15:16 UTC+1, Federico Bruni ha scritto:
>
> Hi
>
> I'm building the homepage and I'm trying to center align an image slider 
> (I'm using bootstrap carousel).
> The problem is that it's placed inside the col-md-7-middle div while I'd 
> like to place it in the row div (only in the home page).
>
> In my base.html I have:
>
> 
> 
>
> 
> {% block main %}{% endblock %}
> 
>
> 
> 
>
> I don't want to change it, because it's ok for the other pages.
> But I'd like my index.html to be based on this  template:
>
> 
> 
>   {% block main %}{% endblock %}
> 
> 
>
> How can I achieve it?
>
> Many thanks
> Federico
>

-- 
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/groups/opt_out.


[mezzanine-users] homepage: removing a column defined in base.html

2014-02-08 Thread Federico Bruni
Hi

I'm building the homepage and I'm trying to center align an image slider 
(I'm using bootstrap carousel).
The problem is that it's placed inside the col-md-7-middle div while I'd 
like to place it in the row div (only in the home page).

In my base.html I have:





{% block main %}{% endblock %}





I don't want to change it, because it's ok for the other pages.
But I'd like my index.html to be based on this  template:



  {% block main %}{% endblock %}



How can I achieve it?

Many thanks
Federico

-- 
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/groups/opt_out.


Re: [mezzanine-users] select multiple images for a gallery

2014-02-02 Thread Federico Bruni
Oooops, how did I miss it? It works great.
Thanks and sorry for the noise


2014/2/3 Stephen McDonald 

> You've tried to upload the zip file into one of the image fields.
>
> There's a specific field dedicated to the gallery's zip import:
>
> http://cl.ly/image/3c002l1t313C
>
>
> On Mon, Feb 3, 2014 at 9:19 AM, Federico Bruni  wrote:
>
>> I can see this feature in galleries/models.py, but I cannot make it work.
>> I cannot upload zip files, as far as I can see. These are the supported
>> formats (as shown by the help):
>>
>> Code (.html, .py, .js, .css)
>>
>> Image (.jpg, .jpeg, .gif, .png, .tif, .tiff)
>>
>> Audio (.mp3, .mp4, .wav, .aiff, .midi, .m4p)
>>
>> Video (.mov, .wmv, .mpeg, .mpg, .avi, .rm)
>>
>> Document (.pdf, .doc, .rtf, .txt, .xls, .csv)
>>
>> The file browser forces me to select only files with these  extensions.
>>
>>
>> 2014/2/2 Luc Milland 
>>
>>>  Hi,
>>> you can upload a zip file.
>>>
>>> Luc
>>>
>>> Le dimanche 02 février 2014 à 13:35 -0800, Federico Bruni a écrit :
>>> > Hi
>>> >
>>> > There's a way to add multiple images at once to a gallery?
>>> >
>>> > Currently I have to add the images one by one by clicking on the first
>>> icon
>>> > (the light blue one, with the arrow).
>>> > I see that the second icon is a kind of check box which might do what
>>> I'm
>>> > looking for, but if I click on it nothing happens. It's a bug or I'm
>>> > missing something?
>>> >
>>> > I'm using Mezzanine 3.0.7
>>> >
>>> > Thanks
>>> > Federico
>>> >
>>>
>>>
>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Mezzanine Users" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/mezzanine-users/r-J-MPN55QE/unsubscribe
>>> .
>>> To unsubscribe from this group and all its topics, send an email to
>>> mezzanine-users+unsubscr...@googlegroups.com.
>>>
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>  --
>> 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/groups/opt_out.
>>
>
>
>
> --
> Stephen McDonald
> http://jupo.org
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Mezzanine Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/mezzanine-users/r-J-MPN55QE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> mezzanine-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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/groups/opt_out.


Re: [mezzanine-users] select multiple images for a gallery

2014-02-02 Thread Federico Bruni
I can see this feature in galleries/models.py, but I cannot make it work.
I cannot upload zip files, as far as I can see. These are the supported
formats (as shown by the help):

Code (.html, .py, .js, .css)

Image (.jpg, .jpeg, .gif, .png, .tif, .tiff)

Audio (.mp3, .mp4, .wav, .aiff, .midi, .m4p)

Video (.mov, .wmv, .mpeg, .mpg, .avi, .rm)

Document (.pdf, .doc, .rtf, .txt, .xls, .csv)

The file browser forces me to select only files with these  extensions.


2014/2/2 Luc Milland 

> Hi,
> you can upload a zip file.
>
> Luc
>
> Le dimanche 02 février 2014 à 13:35 -0800, Federico Bruni a écrit :
> > Hi
> >
> > There's a way to add multiple images at once to a gallery?
> >
> > Currently I have to add the images one by one by clicking on the first
> icon
> > (the light blue one, with the arrow).
> > I see that the second icon is a kind of check box which might do what I'm
> > looking for, but if I click on it nothing happens. It's a bug or I'm
> > missing something?
> >
> > I'm using Mezzanine 3.0.7
> >
> > Thanks
> > Federico
> >
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Mezzanine Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/mezzanine-users/r-J-MPN55QE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> mezzanine-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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/groups/opt_out.


[mezzanine-users] select multiple images for a gallery

2014-02-02 Thread Federico Bruni
Hi

There's a way to add multiple images at once to a gallery?

Currently I have to add the images one by one by clicking on the first icon 
(the light blue one, with the arrow).
I see that the second icon is a kind of check box which might do what I'm 
looking for, but if I click on it nothing happens. It's a bug or I'm 
missing something?

I'm using Mezzanine 3.0.7

Thanks
Federico

-- 
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/groups/opt_out.


Re: [mezzanine-users] change language of Admin site in Mezzanine 3.0.4

2014-01-25 Thread Federico Bruni
Oh, I missed it! It was set to False. Now it works, thanks!

Il giorno venerdì 24 gennaio 2014 02:15:36 UTC+1, Stephen McDonald ha 
scritto:
>
> Make sure you have in your settings:
>
> USE_I18N = True
>
>
> On Fri, Jan 24, 2014 at 9:28 AM, Federico Bruni 
> 
> > wrote:
>
>> Hi all
>>
>> it's my first post here. I've just started using Mezzanine and it seems a 
>> wonderful platform.
>> I have a very simple question(s) about locale.
>> I'm trying to change the language of the Admin site.  I see that as soon 
>> as I add a language to settings.py, e.g.:
>>
>> LANGUAGES = (
>> ('en', _('English')),
>> ('it', _('Italian')),
>> )
>>
>> a drop-down menu appears in the Admin site, but if I choose Italian I 
>> can't see any change.
>> I've also set this:
>>
>> LANGUAGE_CODE = "it-IT"
>>
>> Which step I'm missing?
>>
>> On a side note, I've also found a problem working inside a virtualenv, 
>> which had a wrong locale (no UTF-8). I got an error when I opened the 
>> default gallery page (which contains image files with accented letters).
>> I changed the  variables and everything worked correctly:
>>
>> export LANG=it_IT.UTF-8
>> export LC_ALL=it_IT.UTF-8
>>
>> What surprised me is that these settings are kept when I close the 
>> virtualenv and I wonder where these have been stored (a shell usually 
>> forgets what you define on the terminal, when you close it; it remembers 
>> only what you save in .bashrc).
>> Well, this question is about virtualenv and not Mezzanine, but still 
>> about language and locale :-)
>>
>> Thank you in advance
>> Federico
>>  
>> -- 
>> 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/groups/opt_out.
>>
>
>
>
> -- 
> 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/groups/opt_out.


[mezzanine-users] change language of Admin site in Mezzanine 3.0.4

2014-01-23 Thread Federico Bruni
Hi all

it's my first post here. I've just started using Mezzanine and it seems a 
wonderful platform.
I have a very simple question(s) about locale.
I'm trying to change the language of the Admin site.  I see that as soon as 
I add a language to settings.py, e.g.:

LANGUAGES = (
('en', _('English')),
('it', _('Italian')),
)

a drop-down menu appears in the Admin site, but if I choose Italian I can't 
see any change.
I've also set this:

LANGUAGE_CODE = "it-IT"

Which step I'm missing?

On a side note, I've also found a problem working inside a virtualenv, 
which had a wrong locale (no UTF-8). I got an error when I opened the 
default gallery page (which contains image files with accented letters).
I changed the  variables and everything worked correctly:

export LANG=it_IT.UTF-8
export LC_ALL=it_IT.UTF-8

What surprised me is that these settings are kept when I close the 
virtualenv and I wonder where these have been stored (a shell usually 
forgets what you define on the terminal, when you close it; it remembers 
only what you save in .bashrc).
Well, this question is about virtualenv and not Mezzanine, but still about 
language and locale :-)

Thank you in advance
Federico

-- 
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/groups/opt_out.