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

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

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

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"

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

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

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

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

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

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

Re: [mezzanine-users] When to use multiple projects, instances, sites?

2016-08-10 Thread Eduardo Rivas
No need to modify any Python files. The Sites framework is a standard Django feature and you only need to create new sites records in the admin. In the side menu go to Site > Sites and create as many records as you like. Don't forget to assign the correct domains for each. After that you'll be

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

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

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

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"

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.

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

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

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

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

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

Re: [mezzanine-users] Mezzanine 4.2.0 released

2016-08-15 Thread Eduardo Rivas
Really excited about the new Content Typed abstraction! :) I just want to point out that Filebrowser now uses an HTML5 uploader, so Mezzanine is completely Flash-free. -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from

Re: [mezzanine-users] Re: Can't get gallery to work with existing django project

2017-02-14 Thread Eduardo Rivas
Galleries don't live under a single URL like the blog. They are a page type that can have any URL. To create a gallery, go the Pages section of the admin and select "Gallery" from the drop down at the top of the page tree. On Feb 14, 2017 7:09 AM, "Bernardo Tavares" wrote: >

Re: [mezzanine-users] Re: mezzanine refrence

2016-09-05 Thread Eduardo Rivas
I would like to add that one of the most important aspects of Mezzanine is that it's just Django. Having a solid Django foundation will go a long way. Look for the official Django tutorial and the Django Girls tutorial to get started. Also, consult the Django docs as you work with Mezzanine. --

Re: [mezzanine-users] Re: Deploy multitennancy sites on same machine

2016-09-06 Thread Eduardo Rivas
Hmm, I'm not sure if you can get away with using different URLs after the domain. What I would do in your case is use subdomains for each site: a.example.com, b.example.com, etc. If you go that way, you'll only need to create the site records in the admin and everything should be working as

Re: [mezzanine-users] collectstatic ignores App's static

2016-09-06 Thread Eduardo Rivas
Responding here too for future reference: You need to create a Django app to put your templates and static files. I usually just name the app "theme" and add it before mezzanine.boot in INSTALLED_APPS. Inside this new app you can create a static/ folder to store your custom static files or

Re: [mezzanine-users] Where exactly does defaults.py go?

2016-09-06 Thread Eduardo Rivas
You need to create a Django app to put your defaults.py, your templates, and static files. I usually just name the app "theme" and add it before mezzanine.boot in INSTALLED_APPS. -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe

Re: [mezzanine-users] Deploy multitennancy sites on same machine

2016-09-06 Thread Eduardo Rivas
You can have as many different Mezzanine installations as you want. Usually each installation is made up by: - One virtualenv with Mezzanine and all its dependencies - One database for the site - Your specific projects files (settings, urls, custom apps; generated via mezzanine-project)

Re: [mezzanine-users] Problem deploying Mezzanine on DigitalOcean

2016-09-07 Thread Eduardo Rivas
It looks like your theme application is lacking migrations. You'll need to create those if you want to use Mezzanine's models as dependencies of your app. python manage.py makemigrations theme python manage.py migrate theme -- You received this message because you are subscribed to the Google

Re: [mezzanine-users] Conflicting template tags with AngularJS

2016-09-08 Thread Eduardo Rivas
Hey there! Looks like a general Django + Angular problem. I would turn to Google for that and also ask in the Django mailing list to get more exposure (or maybe the answer awaits you over there already!). -- You received this message because you are subscribed to the Google Groups "Mezzanine

Re: [mezzanine-users] Re: Blogposts visible on site but not in admin panel.

2016-09-15 Thread Eduardo Rivas
Hi Michael. You're passing a variable called blog.blogpost to Mezzanine, which doesn't exist in the Python scope. 1. You have to add quotes around the model name to treat it as a string, not a variable: "blog.blogpost" 2. You need to add a comma after the name so the parentheses is treated

Re: [mezzanine-users] Mezzanine 4.2.2 released

2016-09-25 Thread Eduardo Rivas
Nice! Good to see these quick bug fix releases. -- You received this message because you are subscribed to the Google 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

