Re: [mezzanine-users] Content revision in Mezzanine

2015-11-30 Thread Eduardo Rivas
I believe Django Reversion does what you want, but I'm not sure how well it
plays with Mezzanine.

-- 
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] Content revision in Mezzanine

2015-12-01 Thread Eduardo Rivas

Sorry, nothing like that out of the box.

Django Reversion has documentation you can check to install and use the 
app. https://django-reversion.readthedocs.org/en/latest/


--
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 vennila mezzanine site on Digital Ocean

2015-12-03 Thread Eduardo Rivas
Since you're just testing things out, could you rebuild the droplet with 
Ubuntu 14.04 and try again? My guess is that something fails because of 
Debian, but I could be 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/d/optout.


Re: [mezzanine-users] Re: Deploying vennila mezzanine site on Digital Ocean

2015-12-03 Thread Eduardo Rivas
If thats the case, maybe you only need to restart the supervisor 
service, instead of the whole server.


--
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] Field Injected: Column cannot be null

2015-12-03 Thread Eduardo Rivas

Did you run the migration after making the field non-required?

--
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] Email from forms...

2015-12-04 Thread Eduardo Rivas
Can you try sending an email from the Django shell? Mezzanine is most 
likely swallowing the mail error to avoid raising a 500.


https://docs.djangoproject.com/en/1.8/topics/email/#send-mail

Just fill the three first params. It'll try to send the email, if 
everything goes well, it'll return nothing. Else, you should get a 
traceback.


--
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] Why slug regex use by Mezzanine is .* ?

2015-12-12 Thread Eduardo Rivas
Could you elaborate? The only capture group in your example is the 
username. By inserting a slash, no username would match and the standard 
404 page will be displayed.


--
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: Frontend CMS

2015-12-12 Thread Eduardo Rivas
You would basically need to create custom urls, views, and templates to
edit your site content. Django provides you with model forms, inlines and
other tools to do so. You also have generic views to create, edit, and
delete model instances.

You will find all that in the Django docs and other Django related
resources, nothing about this is really Mezzanine specific.

-- 
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: URL Parameters for a Page

2015-12-15 Thread Eduardo Rivas
This section of the docs expands a little on my previous message: 
http://mezzanine.jupo.org/docs/content-architecture.html#integrating-third-party-apps-with-pages


--
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: URL Parameters for a Page

2015-12-15 Thread Eduardo Rivas

I think the Blog app would also be a good place to look.

Basically, what you want to do is outside the scope of Pages and page 
processors. You'd be better off implementing the calendar as a regular 
Django app (you can still use Mezzanine's Displayable class, though) 
with it's own url patterns, models and views.


You can then create a Page instance with the same slug as the url where 
you have mounted your app (as Mezzanine does with the Blog) to have it 
show up in the navigation menu. The Page instance will also be available 
to all elements mounted under the same url prefix in your app.


https://github.com/stephenmcd/mezzanine/tree/master/mezzanine/blog

--
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] Inlines javascript does not seem to work

2015-12-21 Thread Eduardo Rivas
Try importing and using mezzanine.core.admin.TabularDynamicInlineAdmin 
instead of Django's default inlines.


--
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] Inlines javascript does not seem to work

2015-12-21 Thread Eduardo Rivas
Sorry, to be clear, the BookInline class should subclass 
TabularDynamicInlineAdmin instead of admin.TabularInline.


--
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] Problems adding a Decimal Field to EXTRA_MODEL_FILES

2015-12-23 Thread Eduardo Rivas
You're passing the max digits and decimal places parameters as strings.
Make them integers.

-- 
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] Limited support of Bootstrap 3 styles in Mezzanine/Cartridge ?

2015-12-29 Thread Eduardo Rivas
We do this because Django won't let you apply classes directly to input
elements without going rather deep into the widget rendering logic. I think
the rationale is that swapping Bootstrap out should be a matter of changing
CSS only.

I haven't found this to be a problem when customizing the looks of a
Bootstrap site, you simply need to change the CSS selectors of your
customizations.

If you want to apply the CSS as suggested by the Bootstrap docs, there are
several Django packages that provide template tags to render form inputs
the Bootstrap 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/d/optout.


Re: [mezzanine-users] Limited support of Bootstrap 3 styles in Mezzanine/Cartridge ?

2015-12-29 Thread Eduardo Rivas
Disclaimer: I wrote most of this before getting Steve's reply, so they 
may overlap.


--

Again, no doubt that Django can apply classes to form inputs. The 
problem is that it happens at Python level, it is not something you can 
change by just overriding a template.


The available choices for the project are: provide a bit of CSS that 
emulates Bootstrap's styles, or implement custom form-rendering logic. 
The former option (which is the one currently in use) is easier to 
maintain and easy to swap out for those not using Bootstrap. For the 
latter, you've already explained the advantages.


My two cents are that third-party libraries already exist that deeply 
integrate Bootstrap into Django / Mezzanine, thus, there's no need to 
have this in Mezzanine's core. For example: 
http://django-bootstrap3.readthedocs.org/en/latest/templatetags.html.


At this point it seems like it's a matter of preference. For me, the 
question is: Should Mezzanine add more overhead to support one specific 
CSS framework?


