Re: [mezzanine-users] deploying Mezzanine to a VPS

2018-08-17 Thread Eduardo Rivas
Fabric is compatible with Python 2 only.

Try pip install fabric3

On Fri, Aug 17, 2018, 11:13 AM Amir <7xm...@gmail.com> wrote:

> *I did, version Fabric==1.14.0 is now installed. Now that I issue fab
> secure, I get:*
>
> Traceback (most recent call last):
>>
>>   File "/home/amir/blogenv/bin/fab", line 7, in 
>>
>> from fabric.main import main
>>
>>   File "/home/amir/blogenv/lib/python3.6/site-packages/fabric/main.py",
>>> line 13, in 
>>
>> from operator import isMappingType
>>
>> ImportError: cannot import name 'isMappingType'
>>
>>
> On Friday, August 17, 2018 at 9:26:04 PM UTC+4:30, Eduardo Rivas wrote:
>>
>> Try using Fabric version 1: pip install -U “fabric<2”
>>
>>
>>
>> *From: *Kenneth L Bolton
>> *Sent: *Friday, August 17, 2018 10:42 AM
>> *To: *mezzani...@googlegroups.com
>> *Subject: *Re: [mezzanine-users] deploying Mezzanine to a VPS
>>
>>
>>
>>
>> https://groups.google.com/forum/#!searchin/mezzanine-users/fabric%7Csort:date/mezzanine-users/XZy6BGyr6Bo/zY_nEjmSBAAJ
>>
>>
>>
>> Amir <7xm...@gmail.com> writes:
>>
>>
>>
>> > *So I am finally done with the development, now I want to
>>
>> > deploy. *
>>
>> > *I have followed the instruction
>>
>> > in http://mezzanine.jupo.org/docs/deployment.html.*
>>
>> >
>>
>> > *I have configured local_settings.py. Next step says issue this
>>
>> > command:
>>
>> > fab secure *
>>
>> > *I did and I got: Command 'fab' not found, (I guess it must have
>>
>> > been
>>
>> > installed when I installed the mezzanine but it hasn't)*
>>
>> >
>>
>> > *So I installed fabric inside my project with the activated
>>
>> > virtual
>>
>> > environment using this command: pip install fabric*
>>
>> >
>>
>> > *after that again I entered: fab secure, which gives me this
>>
>> > error:*
>>
>> >
>>
>> > Traceback (most recent call last):
>>
>> >>
>>
>> >>   File "/home/amir/blogenv/bin/fab", line 11, in 
>>
>> >>
>>
>> >> sys.exit(program.run())
>>
>> >>
>>
>> >>   File
>>
>> >>   "/home/amir/blogenv/lib/python3.6/site-packages/invoke/program.py",
>>
>> >>> line 324, in run
>>
>> >>
>>
>> >> self.parse_collection()
>>
>> >>
>>
>> >>   File
>>
>> >>   "/home/amir/blogenv/lib/python3.6/site-packages/invoke/program.py",
>>
>> >>> line 408, in parse_collection
>>
>> >>
>>
>> >> self.load_collection()
>>
>> >>
>>
>> >>   File
>>
>> >>   "/home/amir/blogenv/lib/python3.6/site-packages/fabric/main.py",
>>
>> >>> line 73, in load_collection
>>
>> >>
>>
>> >> super(Fab, self).load_collection()
>>
>> >>
>>
>> >>   File
>>
>> >>   "/home/amir/blogenv/lib/python3.6/site-packages/invoke/program.py",
>>
>> >>> line 599, in load_collection
>>
>> >>
>>
>> >> module, parent = loader.load(coll_name)
>>
>> >>
>>
>> >>   File
>>
>> >>   "/home/amir/blogenv/lib/python3.6/site-packages/invoke/loader.py",
>>
>> >>> line 76, in load
>>
>> >>
>>
>> >> module = imp.load_module(name, fd, path, desc)
>>
>> >>
>>
>> >>   File "/home/amir/blogenv/lib/python3.6/imp.py", line 235, in
>>
>> >>   load_module
>>
>> >>
>>
>> >> return load_source(name, filename, file)
>>
>> >>
>>
>> >>   File "/home/amir/blogenv/lib/python3.6/imp.py", line 172, in
>>
>> >>   load_source
>>
>> >>
>>
>> >> module = _load(spec)
>>
>> >>
>>
>> >>   File "", line 684, in _load
>>
>> >>
>>
>> >>   File "", line 665, in
>>
>> >>   _load_unlocked
>>
>> >>
>>
>> >>   File "", line 678, in
>>
>> >>   exec_module
>>
>> >>
>>
>> >>   File "", line 219, in
>>
>> >>> _call_with_frames_removed
>>
>> >>
>>
>> >>   File "/home/amir/blogenv/problog/fabfile.py", line 16, in
>>
>> >>   
>>
>> >>
>>
>> >> from fabric.api import abort, env, cd, prefix, sudo as
>>
>> >> _sudo, run as
>>
>> >>> _run, \
>>
>> >>
>>
>> >> ModuleNotFoundError: No module named 'fabric.api'
>>
>> >>
>>
>> >> What am I getting wrong here?
>>
>>
>>
>>
>>
>> --
>>
>> Ken Bolton
>>
>>
>>
>> --
>>
>> You received this message because you are subscribed to the Google Groups
>> "Mezzanine Users" group.
>>
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to mezzanine-use...@googlegroups.com.
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mezzanine-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

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


RE: [mezzanine-users] deploying Mezzanine to a VPS

2018-08-17 Thread Eduardo Rivas
Try using Fabric version 1: pip install -U “fabric<2”

From: Kenneth L Bolton
Sent: Friday, August 17, 2018 10:42 AM
To: mezzanine-users@googlegroups.com
Subject: Re: [mezzanine-users] deploying Mezzanine to a VPS

https://groups.google.com/forum/#!searchin/mezzanine-users/fabric%7Csort:date/mezzanine-users/XZy6BGyr6Bo/zY_nEjmSBAAJ

Amir <7xm...@gmail.com> writes:

> *So I am finally done with the development, now I want to 
> deploy. *
> *I have followed the instruction 
> in http://mezzanine.jupo.org/docs/deployment.html.*
>
> *I have configured local_settings.py. Next step says issue this 
> command: 
> fab secure *
> *I did and I got: Command 'fab' not found, (I guess it must have 
> been 
> installed when I installed the mezzanine but it hasn't)*
>
> *So I installed fabric inside my project with the activated 
> virtual 
> environment using this command: pip install fabric*
>
> *after that again I entered: fab secure, which gives me this 
> error:*
>
> Traceback (most recent call last):
>>
>>   File "/home/amir/blogenv/bin/fab", line 11, in 
>>
>> sys.exit(program.run())
>>
>>   File 
>>   "/home/amir/blogenv/lib/python3.6/site-packages/invoke/program.py", 
>>> line 324, in run
>>
>> self.parse_collection()
>>
>>   File 
>>   "/home/amir/blogenv/lib/python3.6/site-packages/invoke/program.py", 
>>> line 408, in parse_collection
>>
>> self.load_collection()
>>
>>   File 
>>   "/home/amir/blogenv/lib/python3.6/site-packages/fabric/main.py", 
>>> line 73, in load_collection
>>
>> super(Fab, self).load_collection()
>>
>>   File 
>>   "/home/amir/blogenv/lib/python3.6/site-packages/invoke/program.py", 
>>> line 599, in load_collection
>>
>> module, parent = loader.load(coll_name)
>>
>>   File 
>>   "/home/amir/blogenv/lib/python3.6/site-packages/invoke/loader.py", 
>>> line 76, in load
>>
>> module = imp.load_module(name, fd, path, desc)
>>
>>   File "/home/amir/blogenv/lib/python3.6/imp.py", line 235, in 
>>   load_module
>>
>> return load_source(name, filename, file)
>>
>>   File "/home/amir/blogenv/lib/python3.6/imp.py", line 172, in 
>>   load_source
>>
>> module = _load(spec)
>>
>>   File "", line 684, in _load
>>
>>   File "", line 665, in 
>>   _load_unlocked
>>
>>   File "", line 678, in 
>>   exec_module
>>
>>   File "", line 219, in 
>>> _call_with_frames_removed
>>
>>   File "/home/amir/blogenv/problog/fabfile.py", line 16, in 
>>   
>>
>> from fabric.api import abort, env, cd, prefix, sudo as 
>> _sudo, run as 
>>> _run, \
>>
>> ModuleNotFoundError: No module named 'fabric.api'
>>
>> What am I getting wrong here? 


-- 
Ken Bolton

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

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


RE: [mezzanine-users] Admin redirect not working

2018-08-27 Thread Eduardo Rivas
Make sure the URL you’re trying to redirect is not assigned to a Page or any 
view. The redirects will only kick in if the URL raises a 404.

From: Travis
Sent: Sunday, August 26, 2018 5:57 PM
To: Mezzanine Users
Subject: [mezzanine-users] Admin redirect not working

Anyone having issues with the admin redirects not working? A simple example on 
a fresh install like:
Redirect From: /about/team/ 
Redirect To: https://www.google.com/

should work right? Is there another setting I'm missing?
Any known issues?
-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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


RE: [mezzanine-users] Want to integrate a wiki?

2018-08-31 Thread Eduardo Rivas
Just my two cents:

- You could fork Mezzanine Wiki or contribute back to it to update it to 
support the latest version of Mezzanine.
- You can use Django apps and add them to your Mezzanine project, no need to 
abandon Mezzanine to use them.

From: John Whitmore
Sent: Friday, August 31, 2018 10:40 AM
To: Mezzanine Users
Subject: [mezzanine-users] Want to integrate a wiki?

I've been looking into mezzanine over the past number of weeks, when I get a 
chance. I wanted to integrate a wiki into my site but mezzanine-wiki isn't 
working for me and the last commit to that project was in 2014, so I assume 
it's more or less dead.

So how to fulfil this requirement? I guess I could try integrate a wiki of my 
own creation or perhaps the easiest solution is assembling a desperate 
collection of Django Apps and not use mezzanine. I'm not sure which way to 
proceed, any advice would be gratefully received
-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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


Re: [mezzanine-users] Modifying behavior of TimeStamped `updated` timestamp for subclasses

2018-04-13 Thread Eduardo Rivas
Haven't tried this but I think it should work. It is an extra DB table 
but doesn't require monkey patching anything and it can leave in its own 
app:


Create a new model called LastUpdate or TimeStamp, with a datetime field 
and a generic relation 
 
to any model. Then use signals attached to the models you're interested 
in to update_or_create LastUpdate instances when a model is saved 
according to your criteria.


Now you should have a reverse relation in BlogPost (and any model you 
want) to get the LastUpdate instance. If that doesn't work you should 
still be able to filter LastUpdate instances by ContenType and PK.



On 2018-04-13 10:33 AM, Chris Hawes wrote:
I want to display a timestamp on each BlogPost showing when the post 
was last updated. My first attempt at this was to just show the 
`updated` timestamp from the TimeStamped superclass. However, this 
timestamp is bumped up every time the post is saved for any reason. 
For instance if a user adds a comment, BlogPost gets saved in order to 
update its comment_count field, and `updated` gets bumped as a result. 
That's no good.


I also have two other RichText-TimeStamped classes that require 
similar functionality. Since I own those classes, the obvious thing 
would be to make an abstract superclass that adds a new modified 
timestamp field and updates it appropriately on save.


But what do I do about BlogPost? I don't own it so my options are 
limited, and I am struggling to come up with a nice way to handle it.


  * I could add a field through EXTRA_MODEL_FIELDS and monkey patch
BlogPost.save() to update it. But I would prefer to use the same
logic for the other two classes as for BlogPost.
  * I could monkey patch TimeStamped.save(), but would have to put a
super ugly hack so that it only affects the 3 subclasses that I
care about.
  * Subclassing BlogPost might be an option, but it would create a new
table, which is not fun, plus I already have a bunch of existing
blog posts so I'm not sure offhand what I'd do about those.

I am wondering if anyone has a better idea? Is there a nice way to 
handle cases like this that I am missing?

--
You received this message because you are subscribed to the Google 
Groups "Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to mezzanine-users+unsubscr...@googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


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


Re: [mezzanine-users] Re: What's wrong in my local_settings / how to do basic deploy to aws

2018-04-23 Thread Eduardo Rivas

Hi Wolfgang.

Production and development databases are kept separate, as well as media 
uploads. If you'd like to upload your database and media files from dev 
to prod you can add custom fabric tasks that do so.



On 2018-04-23 1:13 PM, Wolfgang M wrote:


You were perfectly right Christian. I needed the ssh_user:ubuntu and 
ssh_key_path settings in my fabric local_settings. Also Amazon Linux 
is RHEL based and uses yum not apt-get.



Those changes allowed me to run fab all.


I have some more questions about content deployment since after my 
deploy I thought it hadn't worked as my local edits weren't deployed. 
I'll try and sort that out on a relevant thread.


On Friday, April 20, 2018 at 2:34:53 AM UTC-5, Christian Hoffmann wrote:

Perhaps better try Ubuntu 16.04 AMI for your first deployment. --
Christian

--
You received this message because you are subscribed to the Google 
Groups "Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to mezzanine-users+unsubscr...@googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


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


RE: [mezzanine-users] Move the deployment to new VPS along with thecontents

2018-10-16 Thread Eduardo Rivas
You’ll need to create a database dump, copy it over to the new server, and 
restore it. If you’re using postgres the commands are pg_dump and pg_restore.

You’ll also need to move media files. I recommend you use rsync from one server 
to the other. The folder you want to copy is /static/media/uploads.

From: Amir
Sent: Tuesday, October 16, 2018 7:20 AM
To: Mezzanine Users
Subject: [mezzanine-users] Move the deployment to new VPS along with thecontents

Hello guys
I have deployed mezzanine to a VPS and now I want to move the whole project to 
a new VPS from another provider.
The deployment would not be of an issue, but how do I move the database and the 
contents from the previous VPS to the new one?
-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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


RE: [mezzanine-users] Move the deployment to new VPS along withthecontents

2018-10-16 Thread Eduardo Rivas
Always happy to help :) And yes, Digital Ocean is a popular and tried host. You 
can also try Linode. The thing with VPS is you’re responsible for maintaining 
and updating the operating system. You could look into managed hosted solutions 
if you don’t want to do that.

The other option is to move to something like AWS, Azure, or Google Cloud 
Platform. In some configurations you only pay for resource usage (CPU, memory, 
disk) and they abstract away the server maintenance. Those tend to be more 
expensive though, and the deployment process would change significantly.

From: Amir
Sent: Tuesday, October 16, 2018 7:35 AM
To: Mezzanine Users
Subject: Re: [mezzanine-users] Move the deployment to new VPS along 
withthecontents

Eduardo, you are a valuable asset to the Mezzanine project. Thanx for being 
here. 
Do you have any recommendation for the VPS host? I am considering DigitalOcean.
I am a bit worried about the security stuff.

On Tuesday, October 16, 2018 at 5:52:37 PM UTC+3:30, Eduardo Rivas wrote:
You’ll need to create a database dump, copy it over to the new server, and 
restore it. If you’re using postgres the commands are pg_dump and pg_restore.
 
You’ll also need to move media files. I recommend you use rsync from one server 
to the other. The folder you want to copy is /static/media/uploads.
 
From: Amir
Sent: Tuesday, October 16, 2018 7:20 AM
To: Mezzanine Users
Subject: [mezzanine-users] Move the deployment to new VPS along with thecontents
 
Hello guys
I have deployed mezzanine to a VPS and now I want to move the whole project to 
a new VPS from another provider.
The deployment would not be of an issue, but how do I move the database and the 
contents from the previous VPS to the new one?
-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
 
-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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


RE: [mezzanine-users] the www and non-www version of my deployment aredifferent

2018-10-30 Thread Eduardo Rivas
Mezzanine can serve different sites depending on the domain. You have two site 
records in your database, one for www and another for non-www. All content 
(pages, blog posts, etc) is independent from one site to the other. One site is 
probably empty (no content) and that’s why it looks weird when you view it.

If looks like you want to have a single site. I suggest you go to Sites in the 
admin sidebar and delete one domain. Next you’ll have to configure your public 
facing server (nginx, apache, etc) to redirect from the secondary domain to the 
primary one.

From: Amir
Sent: Tuesday, October 30, 2018 11:05 AM
To: Mezzanine Users
Subject: [mezzanine-users] the www and non-www version of my deployment 
aredifferent

Hey all

In the non-www version of my site, everything is okay. But when I enter the 
domain with www, I only see the right panel (which is a static code) and the 
footers. 
Everything that is derived from the database is not there.

When I log-in to admin panel, on the top bar I can choose between the available 
sites, when I choose the www version and I navigate to blogs, pages, etc, there 
are nothing there.

What is the problem? What have I done wrong?

Can it be due to the following line in local_settings.py??

"DOMAINS": ["myblog.com", "www.myblog.com"]
-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
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] Static files give 404 if debug == False