Re: [mezzanine-users] Re: Internal Server Error

2016-09-26 Thread Eduardo Rivas
Please don't double post. Some people are subscribed to this list and will get every email. Have you configured email reporting for your site? That should get you a full traceback delivered to your email, which you can then post here. This thread describes how to configure it:

Re: [mezzanine-users] Live Demo Code

2016-10-07 Thread Eduardo Rivas
I think it's just a Mezzanine + Cartridge project with the demo content installed. You can get the same with: pip install mezzanine cartridge mezzanine-project -a cartridge project_name cd project_name python manage.py createdb --noinput python manage.py runserver -- You received this message

Re: [mezzanine-users] More customized publishing workflow (Draft, Published...)

2016-09-20 Thread Eduardo Rivas
There's another person working on something like this here: https://github.com/stephenmcd/mezzanine/issues/411#issuecomment-235018090. You may want to check on that and unify efforts. One issue with your approach is that it will require a migration when a user adds a new choice. This will

Re: [mezzanine-users] How to deploy using Fabric to RHEL server?

2016-09-30 Thread Eduardo Rivas
I recommend you create the RHEL-compatible fabfile as a separate project and add it to Mezzanine's list of third party packages. The existing fabfile is quite big already and this looks like it would add quite a bit of complexity. I did something similar for a fabfile that works with

Re: [mezzanine-users] Re: Internal Server Error

2016-10-02 Thread Eduardo Rivas
We're going to need to see the full traceback again to help you out. However, a 502 sounds like an error happening before the request reaches Django. Can you check the nginx logs? They should be in /home/%(user)s/logs/%(proj_name)s_error_nginx.log (taken from the fabfile). -- You received

Re: [mezzanine-users] Mezzanine development using Bash on Ubuntu on Windows 10

2016-11-08 Thread Eduardo Rivas
I played around with it a little, and was able to successfully get a project running with virtualenv, git, Django, and Mezzanine (as I regularly do in Ubuntu). I just installed Postgres as a Windows application (downloading the installer from their site, not using apt in the bash shell). After

Re: [mezzanine-users] Re: Extra model fields at Mezzanine's derived package ?

2016-11-11 Thread Eduardo Rivas
Without knowing exactly which models you're modifying, I would recommend to avoid field injection in reusable apps. If you're injecting stuff on Page, it might be better to create a custom Page type and distribute that with your package. See:

Re: [mezzanine-users] Fabric deployment with ALLOWED_HOSTS wildcard issue

2016-10-31 Thread Eduardo Rivas
Hi Geoffrey. I think your diagnoses is correct: Django supports the wildcard domain syntax, but nginx doesn't. My recommendation would be to be explicit in your ALLOWED_HOSTS (specifying a fully qualified domain name on each entry). It my be worth adding a note stating that in the Deployment

Re: [mezzanine-users] How to deploy using Fabric to RHEL server?

2016-10-31 Thread Eduardo Rivas
Hi CJ. I think you're on the right track with your modified fabfile and supporting blog post. I'm still of the idea that something like this should exist as a third-party package, and not as part of Mezzanine itself. My understanding is that we're trying to provide an easy-to-use starting

Re: [mezzanine-users] Fabric deployment with ALLOWED_HOSTS wildcard issue