Finally, maybe we can approach the issue differently: Should Mezzanine 
enable you to pass custom classes to form inputs? Perhaps this is 
something that could be incorporated as a param in the {% fields_for %} 
tag. Coincidentally, alternatives already exist, so its inclusion in the 
core is debatable: 
https://treyhunner.com/2014/09/adding-css-classes-to-django-form-fields/


--
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] Slugs with or without accents?

2016-01-06 Thread Eduardo Rivas
You can choose your own function for generating slugs by customizing 
settings:SLUGIFY. Docs: 
http://mezzanine.jupo.org/docs/configuration.html#slugify


For what it's worth, sites as big as Wikipedia use accented characters 
(and even parentheses) in their slugs. There's nothing special about 
that, they just need to be encoded properly (which Django and Mezzanine 
can do). https://pt.wikipedia.org/wiki/Wikip%C3%A9dia:P%C3%A1gina_principal


--
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] When mezzanine will be updated in pip3?

2016-01-07 Thread Eduardo Rivas
Is your site running on Django 1.9? As far as I know, Steve is only 
waiting for a bit more testing on Django 1.9 to release Mezzanine 4.1.


Here's the relevant thread: 
https://groups.google.com/forum/#!topic/mezzanine-users/b78FTSweFHo


--
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: When mezzanine will be updated in pip3?

2016-01-09 Thread Eduardo Rivas
I would say just use your website as normal and as thoroughly as you can
and report back if you find anything.

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


Re: [mezzanine-users] Mezzanine 4.1 and Cartridge 0.11 released

2016-01-18 Thread Eduardo Rivas

Neat! Thanks Steve, David, and Alex.

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


Re: [mezzanine-users] Mezzanine 4.1 and Cartridge 0.11 released

2016-01-18 Thread Eduardo Rivas
I have attempted an upgrade from Mezzanine 4.0 and Django 1.8 to Mezzanine 
4.1 and Django 1.9. There are some stumbling blocks, so I wanted to share 
my experience:

- The easiest way to upgrade is pip install -U mezzanine. Don't forget to 
pip freeze afterwards!
- Modify settings.py. TEMPLATE_DIRS and TEMPLATE_CONTEXT_PROCESSORS have 
been absorbed by TEMPLATES
- Modify urls.py. Now patterns is a plain list, so individual entries need 
to be calls to url()
- Also on urls.py, i18n_patterns is deprecated
- Aand, all view functions need to be imported, a dotted path won't cut 
it
- Make sure you update your other dependencies, most packages have also 
released new versions for Django 1.9 (django-debug-toolbar, for example)

Pro tip: I usually just copy Mezzanine's default settings.py and urls.py 
into my project and use a diffing tool to catch the differences and restore 
any customizations.

Sadly, I can't get runserver to work when I enable EXTRA_MODEL_FIELDS. I'm 
injecting a single field and managing the migrations via MIGRATION_MODULES 
(not sure if that's relevant). I'll open an issue to further debug this 
one. It seems to go away if I downgrade to Django 1.8.8.

-- 
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] Domains without "www" not working after deploy.

2016-01-20 Thread Eduardo Rivas
Yeah, the fabfile will do that for you if you add the www and non www
versions of the domain to DOMAINS in the FABRIC dictionary, and then fab
deploy again.

Anyways, glad you got it working.

-- 
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] Domains without "www" not working after deploy.

2016-01-20 Thread Eduardo Rivas
Your production database and static files are not affected by fab deploy.
It simply uploads your project's code and configuration files for nginx and
gunicorn (broadly speaking).

-- 
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] collecttemplates doesn't work

2016-01-23 Thread Eduardo Rivas
This issue was discovered shortly after the release of Mezzanine 4.1. It
has been fixed in the Github repository. You can install the master branch,
manually apply the patch, or wait for the next bugfix release. In the
meantime you can copy the templates from Mezzanine's files.

-- 
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: EXTRA_MODELS_FIELDS broken with Django 1.8 ?

2016-01-25 Thread Eduardo Rivas
That's a post about upgrading to Mezzanine 4.0. The issue described in the
original message is new and started with the recent release of Mezzanine
4.1. You can follow the progress here:
https://github.com/stephenmcd/mezzanine/issues/1513

-- 
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] Problem deploying Mezzanine on DigitalOcean

2016-01-27 Thread Eduardo Rivas
Looks like a migration in your onepage app is referencing the pages.Page
table before it's created in the DB. IMO it has something to do with
your models and migrations. Can you check if the error happens when
running createdb locally in a blank Postgres DB? Might be easier to
debug in your dev machine.

Also, are you using sqlite while developing? It is sometimes more
forgiving with migration issues than Postgres (at least that's been my
experience since Django incorporated migrations in 1.7). My
recommendation is to also use Postgres in development to catch these
errors early; or use sqlite in production :P

-- 
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] Problem deploying Mezzanine on DigitalOcean

2016-01-27 Thread Eduardo Rivas
Never mind, I think the problem is that you're not using migrations with
your onepage app. I believe that any app that depends on another app
that uses migrations (like mezzanine.pages) must also use migrations itself.

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


Re: [mezzanine-users] How to style the Contact page?