2019-01-11 Thread Eduardo Rivas
Hi Christer.

The collectstatic command is a Django concept, not something specific to
Mezzanine. Even though it requires more time, a strong foundation on Django
will make your time with Mezzanine much more productive.

When you use Django's dev server, it will look into the /static directory
inside each of your apps. In production, all static files should be served
from the top-level /static directory. You need to copy all files scattered
across the app directories into this central location, and that's what the
command does.

You need to make sure your production sever is routing the /static/ url of
your site to this top level /static folder. The nginx config included with
mezzanine does that by default.

On Fri, Jan 11, 2019, 8:30 AM Christer Enfors  I don't understand how the "collectstatic" stuff works. I have a static
> directory, and inside it there are files. But if I turn off debugging in
> settings.py, then the files inside static/ suddenly give me a 404, meaning
> I only get a very bare-bones page with no CSS, no images, etc. But the
> files are still there, in the static/ directory. It's as if it's looking in
> a different static/ depending on if debug is turned on or off.
>
> This would be a lot easier if I could find some documentation about
> Mezzanine *as a CMS* - the documentation I found is for programming
> extensions for it from what I can tell. And it's great that there's
> documentation for that, but that's not what I'm looking for right now.
>
> I suspect that I am supposed to learn Django to learn how this stuff
> works, and sure, I could do that. But I'd rather not, right now. I just
> want to use Mezzanine as a CMS.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mezzanine-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: [mezzanine-users] Moving information from the development area to production....