2016-10-31 Thread Eduardo Rivas
Yeah, the server name is working, the problem is that nginx is returning a 444 (a proprietary error code that means "drop this request altogether" https://httpstatuses.com/444). Whether or not a 444 is returned depends on a simple match against an ALLOWED_HOSTS regex, and that will not work

Re: [mezzanine-users] Fabric deployment with ALLOWED_HOSTS wildcard issue

2016-10-31 Thread Eduardo Rivas
You're welcome :) -- You received this message because you are subscribed to the Google 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

Re: [mezzanine-users] Overriding status in class Displayable.

2016-10-13 Thread Eduardo Rivas
Thinking out loud, but maybe you can override the admin form for PageAdmin to set the default there instead of at the model level. -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from

Re: [mezzanine-users] Rss and tags issues.

2016-12-02 Thread Eduardo Rivas
Hi Iliana. For the link issue, make sure you've updated the Site record in the admin. It's under Site > Sites in the admin sidebar. By default it's set to the local URL, but you should change it to your production domain. Regarding the tags in blog posts, Mezzanine ships with linked tags in

Re: [mezzanine-users] Re: Multiple Blogs

2017-01-04 Thread Eduardo Rivas
It looks like Mezzanine will derive a template name from the category slug, allowing you to create one template per category. Just an alternative to the in-template conditional. https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/blog/views.py#L46-L47 On Wednesday, January 4, 2017 at

Re: [mezzanine-users] hiding the "Rich text page" as creatable page type

2017-03-30 Thread Eduardo Rivas
Hi Pima. There's a setting just for that http://mezzanine.jupo.org/docs/configuration.html#admin-removal On Mar 30, 2017 12:51 PM, wrote: > Hi, > > I'm trying to hide the "Rich text page" page type in the admin/pages/page > view - normally this would be finding

Re: [mezzanine-users] hiding the "Rich text page" as creatable page type

2017-03-30 Thread Eduardo Rivas
Sorry, auto correct messed up your name! On Mar 30, 2017 1:18 PM, "Eduardo Rivas" <jerivasmel...@gmail.com> wrote: > Hi Pima. > > There's a setting just for that http://mezzanine.jupo. > org/docs/configuration.html#admin-removal > > On Mar 30, 2017 12:51 PM, <

Re: [mezzanine-users] Local .css file not updating, working fine when deployed

2017-03-17 Thread Eduardo Rivas
My guess is you might have run collecstatic locally, and Mezzanine is now using the project-wide static/ folder instead of the per-app static/ folder (where changes are usually made). What are the contents of your top-level static/ folder? It should only contain a media/ folder in

[mezzanine-users] Re: Mezzanine 4.2.3 released

2017-03-10 Thread Eduardo Rivas
Hey Steve, thanks for the release! Are you also going to release Grappelli and Filebrowser? They contain fixes for the inline issues described in https://github.com/stephenmcd/grappelli-safe/pull/79#issuecomment-263872748 -- You received this message because you are subscribed to the Google

Re: [mezzanine-users] Cannot Install using createdb

2017-03-10 Thread Eduardo Rivas
Hi Charles. This is due to the recent release of Bleach 2 (one of Mezzanine's dependencies). Another thread was started recently regarding that and it has the solution too https://groups.google.com/forum/m/#!topic/mezzanine-users/59KM9IIe9eQ On Mar 10, 2017 10:38 AM, "Charles Roberts"

Re: [mezzanine-users] Re: Mezzanine 4.2.3 released

2017-03-10 Thread Eduardo Rivas
Excellent! Thanks. -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-users+unsubscr...@googlegroups.com. For more options, visit

[mezzanine-users] Re: creating a page with a custom, or multiple, rich text fields

2017-03-13 Thread Eduardo Rivas
Hi Mike. You are importing RichText, which is an abstract model, not a field. The actual field is located at mezzanine.core.fields.RichTextField. You can import it and add as many instances as you want to your model. -- You received this message because you are subscribed to the Google Groups

RE: [mezzanine-users] default settings for users / blog posts

2017-07-11 Thread Eduardo Rivas
The “is_staff” flag only allows users to log into the admin. Groups and permissions determine which models they can add/edit/delete. -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails

RE: [mezzanine-users] Re: Extending Displayable Model, Views

2017-07-09 Thread Eduardo Rivas
Glad it’s all sorted out. -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-users+unsubscr...@googlegroups.com. For more options, visit

RE: [mezzanine-users] default settings for users / blog posts

2017-07-10 Thread Eduardo Rivas
Hello Patrick. 1. I don’t think there’s a setting to require a login for blog posts. I suggest you override Mezzanine’s blog patterns in your root urlconf and apply the login_required decorator to the blog views. See: https://stackoverflow.com/a/5771286/1330003 2. If you want to apply custom

Re: [mezzanine-users] Re: Extending Displayable Model, Views

2017-07-08 Thread Eduardo Rivas
Have you included your url patterns before Mezzanine's catch-all in the root conf? On Jul 7, 2017 1:37 PM, wrote: Solved that, and have been constantly 404'ing since. Saw another of your posts Eduardo about i18n and middleware causing 404's on pages that don't exist,

RE: [mezzanine-users] Extending Displayable Model, Views

2017-07-07 Thread Eduardo Rivas
Could you share the error message you’re 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

Re: [mezzanine-users] Can't Turn Keywords On

2017-07-21 Thread Eduardo Rivas
Hey Malik. Welcome to the Mezzanine community. - To add keywords, enter them as comma separated list in the admin Meta panel on objects that support them (Blog posts, pages, etc). - If you're using Mezzanine's default templates they should just appear in the blog pages once you add some keywords

Re: [mezzanine-users] CSS Vendor Prefixes Strategy + SASS + LiveReload server

2017-06-30 Thread Eduardo Rivas
Hey Roger. Here's how I've done it in the past: - Create a Django app in your project to hold your static files and templates (I name it "theme" since it holds everything related to the visual styles of the site). - Inside theme/static/ setup your frontend tooling. I use Webpack to compile

Re: [mezzanine-users] Extending Displayable Model, Views

2017-07-06 Thread Eduardo Rivas
I see you created a urlconf for your app, but have you added it to your root urls.py? If so, is if above or below Mezzanine's catch-all pattern? On Jul 6, 2017 9:12 PM, wrote: > Hi, thanks for such a great resource! I have googled around for a few days > and have

Re: [mezzanine-users] Enable RichTextField().formfield() for registered users

2017-06-04 Thread Eduardo Rivas
Hmm, I would assume that the media library is not going to work for non admin users. You'll have to implement file uploads yourself. I would start by checking how Mezzanine handles file uploads in TinyMCE and emulating that without the admin checks. But first make sure you want non admin users

Re: [mezzanine-users] Enable RichTextField().formfield() for registered users

2017-06-04 Thread Eduardo Rivas
Have you included {{ form.media }} in the template where you render the form? That should bring in the CSS and JS required to render the TinyMCE widget. On Jun 4, 2017 2:30 PM, "Diego Castro" wrote: Hello, I have created a form that is added to a page using decorators in

Re: [mezzanine-users] error "context must be a dict rather than Context"

2017-05-04 Thread Eduardo Rivas
This is because Mezzanine is not compatible with Django 1.11. I recommend you downgrade to 1.10 for now. There's an open pull request that implements Django 1.11 support, in case you want to try it out: https://github.com/stephenmcd/mezzanine/issues/1749 On 2017-05-04 1:59 PM, marco coso

Re: [mezzanine-users] Fetch As Google - Redirect

2017-04-30 Thread Eduardo Rivas
Your site is actually served on the www subdomain, and the top level domain is configured to redirect to that. This way of setting up sites is down to personal preference, but it's a perfectly valid configuration. Google understands it and will set the www subdomain as the "canonical" URL.

Re: [mezzanine-users] Channels?

2017-05-19 Thread Eduardo Rivas
I don't think there's anything specific about Mezzanine and Channels. If you have a Django app that works, all you'd need to do is install it as usual in a Mezzanine project (add to INSTALLED_APPS, configure urls, etc). Same thing with the server, if you have a stack that works with Django, it

Re: [mezzanine-users] Does Orderable / Sortable Work on Editable Template Tag?

2017-09-15 Thread Eduardo Rivas
I don't think so. The Orderable abstract model is designed for inlines only, and the {% editable %} template tag doesn't support that. On 2017-09-15 9:55 AM, Matt Mansour wrote: Hi All - I am looking to create a page of images that are both sortable and in a grid format - instead of each

Re: [mezzanine-users] Re: How can I do to create/edit as when using PageAdmin and list as when not using PageAdmin?

2017-09-14 Thread Eduardo Rivas
When I develop a Mezzanine site, there's usually two types of models I use: 1. Custom Page types. These are models that users want to incorporate into the page menu, and they must be editable/orderable from the page tree in the admin. In this case the model must inherit from

Re: [mezzanine-users] Does Orderable / Sortable Work on Editable Template Tag?

2017-09-15 Thread Eduardo Rivas
surrounding neighborhood. >> >> With that many images; dragging to sort and group takes much longer in a >> row format (admin inlines) versus grid format. >> >> On Friday, September 15, 2017 at 9:12:09 AM UTC-7, Eduardo Rivas wrote: >>> >>> No proble

Re: [mezzanine-users] Re: How can I do to create/edit as when using PageAdmin and list as when not using PageAdmin?

2017-09-14 Thread Eduardo Rivas
What have you tried? Django should create the migration when you swap out the subclasses. It's mostly going to remove fields since Page is a subclass of Displayable anyways. There's also the nuclear option of just migrating your app back to zero to delete the tables and just create a new

Re: [mezzanine-users] Custom content type extending Displayable accessing in template

2017-10-06 Thread Eduardo Rivas
Hello Hamza. Displayable is an abstract model, which means you can use is as a base for your own models, but it doesn't exist in the database by itself. The fields defined in Displayable will simply become part of the model that inherits from it. For example, if you create "class

Re: [mezzanine-users] Custom content type extending Displayable accessing in template

2017-10-06 Thread Eduardo Rivas
Access to model fields is the same in Python and in templates: {{ my_model.title }} {# This comes from Displayable #} {{ my_model.some_other_field }} Now, you might be asking how to get "my_model" into the template context to begin with. The answer is to write a view that does it: from

Re: [mezzanine-users] Custom content type extending Displayable accessing in template

2017-10-06 Thread Eduardo Rivas
Also, here's I talk I gave regarding how to leverage Mezzanine to display content types using Displayable instead of Page. It might be useful for what you're building: https://www.youtube.com/watch?v=yVAmMXES2EU On 2017-10-06 2:33 PM, Eduardo Rivas wrote: Access to model fields is the same

Re: [mezzanine-users] Re: Send a message to admin from the save method in a Displayable model

2017-10-14 Thread Eduardo Rivas
If that's the case you may want to override response_change() instead. This method is quite complex and determines which message to display depending on what action the user just triggered (save, save and continue, save and add new, etc).

Re: [mezzanine-users] Trying to make a section of my site that's like Blog Posts

2017-10-14 Thread Eduardo Rivas
tips? Examples of other custom-made `get_absolute_url()` methods? Or maybe I'm looking at this all wrong? On Wednesday, October 11, 2017 at 9:15:13 PM UTC-4, Eduardo Rivas wrote: Also (and I know I've posted this a ton lately, but I think it's relevant) here's a talk describing t

Re: [mezzanine-users] Send a message to admin from the save method in a Displayable model

2017-10-13 Thread Eduardo Rivas
I would recommend you move this logic to the admin view, where the request is going to be available at all times. Specifically, you should register your own admin class and override the save_model() method, as described here:

Re: [mezzanine-users] Re: Customizing search URL

2017-09-12 Thread Eduardo Rivas
Yes it will, because the template uses the {% url %} tag and will respect your urlpatterns. Just make sure you set name="search" in your overridden pattern. On 2017-09-12 9:19 AM, si...@e5r.no wrote: tirsdag 12. september 2017 14.14.13 UTC+2 skrev Christian Kuper følgende: Just create a

Re: [mezzanine-users] How to view the cart in Cartridge?

2017-09-23 Thread Eduardo Rivas
Cartridge default templates include a "view cart" button in the top right corner of the site. You can see it in the demo site: http://mezzanine.jupo.org/blog/ Otherwise the cart is accessible at all times at the /shop/cart URL. On 2017-09-23 5:16 PM, jenia mtl wrote: Hello. I can't figure

Re: [mezzanine-users] Cartridge, add product

2017-09-23 Thread Eduardo Rivas
You might have a problem with Pillow (the image manipulation library). Some versions are not working with Mezzanine 4.2.3 and will output the full-size image instead of a thumbnail. The solution is to downgrade to Pillow 4.1.1 or upgrade to Mezzanine's master branch. See:

Re: [mezzanine-users] How to extend cartridge?

2017-09-23 Thread Eduardo Rivas
To extend templates: Create a template in your project under the same path as the Cartridge template. For example, if you want to provide your own template for Products, create a template in your_app/templates/shop/product.html. Here's an explanation of Django's template loading:

Re: [mezzanine-users] WHy does deploying mezzanine on digital ocean shows INternal service error?

2017-09-25 Thread Eduardo Rivas
" /bin/bash -l -c "cd / >/de v/null && pg_dump -Fc coursofrancesco > /tmp/last.db" Aborting. Disconnecting from 104.131.97.134... done. On Mon, Sep 25, 2017 at 1:29 AM, Eduardo Rivas <jerivasmel...@gmail.com <mailto:jerivasmel...@gmail.com>> wrote:

Re: [mezzanine-users] WHy does deploying mezzanine on digital ocean shows INternal service error?

2017-09-25 Thread Eduardo Rivas
Did you wipe your server and run "fab secure" and "fab all"? It sounds like you don't have Postgres installed. On 2017-09-25 2:18 PM, francois lemestre wrote: Hello, This happened after i did "fab deploy" On Mon, Sep 25, 2017 at 4:56 PM, Eduardo R

Re: [mezzanine-users] Re: how to access page content programmatically?

2017-09-24 Thread Eduardo Rivas
Let's start with the get() call from mezzanine.pages.models import Page mypage = Page.objects.get(title="My title") Since the "content" field is part of the RichTextPage subclass, we need to access it through the relation: mypage.richtextpage.content. If the page were a Form, it would be:

Re: [mezzanine-users] WHy does deploying mezzanine on digital ocean shows INternal service error?

2017-09-24 Thread Eduardo Rivas
It looks like you've followed a third-party tutorial that has instructed you to install all the dependencies manually. Have you tried following the official Mezzanine tutorial? It will automate all the installation steps, including the dependency installation, database configuration, static

Re: [mezzanine-users] Trying to make a section of my site that's like Blog Posts

2017-10-11 Thread Eduardo Rivas
Hi Tom. You need to register your model in the admin. You can use mezzanine.blog.admin as an example: https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/blog/admin.py. This admin configuration is a bit complex, so I recommend you become familiar with Django's admin in general

Re: [mezzanine-users] Trying to make a section of my site that's like Blog Posts

2017-10-11 Thread Eduardo Rivas
-11 7:08 PM, Eduardo Rivas wrote: Hi Tom. You need to register your model in the admin. You can use mezzanine.blog.admin as an example: https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/blog/admin.py. This admin configuration is a bit complex, so I recommend you become familiar

Re: [mezzanine-users] How to use mezzanine.forms?

2017-10-11 Thread Eduardo Rivas
Hello Rainell. mezzanine.forms is not a like django.forms. mezzanine.forms is meant for admin users to create forms from the admin. It is basically a "form builder" for your end users. To use it make sure it is in you INSTALLED_APPS and in the admin create a new page of type "Form". When

Re: [mezzanine-users] delete_model method doesn't exist in the PageAdmin class. How do something when delete page?

2017-10-19 Thread Eduardo Rivas
When overriding methods you should call super(), not the methods directly on parent classes. super() will resolve the method order correctly, and in this case it'll call delete_model() all the way back in ModelAdmin, which is the base class of PageAdmin. Here's an example on how to call

Re: [mezzanine-users] Do I redirect to home page using `home_slug`?

2017-11-22 Thread Eduardo Rivas
Can you show us what function is raising the exception? Is it home_slug, or redirect? What happens if you use: return redirect("/") ? On 2017-11-22 7:59 PM, Tom Tanner wrote: In one of my views, I have this: | frommezzanine.utils.urls importhome_slug defmyView(request): # Some code...

Re: [mezzanine-users] Do I redirect to home page using `home_slug`?

2017-11-23 Thread Eduardo Rivas
*callback_kwargs > ) > File "/home/myLinuxUsername/project/product_blog/theme/views.py", line > 48, in register > return redirect('/') > TypeError: 'str' object is not callable > > > > On Wednesday, November 22, 2017 at 11:50:04 PM UTC-5, Eduardo Rivas wrote: &

Re: [mezzanine-users] Thumbnail generation failing silently

2017-11-03 Thread Eduardo Rivas
Hello Iain. This is an issue that has been fixed on the master branch: https://github.com/stephenmcd/mezzanine/issues/1781 On 2017-11-03 11:18 AM, Iain Mac Donald wrote: On Fri, 3 Nov 2017 15:42:49 + Iain Mac Donald wrote: Both the dev and production

Re: [mezzanine-users] Re: Unable to deploy Mezzanine on Digital ocean.

2018-05-27 Thread Eduardo Rivas
after weeks of trying I no longer have the patience for outdated instructions- SO please either update your instructions or ADD a note at the beginning listing the exact version of the dependencies and even better yet the PYTHON VERSION to begin with. Don't you agree??? On Monday, March 28, 2016 at

Re: [mezzanine-users] Database not populated using Fabric deploy

2018-01-18 Thread Eduardo Rivas
Hello! The fabfile assumes your test database contains data not suitable for production. You will need to manually dump and restore your DB in the production server if you want to transfer your development data. My suggestion is you create your own Fabric task to automate the process if this

Re: [mezzanine-users] Question regarding fab deploy using rsync and file deletion

2018-01-12 Thread Eduardo Rivas
Hi Pat. I'm the person who implemented rsync deployments and didn't even know it has a delete option! Please go ahead and submit a PR, it sounds like a genuine improvement. On 2018-01-11 10:59 AM, Pat James wrote: I deleted a template file, did a fab deploy via rsync, and found that the

Re: [mezzanine-users] Providers

2018-02-15 Thread Eduardo Rivas
Hello Fabio. Pretty much any VPS provider is suitable to deploy Mezzanine sites with the default fabfile. This includes Digital Ocean, Linode, Vultr, etc. Here's the official tutorial: http://mezzanine.jupo.org/docs/deployment.html Other than that you can deploy Mezzanine anywhere that will

Re: [mezzanine-users] Where can I view my Mezzanine project's data tables?

2018-01-02 Thread Eduardo Rivas
Hi Tom. If you configured postgres as your database backend, you can use pgAdmin or any other viewer to access your tables. If you started a Mezzanine project and didn't change the database configuration, you're probably using a sqlite database. This is just a regular file in your project

RE: [mezzanine-users] Recommendations for Bootstrap WYSIWYG editor?

2018-08-08 Thread Eduardo Rivas
I have achieved something similar using TinyMCE (the builtin editor). What I do is have the site CSS applied to editor. So if site editors want to build a grid with Bootstrap classes, they have to edit the markup, but can at least see how text and other images will appear in the grid. To do

RE: [mezzanine-users] Re: Multiple Blogs

2018-08-10 Thread Eduardo Rivas
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

RE: [mezzanine-users] New way to use custome templates

2018-08-15 Thread Eduardo Rivas
Hi Amir. What do you find difficult about the process? Converting regular HTML to Django templates? Loading static files? Something Mezzanine-specific? From: Amir Sent: Wednesday, August 15, 2018 8:07 AM To: Mezzanine Users Subject: [mezzanine-users] New way to use custome templates I recently

RE: [mezzanine-users] Implementing multiple blogs

2018-08-08 Thread Eduardo Rivas
You can add custom entries on the nav menu by adding pages of type “Link”. In the URL field enter the category slug, something like /blog/category/example-category/ (you can get the slug by manually browsing to the category and copying the URL). From: Mr X Sent: Wednesday, August 8, 2018 1:05

<    1   2   3   4   >