2016-01-27 Thread Eduardo Rivas
I recommend writing new CSS rules or tweaking the selectors instead of
trying to change the markup of the form. If I remember correctly, form
fields are wrapped in a div with a particular class, which should let
you write something like:

.wrapper-class > input {width: 100%}

-- 
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] Problem deploying Mezzanine on DigitalOcean

2016-01-28 Thread Eduardo Rivas
Glad you could move forward. Have you created the migrations for the
onepage app? I don't think you'll be able to do much without that.

-- 
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] South Migration Issue

2016-01-28 Thread Eduardo Rivas
Django implemented built-in migrations with the release of 1.7, and South
became obsolete. You will need to create standard migrations for the
application to be compatible with Django 1.7+. The Django docs explain this
with detail.

https://docs.djangoproject.com/en/1.8/topics/migrations/#upgrading-from-south

-- 
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] South Migration Issue

2016-01-28 Thread Eduardo Rivas
I don't think that's a valid Django migration. You can't simply edit 
South migrations to make them Django compatible. Please follow the steps 
outlined in the link I provided in my previous message.


--
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] Anyone got a quickfix/hack for the upload button in filebrowser

2016-02-01 Thread Eduardo Rivas
Nothing that I've personally tried, but it might be a good idea to look 
into how the upstream Filebrowser handles the uploads, since they are 
now Flash-free.


Current upload template: 
https://github.com/sehmaschine/django-filebrowser/blob/master/filebrowser/templates/filebrowser/upload.html


Issue tracking the transition away from Flash: 
https://github.com/sehmaschine/django-filebrowser/issues/22


--
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: How to translate slug with modeltranslation

2016-02-02 Thread Eduardo Rivas
If I remember correctly, when Modeltranslation support was added it was 
decided to support prefixed slugs (using the language code) instead of 
translatable slugs. For that reason, the slug field is not marked for 
transalation, and the views and urls don't handle that use case.


I think you can still create your custom Modeltranslation configuration 
to adjust it to your liking, but I don't know exactly how.


--
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] Flash removed from media library

2016-02-02 Thread Eduardo Rivas

Nice!

Just gave it a try and it seems to be working fine. I really like that 
the file picker dialog shows previews of images now.


I've noticed that selecting with Shift and Control is not working. It 
looks like you have to click the Browse button every time you want to 
add a file. Can we get the keyboard assisted selection back?


That's on Firefox on Ubuntu.

--
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] SSL security improvements for mezzanine websites

2016-02-09 Thread Eduardo Rivas
Something I've done in the past when upgrading Mezzanine projects from 
one version to another is to use a diffing tool (most VCS have one 
already) to spot differences.


I usually just copy the settings.py and urls.py provided by vanilla 
Mezzanine and diff them against what I have in my project. With the diff 
I can easily spot changes that where added upstream and tell them apart 
from the tweaks I've made to my project locally.


The same approach should work for the configuration files for 
deployment. Combine that with the post written by Douglas and any dev 
should be able to secure their site.


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

2016-02-21 Thread Eduardo Rivas
Looks like mezzanine (or a module inside of it) is not in scope. The trace
back should tell you where.

Make sure you're following the commented instructions correctly. You might
need to add some imports to urls.py.

-- 
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: NameError

2016-02-21 Thread Eduardo Rivas
Yeah, but you haven't imported the top level mezzanine module. You can 
see that it is being referenced by the urlpattern in line 56.


Add "import mezzanine" to the top of the file. I recommend you read a 
bit on Python imports, looks you haven't got the hang of them just yet.


--
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 site deployed

2016-02-22 Thread Eduardo Rivas
Are you getting a 500 error when trying to log in? Make sure you're 
running memcache if you've specified it in the production 
local_settings.py. Sessions can't be created without it.


Also, review the site logs and set up email reporting to get a traceback.

--
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: Rich text source editor is blank

2016-02-29 Thread Eduardo Rivas
Do you get any Javascript errors or 404's logged in the browser's 
console when refreshing?


--
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: admin site deployed

2016-03-05 Thread Eduardo Rivas

Are you getting an exception or something?

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


Re: [mezzanine-users] Are there any time specific settings while deploying Mezzanine? Blog Posts are not immediately visib

2016-03-07 Thread Eduardo Rivas
Yep, has happened to me. My solution is to make sure that the Mezzanine
installation is in the same time zone as (most of) your users. Make sure
you've set up an appropriate time zone in settings (I think it defaults to
UTC).

I believe Django displays a warning under the date/time widget if the user
is behind or ahead the server time, but I think grappelli-safe doesn't
account for that in it's templates.

-- 
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] Share content across domains

2016-03-07 Thread Eduardo Rivas
If you just want identical copies of the same site, sure. Just point the 
DNS to the same IP address for any number of domains, and make sure you 
add them to ALLOWED_HOSTS in settings.


If you have multiple Site entries in Mezzanine and want to pick and 
choose the content you want to share, I'm afraid that's not possible. 
Though you might be able to get away with it if you change the relation 
of Displayable to Site from and FK to M2M.


--
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] Is it possible to delete a blog category.