2019-03-24 Thread Eduardo Rivas
That's correct, production and development databases are not related at
all. What I usually do is create a dump of the dev DB and restore it on the
production server.

You'll also need to upload media files as those are separate as well.

On Sun, Mar 24, 2019, 11:48 AM Bobby Neal  wrote:

>
> Stupid question... I am assuming that there is no (elegant) way to export
> pages  that have been created in the dev environment to include them on a
> production site? I assume that this is against the grain of the intended
> workflow of django/mezzanine?
>
> For example... editing of the About page or other rich text pages... I
> assume the correct work flow is to edit the bones of the site in the dev
> environment... populate that information etc in the production environment?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mezzanine-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

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


RE: [mezzanine-users] Draft show up in View All Posts

2019-02-15 Thread Eduardo Rivas
Hi Bithja.

Admin users will always see all posts. Have you tried looking at the site 
without being logged in?

From: Bithja Feuersenger
Sent: Friday, February 15, 2019 12:07 PM
To: Mezzanine Users
Subject: [mezzanine-users] Draft show up in View All Posts


Hi all,

Is it normal for blog post drafts to show up on the site under View All 
Posts?Is there a way to avoid that?

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

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


RE: [mezzanine-users] Re: Multiple Blogs

2019-06-03 Thread Eduardo Rivas
Hi Jesper.

That’s correct, you’ll need to copy the entire mezzanine.blog folder. You’ll 
also need to replace all mentions of it with your own version on settings.py 
and urls.py.

You’re essentially creating your own blog app to replace the one that ships 
with Mezzanine.

From: Jesper Joachim Sørensen
Sent: Sunday, June 2, 2019 3:44 AM
To: Mezzanine Users
Subject: Re: [mezzanine-users] Re: Multiple Blogs

Hey Eduardo, and thanks for your inputs on multiple blogs. I am currently 
creating a multiple blog for a primary schcool with a blog for each grade. I am 
following your suggestions on the steps to follow in mezzanine.
However the first point about copying all the the contents from mezzanine.blog 
made me a little confused. Normally I just copy one a file at a time to my blog 
app (eg. the blog_post_deatil.html) and then modifies this file, and then it 
will overwrite the blog_post_deatil.html in mezzanine.blog. 
However for the models I think it's different. I tried to copy the content of 
the models.py from mezzanine.blog to my blog app (same procedure as with the 
blog_post_deatil.html) but that throws me an error (something about a 
duplicate). So when you say copying all the contents from mezzanine.blog, do 
you also mean the models.py and how without getting an error?
Kind regards, Jesper

fredag den 10. august 2018 kl. 20.18.27 UTC+2 skrev Eduardo Rivas:
Sorry, don’t have enough time to write a code sample right now, but here is a 
more detailed description of the steps:
 