2016-03-08 Thread Eduardo Rivas
Try adding 'blog.BlogCategory' right next to 'blog.BlogPost' in 
settings.ADMIN_MENU_ORDER. Basically we want to tell Mezzanine to let 
you edit Blog Categories like a regular model in the admin. That should 
make the categories appear in the sidebar, and you can delete them as a 
regular model from there.


--
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: Link List / displayable_links not working on deployed admin

2016-03-12 Thread Eduardo Rivas
Are you deploying with git, hg, or rsync? If you have committed removals,
they should be applied on production if using one of the VCS methods.

-- 
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: Unable to deploy Mezzanine on Digital ocean.

2016-03-25 Thread Eduardo Rivas

Hey Adam, Sri.

I helped build the current deployment mechanism, and am curious about 
your experience with it. Specifically, I would like to hear what would 
you like to see in a definitive tutorial, or what we can do to 
streamline the process.


Looking forward to your comments.

--
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: Unable to deploy Mezzanine on Digital ocean.

2016-03-28 Thread Eduardo Rivas
Thanks Adam. I see you went with Digital Ocean's tutorials. Did you try 
the one in Mezzanine's docs? It should work with a completely blank 
Ubuntu VPS.


http://mezzanine.jupo.org/docs/deployment.html#tutorial

The fabfile should handle not only installing the Mezzanine project, but 
all system-level dependencies. The Postgres DB, gunicorn, ngnix, 
memcache, and all other pieces should have been installed automatically.


Let me know your thoughts on that.

--
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] Can't get mezzanine to render template with real time database entries

2016-03-28 Thread Eduardo Rivas
Where's the menssagens variable coming from? A view? Page processor? 
Middleware? Does it correspond to model objects in your database, a 
setting, a list created on the fly?


--
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: Can't get mezzanine to render template with real time database entries

2016-03-28 Thread Eduardo Rivas
Alright, so urls.py is loaded when the server is started. It means that 
the extra_context variable stores the Menssagem objects that are 
published at that time. The value is not updated on every request, which 
means that the published objects are never re-fetched. This is why you 
only get the new objects after a server restart.


My advice is that you create a very thin view, either function or 
class-based, to make sure your logic is executed on every request, not 
only on server load. Another option is to create a page processor for 
"/", injecting the context you want. 
http://mezzanine.jupo.org/docs/content-architecture.html#page-processors.


Hope that helps :)

--
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: Can't get mezzanine to render template with real time database entries

2016-03-28 Thread Eduardo Rivas

Glad you got it working!

--
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] Placeholders as Menu Items.

2016-04-02 Thread Eduardo Rivas
Hi Peter.

I've done this before like so:

- Create a top level Link page (this would be Galleries) . Set the slug to
one of the child pages (for example, Gallery 1).

- Add as many child pages as you like.

You can stop there, and users will always be redirected to a child page,
the top level page is inaccesible. However, something I like to do is
modify the drop-down menu template to remove the  tag from all top level
pages that have children. This makes them completely inaccessible and they
work as pure containers.

-- 
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] RichText Field injection

2016-04-06 Thread Eduardo Rivas
Well, the error message says you should check the SECRET_KEY setting. 
Have you done that? Most likely it was removed from your settings module 
when you upgraded to Mezzanine 4. I recommend you put it in 
local_settings.py to avoid having it under version control.


Other than that, there's a know issue relating field injection of 
non-Django fields and Django 1.9: 
https://github.com/stephenmcd/mezzanine/issues/1513


--
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: RichTextField in field injection

2016-04-06 Thread Eduardo Rivas
*Looks like you changed the name of the thread, and my reply went 
elsewhere. Here it is again:*

Well, the error message says you should check the SECRET_KEY setting. Have 
you done that? Most likely it was removed from your settings module when 
you upgraded to Mezzanine 4. I recommend you put it in local_settings.py to 
avoid having it under version control. 

Other than that, there's a know issue relating field injection of 
non-Django fields and Django 1.9: 
https://github.com/stephenmcd/mezzanine/issues/1513

-- 
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] Figuring out how to implement user-defined product sort order in Cartridge

2016-04-07 Thread Eduardo Rivas
I've used Django admin sortable 
(https://github.com/iambrandontaylor/django-admin-sortable) to add 
drag-n-drop ordering to models that are not inlines. It adds a new 
button to the list display where you can do the sorting.


--
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] Exclude some fields from profile update form mezzanine

2016-04-11 Thread Eduardo Rivas

Hi David.

Are you familiar with Django forms in general? Mezzanine's default 
ProfileForm sets up a flag 
 
(self._signup) to indicate if the current form instance is handling a 
signup or a profile update. You can subclass this form, implement some 
logic to make the studentID conditionally editable in __init__() based 
on that flag, and register your new form via 
settings.ACCOUNTS_PROFILE_FORM_CLASS 
.


Haven't tried it but it looks perfectly viable in theory.

--
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: "Thumbnails" showing up at full-size on production server

2016-04-11 Thread Eduardo Rivas

Hi Marcio.

There's a lot that can go wrong when generating a thumbnail for a 
particular image (missing dependencies, filesystem permission errors, IO 
errors, etc), and Mezzanine will just return the original image if that 
happens. I recommend you take a look at the code 
 
and all the exception handling that happens there and try to determine 
which one applies to your case.