• Create a new application with all the contents copied from mezzanine.blog. 
Let’s call it multiblog. Add it to installed apps.
• In models.py add a new Blog model inheriting from Slugged (this will give it 
a title and slug). Register it in the admin so you can add Blog instances.
• Add foreign keys to this new Blog model to BlogPost and BlogCategory, so each 
post and category will belong to one blog. Create the required migrations. Make 
sure you expose the FK field in the admin so each post and category can choose 
to which Blog they will belong to.
• Rewrite urls.py to account for the Blog slug. For example: “/blog/some-post” 
becomes “/blog/blog-slug/some-post”. The regex for the URL should capture the 
blog slug so it will be passed to the view.
• Rewrite views.py to account for the new blog slug, and modify the querysets 
to only look into the posts / categories for a particular blog. Something like 
BlogPost.objects.filter(blog__slug=).
• Optionally rewrite the template-finding logic in the view to allow you to use 
different (per-blog) templates. For example, you could have the view load 
templates by looking inside folders that match the blog slug, like 
“templates/blog//blog_post_detail.html” and 
“templates/blog//blog_post_list.html”.
 
Hope that helps!
 
From: Amir
Sent: Thursday, August 9, 2018 7:48 AM
To: Mezzanine Users
Subject: [mezzanine-users] Re: Multiple Blogs
 
This suggestion of yours is remarkable Eduardo and I am craving to have 
multiple and separated blogs. I am a bit new to Django though, Could you 
elaborate more on the details please? I could open a topic on StackOverflow if 
you would prefer. This would be a huge help bro. 

On Tuesday, March 3, 2015 at 6:33:33 AM UTC+3:30, Eduardo Rivas wrote:
Hello Dennis. I actually needed to do this for a project a few years ago. As 
far a I know, Mezzanine doesn't support multiple blogs out of the box. What I 
did was create a "Blog" model, which simply had a slug and title, and then add 
it as FK to the standard BlogPost and BlogCategory models. After that, it's 
just a matter of updating urls and views to account for a blog_slug parameter 
to get the correct Blog instance. If you want to get fancy, you can create 
"base" templates for each blog. That way, you get unique blog posts, categories 
and templates for each blog. You'll also need to modify the queries made by the 
Admin to only return the subset of BlogPost's that match a Blog instance in 
particular.

Important note: this of course implies you're "forking" Mezzanine's blog app, 
so you will have to maintain it by yourself and install it in place of the 
default one.
-- 
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/LFhT0oryfEI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 
mezzani...@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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mezzanine-users/e0d65396-96ce-462b-acc7-796bed6d3088%40googlegroups.com.
For more options, 

RE: [mezzanine-users] Newbe question on Creating Custom Content

2019-05-07 Thread Eduardo Rivas
Hi Larry.

You’re correct; the tutorial assumes you’re comfortable writing Django 
applications. In this particular instance it assumes you have an app (a 
top-level directory, let’s call it “authors”) and you’d add the code to 
“authors/models.py” and “authors/admin.py”.

I recommend you go over the official Django tutorial where you’ll create an app 
called “polls” and learn how to modify its model and admin definitions. That 
knowledge will be essential when working with Mezzanine sites. Good luck!

From: lwat...@sc-guru.com
Sent: Tuesday, May 7, 2019 11:14 AM
To: Mezzanine Users
Subject: [mezzanine-users] Newbe question on Creating Custom Content

The tutorial says:
___

Creating Custom Content Types
In order to handle different types of pages that require more structured 
content than provided by the RichTextPage model, you can simply create your own 
models that inherit from Page. For example if we wanted to have pages that were 
authors with books:
from django.db import models
from mezzanine.pages.models import Page

# The members of Page will be inherited by the Author model, such
# as title, slug, etc. For authors we can use the title field to
# store the author's name. For our model definition, we just add
# any extra fields that aren't part of the Page model, in this
# case, date of birth.

class Author(Page):
dob = models.DateField("Date of birth")

class Book(models.Model):
author = models.ForeignKey("Author")
cover = models.ImageField(upload_to="authors")
Next you’ll need to register your model with Django’s admin to make it 
available as a content type. If your content type only exposes some new fields 
that you’d like to make editable in the admin, you can simply register your 
model using the mezzanine.pages.admin.PageAdmin class:
from django.contrib import admin
from mezzanine.pages.admin import PageAdmin
from .models import Author

admin.site.register(Author, PageAdmin)

Questions:
1) I assume the first block of code is a new .py file, called Author.py?  In 
what directory does it go?
2) The second block goes in some existing file? Which one?

I think the Tutorial assumes some knowledge of structure that I don't 
understand.

Thanks in advance for your help.

Larry
. 

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mezzanine-users/00999e73-f3da-41e3-b161-f61d13f42031%40googlegroups.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mezzanine-users/5cd1c140.1c69fb81.6421.aee2%40mx.google.com.
For more options, visit https://groups.google.com/d/optout.


RE: [mezzanine-users] Page and Site SQL Gets Triggered with View LevelCaching

2019-07-24 Thread Eduardo Rivas
Hi Matt.

My guess is that Mezzanine’s Page middleware tries to fetch a page on every 
request (as pages can have any URL). I would try to disable the middlewares you 
don’t need and see if that works.

From: Matt Mansour
Sent: Wednesday, July 24, 2019 10:05 AM
To: Mezzanine Users
Subject: [mezzanine-users] Page and Site SQL Gets Triggered with View 
LevelCaching

Hi All, 

I am caching an endpoint at the view level and I noticed there are still two 
sql calls being made for the Site and Page objects, after the below response is 
cached .

class CampaignDetail(APIView):
 @method_decorator(cache_page(10))
 def get(self, request, version, campaign_key):
 campaign = 
Campaign.objects.select_related('product').get(campaign_key=campaign_key)
 data = {
 "active":"true",
 "deal-price": "20.00",
 "daily-limit-reached": campaign.daily_limit_reached(),
 "keywords": campaign.get_campaign_keyword(),
 "product-asin": campaign.product.asin,
 "product-name": campaign.product.product_name,
 "product-price": "{}".format(campaign.product.price)
 }

 return Response(data)

Campaign subclasses TimeStamped (not Displayable), so I am wondering why the 
following SQL still gets called upon refresh during the cache period:

SELECT"django_site"."id", "django_site"."domain", "django_site"."name"FROM 
"django_site" WHERE UPPER("django_site"."domain"::text) = 
UPPER('localhost:8000')

And 

SELECT"pages_page"."id", "pages_page"."keywords_string", 
"pages_page"."site_id", "pages_page"."title", "pages_page"."slug", 
"pages_page"."_meta_title", "pages_page"."description", 
"pages_page"."gen_description", "pages_page"."created", "pages_page"."updated", 
"pages_page"."status", "pages_page"."publish_date", "pages_page"."expiry_date", 
"pages_page"."short_url", "pages_page"."in_sitemap", "pages_page"."_order", 
"pages_page"."content_model", "pages_page"."parent_id", 
"pages_page"."in_menus", "pages_page"."titles", 
"pages_page"."login_required"FROM "pages_page" WHERE ("pages_page"."site_id" = 
1 AND ("pages_page"."publish_date" <= 
'2019-07-24T15:26:59.395377+00:00'::timestamptz OR "pages_page"."publish_date" 
IS NULL) AND ("pages_page"."expiry_date" >= 
'2019-07-24T15:26:59.396055+00:00'::timestamptz OR "pages_page"."expiry_date" 
IS NULL) AND "pages_page"."status" = 2 AND "pages_page"."slug" IN ('api', 
'api/v1', 'api/v1/campaign/a8b7ea62-79d0-4ee4-8f62-81fcde54ea32', 
'api/v1/campaign')) ORDER BY "pages_page"."slug" DESC

I'd like to avoid all db hits if possible. Does anyone see what I am doing 
wrong or if there is a bug here? 

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mezzanine-users/ad008e6c-856b-466a-919e-fa407461a047%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mezzanine-users/5d388935.1c69fb81.8de47.be88%40mx.google.com.