You should also try to search in the mailing list and the issue tracker, 
because I remember other people experiencing similar trouble.


--
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: Mezzanine's core bootstrap.css is preferred over an app's version?

2016-04-11 Thread Eduardo Rivas
Is the app that defines your custom version of Bootstrap listed  before 
"mezzanine.core" in INSTALLED_APPS? In general I include all frontend 
customizations in a "theme" app and insert it just before "mezzanine.core" 
in the list of apps to make sure it always takes precedence.

-- 
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] collectstatic copies static files but mezzanine looks for static files in site-packages\mezzanine\*

2016-04-19 Thread Eduardo Rivas

Hi Sebastian.

That's the desired behavior when you're running the development server: 
we want Django to look for files in each app, either in your virtualenv 
or your project.


In production, you would usually automate the execution of collectstatic 
to copy everything to STATIC_ROOT (normally the top-level static/ 
folder), and set your front-facing server to serve the contents directly 
at STATIC_URL (normally the /static slug). That's the case with 
Mezzanine's default fabfile.


--
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] collectstatic copies static files but mezzanine looks for static files in site-packages\mezzanine\*

2016-04-19 Thread Eduardo Rivas
If you want to override static files that have the same path as one of 
Mezzanine's (like Bootstrap or jQuery, or some admin stuff), make sure 
the application where these files are stored appears before 
mezzanine.core in your INSTALLED_APPS. Both the development server and 
collectstatic will look for files in the order that's defined there.


To modify static files you don't need to run collectstatic, it's not an 
equivalent to collecttemplates.


--
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] collectstatic copies static files but mezzanine looks for static files in site-packages\mezzanine\*

2016-04-19 Thread Eduardo Rivas
For general advice on customizing Mezzanine's static assets and 
templates, check out this series by Josh Cartmell: 
http://bitofpixels.com/blog/mezzatheming-creating-mezzanine-themes-part-1-basehtml/


--
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] Suggestion on how to make import and export of products using csv from admin panel?

2016-04-29 Thread Eduardo Rivas
Adding to the suggestions, I've used django-import-export in the past 
with satisfactory results. It does admin integration out of the box and 
let's you pick different import/export formats (Excel, csv, json, etc). 
I've only used it to export records; can't speak for the importing part. 
The docs will guide you all the way through.


https://django-import-export.readthedocs.io/en/latest/

--
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: Suggestion on how to make import and export of products using csv from admin panel?

2016-04-30 Thread Eduardo Rivas
What have you tried so far? What errors are you getting?

-- 
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: Suggestion on how to make import and export of products using csv from admin panel?

2016-05-02 Thread Eduardo Rivas
You will need to create separate imports for separate models. At that 
point it might be better to create your own admin view to import several 
models at a time, calling the individual model importer in the right order.


--
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] Custom templates within an app without using a custom Page

2016-05-04 Thread Eduardo Rivas
From the docs I get the idea that hierarchy-based templates should be 
working. Have you tried this? 
http://mezzanine.jupo.org/docs/content-architecture.html#page-templates 
You may have found a bug if it doesn't work that way.


Assuming that doesn't work, here are other options for your consideration:

Option1: Create a template tag that optionally renders the snippet you 
want based on the slug of the current page, use it in base.html so it's 
always available. You can store all slugs that should show the login 
block in a setting, and have the tag read that.


Option 2: Create a page processor for all pages that checks the slug and 
injects a context variable to let you decide in-template if you should 
render the block.


--
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] Add import/export button in admin panel by using product_db code with django-import-export package.

2016-05-04 Thread Eduardo Rivas

Glad to see you figured it out.

The only suggestion I have is that you should avoid editing Cartridge 
source code, and instead register your own customized admin class in 
your project. That way future Cartridge updates won't break your code 
(as easily) and you know all your customizations live in your project.


--
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] MetaData.description_from_content

2016-05-16 Thread Eduardo Rivas
Another solution: let the developer point to a callable via settings.

-- 
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] Custom templates within an app without using a custom Page

2016-05-18 Thread Eduardo Rivas
Just for the record, I just tried the method described in the docs, and it 
works. Here's my page structure:

   - Parent page (Rich Text page, slug = /parent/)
  - Child 1 (Form, slug = /parent/child-1/)
  - Child 2 (Rich Text page, slug = /parent/child-2/)
   
I have created custom templates for both children at 
/templates/pages/parent/form.html and 
/templates/pages/parent/richtextpage.html. Note the parent is referenced by 
slug in the template path, but the other two are referenced by type (form 
and rich text).

-- 
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] External payment processing Cartridge

2016-05-23 Thread Eduardo Rivas
I remember doing something similar. My general approach is to set the 
form's "action" attribute to the external site, so the actual POST 
request is handled by them. This request usually has just the amount and 
maybe a charge description and ID. Then the user is taken to their site, 
and inputs all the credit card data. The payment processor should let 
you define a "return" url, and the user should come back to your site 
via that. You have to create a view that will handle GET or POST params 
to complete the Order instance in Cartridge. After that you can redirect 
to the Order receipt or the Order history.


--
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] Error deploying Mezzanine App on Webfaction

2016-05-26 Thread Eduardo Rivas
Is your project mezzanine 3 or 4? Are you using the right fabfile for your
version? Have your project files been transferred to the server?

-- 
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: Error deploying Mezzanine App on Webfaction

2016-05-26 Thread Eduardo Rivas
What deploy tool are you using? If you're using git your working directory
lives in a different folder from the actual repo. The project files should
be at /home/username/webapps/project-name.

-- 
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] External payment processing Cartridge

2016-05-26 Thread Eduardo Rivas
The action attribute is on the form's markup, not in the Python form.



The view serving the return url should be the one completing the order.

-- 
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: Error deploying Mezzanine App on Webfaction

2016-05-27 Thread Eduardo Rivas
That's weird. "fab deploy" should push your repo to the server and check 
out your working directory into the project folder. What to you see in 
~/webapps/git_app?


--
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: Error deploying Mezzanine App on Webfaction

2016-05-28 Thread Eduardo Rivas
Looks just like the default fabfile by mezzanine-webf. Seems like 
Webfaction changed their app name again to plain "git". I'll take that 
into account.


You shouldn't be running "fab install" every time, it's a one time step 
(and that's explained in the README). You can do "fab remove" and "fab 
deploy" as many times as you want, and it should give you a clean state 
every time. Sometimes Webfaction's API misbehaves and you have to 
manually run some of the steps via the control panel, but it doesn't 
seem to be the case here.


Can you do "git log" in ~/webapps/git_app/repos/akia and make sure your 
commits are up there?


Also, can you share your FABRIC settings dict? Make sure you take out 
your account information and server IP address.


--
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] Novice Python question about Cartridge model: Order

2016-06-09 Thread Eduardo Rivas
The PyCharm IDE has a visual debugger. I've never used it myself but it 
looks quite powerful and other people recommend it.


https://www.jetbrains.com/pycharm/features/tools.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.


Re: [mezzanine-users] Update fields in cartItem and OrderItem during checkout

2016-06-19 Thread Eduardo Rivas
I'm not sure if I'm missing something, but wouldn't it be better to add
neck size as a regular product variation in the settings?

That way users can just select the neck size they want when adding the
product to the cart, and you won't need to do field injection and the extra
checkout step.

-- 
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] Update fields in cartItem and OrderItem during checkout

2016-06-20 Thread Eduardo Rivas
Got it. That makes sense. I thought neck sizes also came in predefined 
choices.


--
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] Get BlogPost entries from other sites?

2016-06-20 Thread Eduardo Rivas
The CurrentSiteManager is responsible for this. The docs explain how it 
determines which Site entry to use: 
http://mezzanine.jupo.org/docs/packages.html#mezzanine.core.managers.CurrentSiteManager


--
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] Images in .pdf Invoice

2016-06-24 Thread Eduardo Rivas
Well, Cartridge uses Pisa 
 
to create the PDFs. Apparently you can pass a "link_callback" arg to 
CreatePDF(). This callback should handle the conversion of the relative 
path of the image in the HTML to the complete filesystem path to be 
embedded in the document.


The xhtml2pdf docs provide a full example 
. 
You'll need to override the invoice view to pass the callback to 
CreatePDF().


--
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 Database backup/foreign-key constraints

2016-06-24 Thread Eduardo Rivas
Weird, I've never had any trouble dumping/restoring a Mezzanine DB with 
Postgres.


These are the commands I use: 
https://gist.github.com/jerivas/a2f321bb8fa4d305a481#postgres-exportimport-without-the-postgres-user


At any rate, you may need to wipe the target database before a restore, 
but that should be 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/d/optout.


Re: [mezzanine-users] ngnix configurations overwritten

2016-06-28 Thread Eduardo Rivas
Are you applying your changes to the nginx template in your repo? The idea
with Fabric is that you edit all configuration files in the included
templates instead of doing it directly on the server.

-- 
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] ngnix configurations overwritten

2016-06-28 Thread Eduardo Rivas
It should be inside the deploy/ folder in your project root.

-- 
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] ngnix configurations overwritten

2016-06-28 Thread Eduardo Rivas
Check the fabfile. All environment variables are defined there. Some are
taken directly from the FABRIC dictionary in settings, others are defined
conditionally.

The SSL variable depends on the amount of domains you have configured.
However, most of the times I just remove it completely from the nginx
template and just define my own SSL configuration.

-- 
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] ngnix configurations overwritten

2016-06-28 Thread Eduardo Rivas

Sure, I hope this clears it up:

The idea is that the SSL cert should only be used when the site is being 
accessed through a single domain (because the cheapest and most common 
certs are single-domain anyways). For that reason, the ssl_disabled 
environment variable depends on the length of env.domains (which is just 
settings.FABRIC["DOMAINS"]).


env.ssl_disabled is not a boolean, instead if just toggles between "#" 
and the empty string. The # is what comments-out the SSL settings in the 
nginx template.


In other words, if you want enable SSL make sure you have only one 
domain listed in settings.FABRIC["DOMAINS"]. You'll also have to make 
sure you've pointed your nginx conf to the location of your certificate 
and key.


I previously suggested that you simply overwrite the whole SSL 
configuration in the nginx template because it sounded like you already 
had a working implementation in the server, so you could have used that.