RE: [mezzanine-users] Migration to Jazzband / Code Shelter

2019-12-12 Thread Eduardo Rivas
Hi Pete, Thanks for bringing this over to the mailing list. I’m one of the contributors to Mezzanine and still use it almost daily. I’m glad others still want to see the project move forward. Do Jazzband or Code Shelter have contributors on standby ready to take in projects and perform maintenance tasks? I’m not entirely clear on how they work, just want to make sure I understand correctly. From: Pete DermottSent: Tuesday, December 10, 2019 8:24 AMTo: Mezzanine UsersSubject: [mezzanine-users] Migration to Jazzband / Code Shelter Following on from the discussion on GitHub issue #1928 Throughout 2019 there has been 1 commit to the master Github repo, we haven't had a full release since August 2018 and there are a number outstanding changes that are waiting to go into a new release. We still don't have Django 2 support despite it being released in December 2018 and Django 3 is now out and available for development. I use Mezzanine a lot in my day to day projects but I don't feel like I personally have the skill to take it forward and make it fully compatible with the changes to Django and jQuery that are required. Basically, I feel that this project needs a bit of help to keep it relevant. Thankfully there are maintainer communities in Jazzband and Code Shelter that may be able to help us. I feel that handing the project over to them should at least ensure that active Mezzanine projects are not left exposed when 1.11 is deprecated in April 2020. Also - just to note - this is in no way mean to denigrate the hard work that Stephen and others have done over the years with this project, it speaks volumes about the quality of the codebase that Mezzanine is still my Django CMS of choice after all this time.-- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group.To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-users+unsubscr...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/mezzanine-users/476a90bc-1e21-4cfe-8039-b72a6e1748eb%40googlegroups.com. 



-- 
You received this message because you are subscribed to the Google Groups "Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mezzanine-users/5df2d19f.1c69fb81.4849c.22cd%40mx.google.com.


[mezzanine-users] Are fabric deployments popular?

2020-02-18 Thread Eduardo Rivas
Hello everyone,

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

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


   - Stop maintaining a fabfile of our own and just point people to general 
   Django deployment docs
   - Extract the fabfile as a separate package/project
   - Keep the fabfile as part of Mezzanine
   
Looking forward to hearing from the community.

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mezzanine-users/02b090b5-2d83-485d-aee3-f5997da14844%40googlegroups.com.


RE: Re: [mezzanine-users] Are fabric deployments popular?

2020-02-21 Thread Eduardo Rivas
Glad to see the fabfile is still in use. I think it would be best to keep it as part of Mezzanine then. Regarding some of the questions/comments: If you’re not using git or mercurial as version control, you can deploy using rsync by setting “DEPLOY_TOOL”: “rsync” in your FABRIC dictionaryI’m not aware of other fabfiles at the moment, only one I maintain over at https://github.com/jerivas/mezzanine-webf to deploy to Webfaction. Would be cool to see others develop something similar for AWS and the like. From: Roger van SchieSent: Friday, February 21, 2020 9:45 AMTo: mezzanine-users@googlegroups.comSubject: Re: [mezzanine-users] Are fabric deployments popular? Hi Ed I believe the included fab files decreases the learning curve for new users dramatically, and it would be great to keep it in, not only to make it easier for new users to get going, but to avoid unnecessary traffic on the forums. I would suggest having multiple fab files though, for different types of  infrastructure. For example, one for normal rsync, one for git, one for Amazon web services etc. Thanks for all your hard work and help on the forums Ed! RegardsRoger On Wed, 19 Feb 2020 at 01:16, Eduardo Rivas <jerivasmel...@gmail.com> wrote:Hello everyone, I'm Ed, one of the collaborators helping maintain Mezzanine. As we prepare to release the next version of Mezzanine (supporting Python 3 and Django 2.2 only) an issue was recently filed wondering about the future of mezzanine's built-in fabfile (which only works with Python 2). This made me wonder: Are Fabric deployments widely used by the community? What are your thoughts on the following options: Stop maintaining a fabfile of our own and just point people to general Django deployment docsExtract the fabfile as a separate package/projectKeep the fabfile as part of MezzanineLooking forward to hearing from the community.-- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group.To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-users+unsubscr...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/mezzanine-users/02b090b5-2d83-485d-aee3-f5997da14844%40googlegroups.com.-- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group.To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-users+unsubscr...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/mezzanine-users/CAFny93BODzdekVAZ26ibsXXqFHrRH_G2M9o-b6Hs9kZ008acCw%40mail.gmail.com. 



-- 
You received this message because you are subscribed to the Google Groups "Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mezzanine-users/5e503d7f.1c69fb81.62210.9061%40mx.google.com.


[mezzanine-users] Mezzanine 5.0 alpha 1 released!

2020-09-08 Thread Eduardo Rivas

Hello everyone!