--
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: Images in .pdf Invoice

2016-06-28 Thread Eduardo Rivas
I've also used wkhtmltopdf but with the Django bindings. It's available on
Pypi as django-wkhtmltopdf (that's off the top of my head, you should
check) and provides a class based view and PDF response type.

-- 
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] ngnix configurations overwritten

2016-06-28 Thread Eduardo Rivas
Glad I could help ☺

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


Re: [mezzanine-users] Mezzanine Theme

2016-06-29 Thread Eduardo Rivas

Hi Richard.

The site title and tagline are editable in the admin. Just go to Site >  
Settings and look for "Site title".


Regarding theming mezzanine, please check this excellent series of blog 
posts: 
http://bitofpixels.com/blog/mezzatheming-creating-mezzanine-themes-part-1-basehtml/


It looks like you're new to Python and Django in general. I suggest you 
first complete the Django tutorial to become familiar with concepts like 
project and template structure, which are going to be important in your 
journey.


Here's the official tutorial: 
https://docs.djangoproject.com/en/1.9/intro/tutorial01/
And here's another tutorial which will help you reinforce the concepts:  
http://tutorial.djangogirls.org/en/


Lastly, make sure you are familiar with the Mezzanine docs, and use the 
search function in the mailing list and Stack Overflow for your 
Mezzanine questions. Many great questions and answers have been created 
over the years.


--
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: Email stop working when DEBUG = False

2016-07-08 Thread Eduardo Rivas
My guess is that there's a problem when sending the email. Django's mail 
handler will fail with a 500 error by default 
(https://docs.djangoproject.com/en/1.9/topics/email/#send-mail, see the 
fail_silently arg).


There's a few reasons why email sending could fail:

- You have an error in your email settings, and Django can't connect to 
the SMTP server.
- The user typed their email address incorrectly and got an SMTP error 
when trying to send email to a non-existing address.


Mezzanine provides a setting to set fail_silently = True when sending 
email from a Form page. If you set settings.EMAIL_FAIL_SILENTLY = True, 
the error will probably go away, but the email won't be delivered. 
You'll need to check the logs to see what's 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/d/optout.


Re: [mezzanine-users] Why does Fabric deployment name the db user after the project?

2016-07-11 Thread Eduardo Rivas
I think the idea is to be consistent and predictable when it comes to 
naming all things. The project directory, the database user, the 
database itself, and all configuration files just use the project name 
as identifier. I'm no security expert but I think that having one DB 
user per site is safer than a single DB user with access to all site 
databases.


In any case, I think you should be able to import the database as the DB 
user "project_name", it's the owner of all tables as seen here: 
https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/project_template/fabfile.py#L494-L501


Also, not sure if it helps but you can backup and restore your database 
directly from fabric too.


fab backup:"mybackup.psql"
fab restore:"mybackup.psql"

https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/project_template/fabfile.py#L347-L367

Hope that helps.

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


Re: [mezzanine-users] Mezzanine Theme

2016-07-14 Thread Eduardo Rivas
It looks like the wiki hasn't been updated since 2014. You will need to 
find and install the version of Mezzanine that was current at that time 
(I think Mezzanine 3.1 + Django 1.6). You could try to update it to 
support later versions of Django and Mezzanine too.


Another approach is to look for a wiki solution for Django in general, 
not Mezzanine specifically. A project like that might be more active.


--
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] Safari changing page status to Draft?

2016-07-14 Thread Eduardo Rivas
Hey everyone.

Recently I've had incidents in a couple Mezzanine sites where some pages 
will go into Draft mode when a user saves the page in the admin. This 
doesn't happen every time, and I really don't know how to reproduce it 
reliably (I haven't encountered the bug myself), but it's a nasty bug 
because the page will be removed from the public site until set to 
Published again.

This is the info I have (which may or may not be useful):

- Happens after the pages has been edited and saved a few times
- This seems to only happen on pages that have inlines
- AFAIK it only happens in Safari
- The page history records a change in the Status field, but users haven't 
changed it

I managed to get my hands on a Mac and started saving admin pages a bunch 
of times and inspecting the POST data, but I never encountered an 
involuntary change in the "status" field.

Any ideas what might be going on 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.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Re: HOST_THEMES not working with imported themes

2016-07-22 Thread Eduardo Rivas

Hi Nikhil.

So I don't know much about multi-tenant site themes, but I think the 
domain you use in the host / appname tuple should match the domain you 
have configured in the Sites section of the admin.


So if you have "example.com" registered in the Sites admin, the tuple 
should be ("example.com", "moderna").


--
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] New install of Mezzanine with NGINX & GUnicorn issues

2016-07-22 Thread Eduardo Rivas

Hi Jim.

Yes, I think that would be a problem. The idea with the Fabfile is that 
it will let you automate deployments from your development machine to a 
VPS. All fabric task must be run from your dev machine.


--
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: New install of Mezzanine with NGINX & GUnicorn issues

2016-07-22 Thread Eduardo Rivas
I think you can still use your current installation if you're careful 
and try to match your FABRIC settings with what you have online right now.


But yeah, it might just be easier to just start over. Bear in mind that 
you'll lose the database and media files you have in the server.


--
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] When to use multiple projects, instances, sites?

2016-07-24 Thread Eduardo Rivas

Hey there.

If you want to use the same codebase for multiple sites and domains, 
option 3 is your best bet. You can even have different frontend themes 
for each site, but all your installed apps will be the same. Each site 
will have its own Admin as long as all your models inherit from 
SiteRelated (which is the case for all Mezzanine apps).


If you think you're going to be using different installed apps and that 
each project will require more customization, you should go with option 
1. I would advise you never use option 2 because it kinda defeats the 
concept of sandboxing and encapsulation provided by virtualenvs.


--
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: HOST_THEMES not working with imported themes

2016-07-25 Thread Eduardo Rivas

Hmm, it looks like it should be working with your current settings.

When you log into the the admin, what domain is shown in the top-right 
dropdown? The theme should match the domain displayed there.


--
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] Change collapse-closed to collapse-open in BlogPost admin?

2016-07-30 Thread Eduardo Rivas

Hi there.

The BlogPost admin itself takes the fieldsets from DisplayableAdmin and 
modifies it to insert some fields and some classes. The general steps are:


1. Deepcopy the fieldsets attribute you want to modify

2. Override the values / list items you want to change

3. Assign the modified fieldsets to your admin class

4. Unregister the original admin class, and register the new one with 
your customizations


You can use that as a guide to copy the BlogPostAdmin fieldsets and 
register you own admin class based on that. See: 
https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/blog/admin.py#L14-L25


--
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] wrong base.html

2016-08-01 Thread Eduardo Rivas
Django templates don't work with absolute paths (or if they do, it's not 
a good idea for portability). The templates you want to refer to in {% 
extends %} are relative to the templates/ directory in each installed app.


Since all templates/ directories from all apps are combined into one 
"pool", you should always reuse the application name inside the 
templates/ folder. For example, for your nektra template, the base.html 
file should be at nektra/templates/nektra/base.html. And then you can 
extend it with {% extends "nektra/base.html" %}.


The same goes for your coinfabrik application. The base template should 
be in coinfabrik/templates/coinfabrik/base.html, and you can then 
reference it in templates as "coinfabrik/base.html".


This is a common pattern in Django, but I couldn't find any 
documentation that supports it. Hopefully someone else can reference a 
reputable source that explains 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/d/optout.


Re: [mezzanine-users] default variables like {{ page.description }} ?

2016-08-02 Thread Eduardo Rivas
The variables that are available in the templates are the fields in the
Django model you're using. In this case you're using the Page model, which
is defined in mezzanine.pages.models.Page

(notice that the model is composed of a few others, so not all fields are
listed there).

For an example of how to use the model data in templates, take a look at
Mezzanine's included templates, like page.html

and richtextpage.html

(in that last one you'll see how to output the main content you are asking
about).

Let me say that a working understanding of Django in general is required to
make the most out of Mezzanine. I recommend the Django girls tutorial
 and the official Django tutorial
 to get started
(in that order). I hope you enjoy your journey with Django and Mezzanine.

On Tue, Aug 2, 2016 at 11:32 AM,  wrote:

> Hi,
>
> I'm new to Django and Mezzanine and I'm looking to use variables to
> display content.
>
> For example {{ page.description }} only displays the first line:
> AAA
> from
> AAA
> BBB
> CCC
> (see attachment)
>
> Is there a list of default variables I can use? For example something like
> {{ page.content }} to display the whole text?
>
> Thank you very much!
>
> David
>
>
>
> --
> 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: New install of Mezzanine with NGINX & GUnicorn issues

2016-08-03 Thread Eduardo Rivas
Cool! Glad to see it works.

What you're describing is the standard behavior. It's assumed that your
development database and media files should be kept separate from the
production ones. We probably should mention that in the documentation.

You can manually dump the development database and restore it in the
server, and rsync the media files too. If you plan to do that regularly you
can write your own fabric task to do so.

-- 
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: New install of Mezzanine with NGINX & GUnicorn issues

2016-08-08 Thread Eduardo Rivas
The backup task simply backs up the production DB in case a deployment 
goes wrong. It can then be restored in the restore task. They don't 
transfer your development DB and media files.


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


Re: [mezzanine-users] How to handle database when upgrading to 4.0.1

2016-08-09 Thread Eduardo Rivas
The error you're seeing is due to a missing package. Just install 
psycopg2 from pip.


After that everything should work since Mezzanine provides an 
uninterrupted migration history for the transition between South and 
Django migrations.


My general process for this upgrades is:

1. Upgrade the site to the latest Mezzanine version in the 3.X branch 
(and run South migrations)


2. Follow Josh's guide to upgrade to Mezzanine 4

3. Make sure all my apps are now switched to Django migrations. The 
0001_initial migration should describe the same schema as the the last 
South migration.


4. Run "manage.py migrate --fake-initial"

At this point the migrations should run without issue and the site 
should work (provided nothing is broken in your code due to 
Django/Mezzanine upgrades).


--
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] After upgrade to to 4.0.1....

2016-08-10 Thread Eduardo Rivas
Your browser most likely cached the old TinyMCE from Mezzanine 3. Try
clearing the cache on that admin page with Ctrl + F5.

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


<    1   2   3   4   5   >