I'm very happy to announce that the first pre-release of the next major 
version of Mezzanine is now available: 5.0.0 alpha 1. You can download it 
right now with `pip install -U mezzanine==5.0.0a1`. This will also get you 
the alpha versions for filebrowser-safe and grappelli-safe.

*The biggest change is that we have completely dropped support for Python 2 
and Django versions prior to 2.2.*

Other than that you can check out the pre-release notes over at GitHub: 
https://github.com/stephenmcd/mezzanine/releases/tag/v5.0.0-alpha.1

With this version we're also testing a new release process based on 
Semantic Versioning that should make it much easier to publish pre-release 
and stable versions to PyPI so the community can test Mezzanine without 
having to install from GitHub.

Additionally, since this is an alpha release, we request you do not use it 
in production systems (unless you're ready to report and/or fix bugs). You 
can help get Mezzanine to a stable release by filing bug reports on the 
GitHub issue tracker. The community has already identified a few minor bugs 
which are now being worked on as you can see here: 
https://github.com/stephenmcd/mezzanine/issues?q=is%3Aopen+is%3Aissue+label%3A%22release+blocker%22

Finally, I want to publicly thank Stephen McDonald who authored and 
maintained Mezzanine for many years, as well as many other members of the 
core team and the larger community who have made Mezzanine what it is 
today. Going forward I (Ed Rivas) will be serving as the maintainer of the 
project. I look forward to helping grow and nurture this amazing CMS.

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mezzanine-users/9d034202-e26c-4596-b966-fb1523c12d94n%40googlegroups.com.


Re: [mezzanine-users] Re: Mezzanine 5.0 alpha 1 released!

2021-02-23 Thread Eduardo Rivas
Installing the alpha is not the same as installing from the master branch.
The alpha doesn't need to be built, it can be installed directly: pip
install -U mezzanine==5.0.0a1

On Tue, Feb 16, 2021, 3:29 PM Michael Babcock 
wrote:

> Finally decided to check this out and this might be a stupid question but
> how do I when building this release, convince it to insert a version other
> than 0.0.dev0?
> When I subsequently try to pip install {stuff that needs mezzanine}, it
> insists on complaining about my 'older' release.
> Is there a step or package I'm missing?  Also, can't wait to see how
> things evolve!
>
> On Tuesday, September 8, 2020 at 10:02:23 p.m. UTC-4 jeriva...@gmail.com
> wrote:
>
>>
>> Hello everyone!
>>
>> I'm very happy to announce that the first pre-release of the next major
>> version of Mezzanine is now available: 5.0.0 alpha 1. You can download it
>> right now with `pip install -U mezzanine==5.0.0a1`. This will also get you
>> the alpha versions for filebrowser-safe and grappelli-safe.
>>
>> *The biggest change is that we have completely dropped support for Python
>> 2 and Django versions prior to 2.2.*
>>
>> Other than that you can check out the pre-release notes over at GitHub:
>> https://github.com/stephenmcd/mezzanine/releases/tag/v5.0.0-alpha.1
>>
>> With this version we're also testing a new release process based on
>> Semantic Versioning that should make it much easier to publish pre-release
>> and stable versions to PyPI so the community can test Mezzanine without
>> having to install from GitHub.
>>
>> Additionally, since this is an alpha release, we request you do not use
>> it in production systems (unless you're ready to report and/or fix bugs).
>> You can help get Mezzanine to a stable release by filing bug reports on the
>> GitHub issue tracker. The community has already identified a few minor bugs
>> which are now being worked on as you can see here:
>> https://github.com/stephenmcd/mezzanine/issues?q=is%3Aopen+is%3Aissue+label%3A%22release+blocker%22
>>
>> Finally, I want to publicly thank Stephen McDonald who authored and
>> maintained Mezzanine for many years, as well as many other members of the
>> core team and the larger community who have made Mezzanine what it is
>> today. Going forward I (Ed Rivas) will be serving as the maintainer of the
>> project. I look forward to helping grow and nurture this amazing CMS.
>>
> --
> 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/q3EheRe2IP8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> mezzanine-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mezzanine-users/92bea581-019c-4e61-8f3d-b75a4bc114b6n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mezzanine-users/CALJL-RMCEj9fUETTa05H-5nLrS8UVbTDFzdaB1Oukc4EhkQxMQ%40mail.gmail.com.


[mezzanine-users] Deprecating Google Groups in favor of GitHub Discussions

2021-11-19 Thread Eduardo Rivas
Hello everyone 

This is a quick announcement about my intention to make GitHub Discussions 
(https://github.com/stephenmcd/mezzanine/discussions) the official forum 
platform for Mezzanine.

Having the forum and the code live under the same platform makes managing 
them easier, specially when it comes to converting issues into discussions 
and viceversa. I encourage everyone to follow the link above and reply to 
the "Welcome" thread over there.

I expect to disable new posts on this Google Group in the next few weeks.

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mezzanine-users/dbf62f01-cbc0-4588-89f4-0bd0601e35den%40googlegroups.com.


<    1   2   3   4