[mezzanine-users] Use of RichText model

2015-02-13 Thread Melvin Ramos

Hello,

At Stephen McDonald's request, I post here in the Mailing List.

I'm new to Django and therefore to Mezzanine. I'm creating a model and I 
want to have a RichText field in one of the attributes of the class (code 
below):

models.py

from django.db import models
from mezzanine.pages.models import Page
from mezzanine.core.models import RichText


class KeyDocument(Page):
pass


class KeyDoc(models.Model):
ref_page = models.ForeignKey("KeyDocument")
title = models.CharField("Title*", max_length=1000)
author = models.CharField("Author(s)*", max_length=1000)
year = models.PositiveSmallIntegerField("Year*")
month = models.CharField("Month", max_length=10, null=True, blank=True)
info = RichText("Additional Information")
laguange = models.CharField("Language(s)", max_length=100)
slug = models.SlugField("Slug", max_length=100, null=True, blank=True)


class Meta:
ordering = ['-year', 'title']


admin.py

from copy import deepcopy
from django.contrib import admin
from mezzanine.pages.admin import PageAdmin
from references.models import KeyDocument, KeyDoc


keydoc_extra_fieldsets = ((None, {"fields": ()}),)


class KeyDocInline(admin.TabularInline):
model = KeyDoc


class KeyDocsAdmin(PageAdmin):
inlines = (KeyDocInline,)
fieldsets = deepcopy(PageAdmin.fieldsets) + keydoc_extra_fieldsets


admin.site.register(KeyDocument, KeyDocsAdmin)


admin.site.register(KeyDoc)


The result is that the field of Additional Info (which its variable is 
info) is not showing at all.

Can anyone help me with this?

Thanks in advance

-- 
You received this message because you are subscribed to 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: Use of RichText model

2015-02-18 Thread Melvin Ramos
It worked! :) Thanks for the help

El sábado, 14 de febrero de 2015, 20:44:53 (UTC-4:30), Ryan Sadwick 
escribió:
>
> Yep sorry for the brief answer :)
>
> On Saturday, February 14, 2015 at 4:11:43 PM UTC-5, Kenneth Bolton wrote:
>>
>> To clarify Ryan's correct answer just a little, fields on your model 
>> should be Field instances, not Model instances.
>>
>> On Sat, Feb 14, 2015 at 3:20 PM, Ryan Sadwick  wrote:
>>
>>> info  = RichTextField(("Content"), blank=True, null=True)
>>>
>>>
>>>
>>>
>>> On Friday, February 13, 2015 at 5:17:52 PM UTC-5, Melvin Ramos wrote:
>>>>
>>>>
>>>> Hello,
>>>>
>>>> At Stephen McDonald's request, I post here in the Mailing List.
>>>>
>>>> I'm new to Django and therefore to Mezzanine. I'm creating a model and 
>>>> I want to have a RichText field in one of the attributes of the class 
>>>> (code 
>>>> below):
>>>>
>>>> models.py
>>>>
>>>> from django.db import models
>>>> from mezzanine.pages.models import Page
>>>> from mezzanine.core.models import RichText
>>>>
>>>>
>>>> class KeyDocument(Page):
>>>> pass
>>>>
>>>>
>>>> class KeyDoc(models.Model):
>>>> ref_page = models.ForeignKey("KeyDocument")
>>>> title = models.CharField("Title*", max_length=1000)
>>>> author = models.CharField("Author(s)*", max_length=1000)
>>>> year = models.PositiveSmallIntegerField("Year*")
>>>> month = models.CharField("Month", max_length=10, null=True, blank=
>>>> True)
>>>> info = RichText("Additional Information")
>>>> laguange = models.CharField("Language(s)", max_length=100)
>>>> slug = models.SlugField("Slug", max_length=100, null=True, blank=
>>>> True)
>>>>
>>>>
>>>> class Meta:
>>>> ordering = ['-year', 'title']
>>>>
>>>>
>>>> admin.py
>>>>
>>>> from copy import deepcopy
>>>> from django.contrib import admin
>>>> from mezzanine.pages.admin import PageAdmin
>>>> from references.models import KeyDocument, KeyDoc
>>>>
>>>>
>>>> keydoc_extra_fieldsets = ((None, {"fields": ()}),)
>>>>
>>>>
>>>> class KeyDocInline(admin.TabularInline):
>>>> model = KeyDoc
>>>>
>>>>
>>>> class KeyDocsAdmin(PageAdmin):
>>>> inlines = (KeyDocInline,)
>>>> fieldsets = deepcopy(PageAdmin.fieldsets) + keydoc_extra_fieldsets
>>>>
>>>>
>>>> admin.site.register(KeyDocument, KeyDocsAdmin)
>>>>
>>>>
>>>> admin.site.register(KeyDoc)
>>>>
>>>>
>>>> The result is that the field of Additional Info (which its variable is 
>>>> info) is not showing at all.
>>>>
>>>> Can anyone help me with this?
>>>>
>>>> Thanks in advance
>>>>
>>>  -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Mezzanine Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to mezzanine-use...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

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


[mezzanine-users] Can't get more plugins for TinyMCE

2015-03-03 Thread Melvin Ramos

Hello,

I'm trying to increase (or replace) the TinyMCE default plugins, since they 
are too basic and I need more (text alignment, hr, etc).

So what I did first was to create a tinymce_setup.js, copy the original 
tinymce_setup.js from grappeli (since it appears it's the one that gets 
called). What is new in this file is that in the plugins line, I change 
this:

plugins: 
"advimage,advlink,fullscreen,paste,media,searchreplace,grappelli,grappelli_contextmenu,template",

for this (for example):

plugins: 
"advimage,advlink,fullscreen,paste,media,searchreplace,grappelli,grappelli_contextmenu,template,
 
hr, colorpicker",

(I previously added the colorpicker folder into grappelli since it wasn't 
there)

Then, I wrote in settings.py the following:

TINYMCE_SETUP_JS = '/static/tinymce_setup/tinymce_setup.js'

which is where is located my file.

What happens is that it breaks (bunch of errors in console of not finding 
some editor_plugin.js, no folder has that file so I guess I'm being trolled 
away).

Also tried a method described in some other post of creating a new 
TiniMCEWidget, same result of breaking the javascript.

Can someone give me a hand?

Thanks in advance,

Melvin

-- 
You received this message because you are subscribed to 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 more plugins for TinyMCE

2015-03-04 Thread Melvin Ramos
In the static folder, '/static/tinymce_setup/tinymce_setup.js'

El miércoles, 4 de marzo de 2015, 11:25:02 (UTC-4:30), Josh Cartmell 
escribió:
>
> Hi Melvin, when you copied the TinyMCE setup script, where did you put it?
>
> On Tue, Mar 3, 2015 at 10:54 PM, Melvin Ramos  > wrote:
>
>>
>> Hello,
>>
>> I'm trying to increase (or replace) the TinyMCE default plugins, since 
>> they are too basic and I need more (text alignment, hr, etc).
>>
>> So what I did first was to create a tinymce_setup.js, copy the original 
>> tinymce_setup.js from grappeli (since it appears it's the one that gets 
>> called). What is new in this file is that in the plugins line, I change 
>> this:
>>
>> plugins: 
>> "advimage,advlink,fullscreen,paste,media,searchreplace,grappelli,grappelli_contextmenu,template",
>>
>> for this (for example):
>>
>> plugins: 
>> "advimage,advlink,fullscreen,paste,media,searchreplace,grappelli,grappelli_contextmenu,template,
>>  
>> hr, colorpicker",
>>
>> (I previously added the colorpicker folder into grappelli since it wasn't 
>> there)
>>
>> Then, I wrote in settings.py the following:
>>
>> TINYMCE_SETUP_JS = '/static/tinymce_setup/tinymce_setup.js'
>>
>> which is where is located my file.
>>
>> What happens is that it breaks (bunch of errors in console of not finding 
>> some editor_plugin.js, no folder has that file so I guess I'm being trolled 
>> away).
>>
>> Also tried a method described in some other post of creating a new 
>> TiniMCEWidget, same result of breaking the javascript.
>>
>> Can someone give me a hand?
>>
>> Thanks in advance,
>>
>> Melvin
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Mezzanine Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to mezzanine-use...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

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


[mezzanine-users] Trying to integrate Mezzanine to another project

2015-03-31 Thread Melvin Ramos
Hello,

I'm tryin to integrate Mezzanine to GeoNode. I added all I needed in 
settings.py but this error appears:

CommandError: One or more models did not validate:
agon_ratings.rating: Accessor for field 'content_type' clashes with related 
field 'ContentType.rating_set'. Add a related_name argument to the 
definition for 'content_type'.
generic.rating: Accessor for field 'content_type' clashes with related 
field 'ContentType.rating_set'. Add a related_name argument to the 
definition for 'content_type'.

And I have no idea what it is. Can you help me? Have anyone tried anything 
like this before?

-- 
You received this message because you are subscribed to 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] Trying to integrate Mezzanine to another project

2015-03-31 Thread Melvin Ramos
Yea, it did! Thanks I'm so burned right now I missed that answer

El martes, 31 de marzo de 2015, 19:00:29 (UTC-4:30), Graham Oliver escribió:
>
> Perhaps the top answer here can help?
>
> http://stackoverflow.com/questions/2606194/django-error-message-add-a-related-name-argument-to-the-definition
>
> On 1 April 2015 at 12:27, Melvin Ramos  > wrote:
>
>> Hello,
>>
>> I'm tryin to integrate Mezzanine to GeoNode. I added all I needed in 
>> settings.py but this error appears:
>>
>> CommandError: One or more models did not validate:
>> agon_ratings.rating: Accessor for field 'content_type' clashes with 
>> related field 'ContentType.rating_set'. Add a related_name argument to the 
>> definition for 'content_type'.
>> generic.rating: Accessor for field 'content_type' clashes with related 
>> field 'ContentType.rating_set'. Add a related_name argument to the 
>> definition for 'content_type'.
>>
>> And I have no idea what it is. Can you help me? Have anyone tried 
>> anything like this before?
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Mezzanine Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to mezzanine-use...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> t : 021 081 71732
>  

-- 
You received this message because you are subscribed to 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] Trying to integrate Mezzanine to another project

2015-03-31 Thread Melvin Ramos
Now I'm having this issue and I can't find an answer that points me 
somewhere:

AttributeError at /

'int' object has no attribute 'set_helpers'

Request Method:   GET

Request URL:http://localhost:8000/

Django Version:   1.6.10

Exception Type:   AttributeError

Exception Value: 

'int' object has no attribute 'set_helpers'

Exception Location:
/home/elanor/Documentos/Pasantia/env/local/lib/python2.7/site-packages/mezzanine/pages/context_processors.py
 
in page, line 18

Python Executable:/home/elanor/Documentos/Pasantia/env/bin/python

Python Version:  2.7.6

Python Path: 

['/home/elanor/Documentos/Pasantia/rle/geonode',

 '/home/elanor/Documentos/Pasantia/env/lib/python2.7',

 '/home/elanor/Documentos/Pasantia/env/lib/python2.7/plat-x86_64-linux-gnu',

 '/home/elanor/Documentos/Pasantia/env/lib/python2.7/lib-tk',

 '/home/elanor/Documentos/Pasantia/env/lib/python2.7/lib-old',

 '/home/elanor/Documentos/Pasantia/env/lib/python2.7/lib-dynload',

 '/usr/lib/python2.7',

 '/usr/lib/python2.7/plat-x86_64-linux-gnu',

 '/usr/lib/python2.7/lib-tk',

 '/home/elanor/Documentos/Pasantia/env/local/lib/python2.7/site-packages',

 '/home/elanor/Documentos/Pasantia/rle/geonode']

Server time:  Tue, 31 Mar 2015 20:25:51 -0430

Traceback Switch to copy-and-paste view

 

/home/elanor/Documentos/Pasantia/env/local/lib/python2.7/site-packages/django/core/handlers/base.py
 
in get_response

response = response.render() ...

▶ Local vars

/home/elanor/Documentos/Pasantia/env/local/lib/python2.7/site-packages/django/template/response.py
 
in render

self.content = self.rendered_content ...

▶ Local vars

/home/elanor/Documentos/Pasantia/env/local/lib/python2.7/site-packages/django/template/response.py
 
in rendered_content

context = self.resolve_context(self.context_data) ...

▶ Local vars

/home/elanor/Documentos/Pasantia/env/local/lib/python2.7/site-packages/django/template/response.py
 
in resolve_context

return RequestContext(self._request, context, 
current_app=self._current_app) ...

▶ Local vars

/home/elanor/Documentos/Pasantia/env/local/lib/python2.7/site-packages/django/template/context.py
 
in __init__

self.update(processor(request)) ...

▶ Local vars

/home/elanor/Documentos/Pasantia/env/local/lib/python2.7/site-packages/mezzanine/pages/context_processors.py
 
in page

page.set_helpers(context) ...

I know that in the pages app of mezzanine, in the models.py is defined the 
method set_helpers. So, why django is thinking that the page object is an 
int?

Any ideas?


El martes, 31 de marzo de 2015, 19:30:59 (UTC-4:30), Melvin Ramos escribió:
>
> Yea, it did! Thanks I'm so burned right now I missed that answer
>
> El martes, 31 de marzo de 2015, 19:00:29 (UTC-4:30), Graham Oliver 
> escribió:
>>
>> Perhaps the top answer here can help?
>>
>> http://stackoverflow.com/questions/2606194/django-error-message-add-a-related-name-argument-to-the-definition
>>
>> On 1 April 2015 at 12:27, Melvin Ramos  wrote:
>>
>>> Hello,
>>>
>>> I'm tryin to integrate Mezzanine to GeoNode. I added all I needed in 
>>> settings.py but this error appears:
>>>
>>> CommandError: One or more models did not validate:
>>> agon_ratings.rating: Accessor for field 'content_type' clashes with 
>>> related field 'ContentType.rating_set'. Add a related_name argument to the 
>>> definition for 'content_type'.
>>> generic.rating: Accessor for field 'content_type' clashes with related 
>>> field 'ContentType.rating_set'. Add a related_name argument to the 
>>> definition for 'content_type'.
>>>
>>> And I have no idea what it is. Can you help me? Have anyone tried 
>>> anything like this before?
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Mezzanine Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to mezzanine-use...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> -- 
>> t : 021 081 71732
>>  
>

-- 
You received this message because you are subscribed to 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] Need all the help I can get

2015-04-05 Thread Melvin Ramos
Hello Mezzanine community,

There are some moments where a developer needs to raise the white flag and 
ask for help. This is my time.

I'm trying to integrate a GIS and Mezzanine. My first option was MapServer 
but it went terrible (plus, the documentation was in general not good) so I 
decided to try a django based option called GeoNode. I've been stuck for 2 
weeks now trying to integrate this framework with mezzanine, but it always 
reads the models wrong (for instance it thinks that a page is an int or 
stuffs like that). Evidently 2 weeks is a long time for a developer but I 
basically have not to much choice.

Some would ask why not use GeoDjango. It's because it lacks of raster 
support (it only reads them, I need more than that, I need queries and even 
manipulation, which GeoNode (GeoServer) and MapServer in theory have). But 
in case that this fails, then I will haveto try GeoDjango because either 
way I need to make this work and I'm running out of time (and definitely 
ideas).


What I'm asking here is the following: if you are willing, can you try for 
yourselves to integrate both frameworks to see if you can make them work? 
GeoNone documentation is here: http://geonode.readthedocs.org/, it tells 
you what you need and how to install it. I could tell you what I've done so 
far but I'm afraid that if I do I might predispose your creativity and way 
of thinking (which is not the point). I just need it to successfully run, 
how it works a GIS doesn't matter here.

Things you need to have if you are going to try this: PostgreSQL and 
PostGIS and of course a virtual environment (virtualenv or virtualwrapper).

I would appreciate any help, if even Stephen gets time for this it would be 
nice (I know he is working on the new release of Mezzanine, and also in 
vacations).

Thanks in advance and hope you can help me.

MR

-- 
You received this message because you are subscribed to 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] Need all the help I can get

2015-04-05 Thread Melvin Ramos
Hey Terry,

Thanks for the reply. Yes, they are both projects but in theory Mezzanine 
can be integrated as an app (or so it says in the Mezz docs).

Check this site: http://www3.socioambiental.org/raisg2015/

I'm looking to make something like this. An admin user can upload vector or 
raster files and it would show up on the map, and make queries about the 
data that each file contains.

I have some questions:

Since you say to run it side by side, it is possible to share the same 
database and work just fine?

OpenLayer isn't just for showing maps? Or you can make "complex" queries 
with it? And, in any case, how did you make it work with Django CMS(I'm 
familiar with it)? Or docs are just fine? And how did you integrate 
MapServer into Django? Did you use mapscript for python?

How friendly is making queries using GDAL directly?

Thanks,

MR

El domingo, 5 de abril de 2015, 16:15:20 (UTC-4:30), Terry Brown escribió:
>
> On Sun, 5 Apr 2015 09:11:42 -0700 (PDT) 
> Melvin Ramos > wrote: 
>
> > Hello Mezzanine community, 
> > 
> > There are some moments where a developer needs to raise the white 
> > flag and ask for help. This is my time. 
>
> Sounds to me like your problem is that both Mezzanine and GeoNode are 
> Django "projects", not Django "apps", and while apps are supposed to 
> play nice together, projects aren't.  That was obvious perhaps - if I 
> had to use Mezzanine and GeoNode I'd run them side by side, and not try 
> to merge them, but depends exactly what you're trying to do. 
>
> The Django GIS apps. I've used have used OpenLayers (JavaScript) and 
> POSTGIS directly - that approach would be compatible with Mezzanine 
> (I've only done it with Django CMS so far).  Server side raster 
> manipulation I've done with GDAL 
> http://pcjericks.github.io/py-gdalogr-cookbook/ 
> I did use MapServer to feed images to OpenLayers though. 
>
> Anyway, I guess all I'm saying is that if I had to get Mezzanine plus 
> GIS working I'd be using OpenLayers etc. - but it depends on exactly 
> what your objectives are. 
>
> Cheers -Terry 
>
> > I'm trying to integrate a GIS and Mezzanine. My first option was 
> > MapServer but it went terrible (plus, the documentation was in 
> > general not good) so I decided to try a django based option called 
> > GeoNode. I've been stuck for 2 weeks now trying to integrate this 
> > framework with mezzanine, but it always reads the models wrong (for 
> > instance it thinks that a page is an int or stuffs like that). 
> > Evidently 2 weeks is a long time for a developer but I basically have 
> > not to much choice. 
> > 
> > Some would ask why not use GeoDjango. It's because it lacks of raster 
> > support (it only reads them, I need more than that, I need queries 
> > and even manipulation, which GeoNode (GeoServer) and MapServer in 
> > theory have). But in case that this fails, then I will haveto try 
> > GeoDjango because either way I need to make this work and I'm running 
> > out of time (and definitely ideas). 
> > 
> > 
> > What I'm asking here is the following: if you are willing, can you 
> > try for yourselves to integrate both frameworks to see if you can 
> > make them work? GeoNone documentation is here: 
> > http://geonode.readthedocs.org/, it tells you what you need and how 
> > to install it. I could tell you what I've done so far but I'm afraid 
> > that if I do I might predispose your creativity and way of thinking 
> > (which is not the point). I just need it to successfully run, how it 
> > works a GIS doesn't matter here. 
> > 
> > Things you need to have if you are going to try this: PostgreSQL and 
> > PostGIS and of course a virtual environment (virtualenv or 
> > virtualwrapper). 
> > 
> > I would appreciate any help, if even Stephen gets time for this it 
> > would be nice (I know he is working on the new release of Mezzanine, 
> > and also in vacations). 
> > 
> > Thanks in advance and hope you can help me. 
> > 
> > MR 
> > 
>
>

-- 
You received this message because you are subscribed to 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] Need all the help I can get

2015-04-06 Thread Melvin Ramos
Alright. I'm considering your approach, and I started reading whatever I 
could find but I still would like to ask you since you have used it and I'm 
just starting with Django and clearly you are not.

I understand the multiple schemas in the same database, but how do you 
access an especific schema from the django project? And how do you stablish 
the common schema for the specific tables of users and permissions and all 
that?

El domingo, 5 de abril de 2015, 22:19:33 (UTC-4:30), Terry Brown escribió:
>
> On Sun, 5 Apr 2015 14:15:56 -0700 (PDT) 
> Melvin Ramos > wrote: 
>
> > Hey Terry, 
> > 
> > Thanks for the reply. Yes, they are both projects but in theory 
> > Mezzanine can be integrated as an app (or so it says in the Mezz 
> > docs). 
>
> What I forgot to say in my previous email was that I'm not a Mezz 
> expert, I've done a couple of simple deployments, but no major mods. - 
> I've used Django CMS more, although my current preference is Mezz. 
>
> I'll post this reply on the list but it's not very Mezz relevant, some 
> other list might be better. 
>
> > Check this site: http://www3.socioambiental.org/raisg2015/ 
> > 
> > I'm looking to make something like this. An admin user can upload 
> > vector or raster files and it would show up on the map, and make 
> > queries about the data that each file contains. 
> > 
> > I have some questions: 
> > 
> > Since you say to run it side by side, it is possible to share the 
> > same database and work just fine? 
>
> Probably - I run multiple Django apps. on the same Postgresql DB and 
> use the Postgresql "schema" (which everything else would call namespace) 
> to separate the project specific bits.  Postgresql will search schemas 
> in a specified order, so by putting each projects CMS specific tables 
> in a separate schema and the auth_user tables in a common schema it's 
> easy to share users among distinct projects.  And you can definitely 
> access data across projects, Django support simultaneous use of 
> multiple DBs. 
>
> > OpenLayer isn't just for showing maps? Or you can make "complex" 
> > queries with it? And, in any case, how did you make it work with 
> > Django CMS(I'm familiar with it)? Or docs are just fine? And how did 
> > you integrate MapServer into Django? Did you use mapscript for python? 
>
> I guess it would be fair to say OpenLayers is just for displaying maps. 
>
> The simple way to make it work with Django CMS or whatever would be to 
> put your map app's url ahead of the CMS's url in urls.py so links to 
> that url just get the vanilla Django view / template processing, 
> bypassing the CMS.  But I wanted to wrap the app. in the CMS's CSS 
> skin, so I used Django CMS's app hook methods to integrate the app. 
> into a CMS page - I'm sure Mezz has the same thing. 
>
> > How friendly is making queries using GDAL directly? 
>
> Depends.  All the basic vector stuff is quite straight forward.  I did 
> a site that performed raster arithmetic (just blending floating point 
> grids with different weightings) using the GDAL libs., it uses numpy, 
> but seemed straight forward enough.  For Zonal Stats I wrote this: 
> https://github.com/tbnorth/gridstats although I just noticed there's 
> also a Zonal Stats example in the GDAL cookbook linked below. 
>
> I think I used mapscript for python, or perhaps some of that and some 
> just tweaking plain text mapfiles. 
>
> Some of this might be too low level for you if you're up against a 
> deadline, but I'd still consider the side by side approach. 
>
> Cheers -Terry 
>
> > Thanks, 
> > 
> > MR 
> > 
> > El domingo, 5 de abril de 2015, 16:15:20 (UTC-4:30), Terry Brown 
> > escribió: 
> > > 
> > > On Sun, 5 Apr 2015 09:11:42 -0700 (PDT) 
> > > Melvin Ramos > wrote: 
> > > 
> > > > Hello Mezzanine community, 
> > > > 
> > > > There are some moments where a developer needs to raise the white 
> > > > flag and ask for help. This is my time. 
> > > 
> > > Sounds to me like your problem is that both Mezzanine and GeoNode 
> > > are Django "projects", not Django "apps", and while apps are 
> > > supposed to play nice together, projects aren't.  That was obvious 
> > > perhaps - if I had to use Mezzanine and GeoNode I'd run them side 
> > > by side, and not try to merge them, but depends exactly what you're 
> > > trying to do. 
> > > 
> > > The Django GIS apps. I've used have us

[mezzanine-users] Mezzanine Language Tabs?

2015-10-19 Thread Melvin Ramos

Hello fellas,

I'm trying to set a multilingual site using django-modeltranslation. I set 
up the default options of Mezzanine (createdb --noinput) and then I created 
an app with a custom model, made the translations.py and resgistered the 
model the admin.

In my settings.py I have 

USE_MODELTRANSLATION = True

LANGUAGE_CODE = "en"

# Supported languages
LANGUAGES = (
('en', _('English')),
('es', _('Spanish')),
('fr', _('French')),
)

MODELTRANSLATION_DEFAULT_LANGUAGE = "en"

USE_I18N = True


I synced the DB and i got this:



It shows the original field and 3 more (instead of 2). And I want it to 
look like the default (with the tabs), like this:



How do I make this happen?

Thanks in advance,

Melvin

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


[mezzanine-users] How to activate multilingual on admin dashboard?

2015-10-20 Thread Melvin Ramos
I want to make it like the demo. How to activate the multilingual feature 
in the admin dashboard?

Thanks in advance,

Melvin

-- 
You received this message because you are subscribed to 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] Media Library error on production server

2015-11-07 Thread Melvin Ramos
Hello fellas,

In my production server (Linode) I was trying to upload an image and the 
popup throws me the following errors:

Failed to load resource: the server responded with a status of 500 
(INTERNAL SERVER ERROR)
http://iucnrle.org/en/admin/media-library/browse/?pop=5&type=image

GET http://iucnrle.org/en/admin/media-library/browse/?pop=5&type=image 500 
(INTERNAL SERVER ERROR)
tinymce.min.js:9

and when I check the Media Library link it goes to an error page and throws 
this error:

Failed to load resource: the server responded with a status of 500 
(INTERNAL SERVER ERROR)
http://iucnrle.org/en/admin/media-library/browse/

No error shown in the Apache log.

This doesn't happen in my localhost dev server. Any possible solutions?

Thanks in advance,

MR

-- 
You received this message because you are subscribed to 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] Media Library giving error 500 on production server

2015-11-07 Thread Melvin Ramos
Hello fellas,

In my production server (Linode) I was trying to upload an image and the 
popup throws me the following errors:

Failed to load resource: the server responded with a status of 500 
(INTERNAL SERVER ERROR)
http://iucnrle.org/en/admin/media-library/browse/?pop=5&type=image

GET http://iucnrle.org/en/admin/media-library/browse/?pop=5&type=image 500 
(INTERNAL SERVER ERROR)
tinymce.min.js:9

and when I check the Media Library link it goes to an error page and throws 
this error:

Failed to load resource: the server responded with a status of 500 
(INTERNAL SERVER ERROR)
http://iucnrle.org/en/admin/media-library/browse/

No error shown in the Apache log.

This doesn't happen in my localhost dev server. Any possible solutions?

Thanks in advance,

MR

P.D.: Unrelated question: which version of TinyMCE is used by Mezzanine 4?

-- 
You received this message because you are subscribed to 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: Media Library giving error 500 on production server

2015-11-08 Thread Melvin Ramos
Well, I found the solution. It was an Apache2 problem. Since there was no 
log, I used Firebug to check and I noticed an UTF8 error. Looking through 
the web I found this 
guide: http://powerpython.org/blog/how-to-run-mezzanine-on-apache-and-mod-wsgi/ 
where it explains that LANG variable of Apache needed to be, in my case, 
'en_US.UTF-8' instead of C.

There are still some issues like in Mozilla the Twitter plugin doesn't work 
properly (the DOM gets the tweet but doesn't show them) but in the rest of 
the browsers (Chrome, Safari, Operaand even IE) works fine, or the issue 
where the TinyMCE Rich Text Editor doesn't apply text-align when you save 
or even I can't initialize my own TinyMCE init. But well, one problem at a 
time.

Peace fellas

El sábado, 7 de noviembre de 2015, 21:42:38 (UTC-4:30), Melvin Ramos 
escribió:
>
> Hello fellas,
>
> In my production server (Linode) I was trying to upload an image and the 
> popup throws me the following errors:
>
> Failed to load resource: the server responded with a status of 500 
> (INTERNAL SERVER ERROR)
> http://iucnrle.org/en/admin/media-library/browse/?pop=5&type=image
>
> GET http://iucnrle.org/en/admin/media-library/browse/?pop=5&type=image 
> 500 (INTERNAL SERVER ERROR)
> tinymce.min.js:9
>
> and when I check the Media Library link it goes to an error page and 
> throws this error:
>
> Failed to load resource: the server responded with a status of 500 
> (INTERNAL SERVER ERROR)
> http://iucnrle.org/en/admin/media-library/browse/
>
> No error shown in the Apache log.
>
> This doesn't happen in my localhost dev server. Any possible solutions?
>
> Thanks in advance,
>
> MR
>
> P.D.: Unrelated question: which version of TinyMCE is used by Mezzanine 4?
>

-- 
You received this message because you are subscribed to 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] Trying to integrate Mezzanine to another project

2015-12-16 Thread Melvin Ramos
Hey Paolo,

Well, I ended up running Mezzanine and GeoNode in parallel processes, 
sharing the same DB, and if I need some data in one project that comes from 
the other I make raw queries (check Django docs).

I haven't tried with the new version but I'm guessing it will be a problem 
since they are different Django versions (GeoNode still in 1.6).

Regards,

Melvin

El miércoles, 16 de diciembre de 2015, 14:52:36 (UTC-4:30), Paolo Pasquali 
escribió:
>
> Hi Melvin,
> I think I am facing the same 'set_helpers' issue trying to ingrate 
> Mezzanine into GeoNode. So I wonder whether you succeed in doing that and 
> may provide some documentation.
> Any help and advice would be much appreciated.
> Thanks!
>
> Paolo
>
>
>
> On Wednesday, April 1, 2015 at 3:04:29 AM UTC+2, Melvin Ramos wrote:
>>
>> Now I'm having this issue and I can't find an answer that points me 
>> somewhere:
>>
>> AttributeError at /
>>
>> 'int' object has no attribute 'set_helpers'
>>
>> Request Method:   GET
>>
>> Request URL:http://localhost:8000/
>>
>> Django Version:   1.6.10
>>
>> Exception Type:   AttributeError
>>
>> Exception Value: 
>>
>> 'int' object has no attribute 'set_helpers'
>>
>> Exception Location:
>> /home/elanor/Documentos/Pasantia/env/local/lib/python2.7/site-packages/mezzanine/pages/context_processors.py
>>  
>> in page, line 18
>>
>> Python Executable:/home/elanor/Documentos/Pasantia/env/bin/python
>>
>> Python Version:  2.7.6
>>
>> Python Path: 
>>
>> ['/home/elanor/Documentos/Pasantia/rle/geonode',
>>
>>  '/home/elanor/Documentos/Pasantia/env/lib/python2.7',
>>
>>
>>  '/home/elanor/Documentos/Pasantia/env/lib/python2.7/plat-x86_64-linux-gnu',
>>
>>  '/home/elanor/Documentos/Pasantia/env/lib/python2.7/lib-tk',
>>
>>  '/home/elanor/Documentos/Pasantia/env/lib/python2.7/lib-old',
>>
>>  '/home/elanor/Documentos/Pasantia/env/lib/python2.7/lib-dynload',
>>
>>  '/usr/lib/python2.7',
>>
>>  '/usr/lib/python2.7/plat-x86_64-linux-gnu',
>>
>>  '/usr/lib/python2.7/lib-tk',
>>
>>  
>> '/home/elanor/Documentos/Pasantia/env/local/lib/python2.7/site-packages',
>>
>>  '/home/elanor/Documentos/Pasantia/rle/geonode']
>>
>> Server time:  Tue, 31 Mar 2015 20:25:51 -0430
>>
>> Traceback Switch to copy-and-paste view
>>
>>  
>>
>> /home/elanor/Documentos/Pasantia/env/local/lib/python2.7/site-packages/django/core/handlers/base.py
>>  
>> in get_response
>>
>> response = response.render() ...
>>
>> ▶ Local vars
>>
>> /home/elanor/Documentos/Pasantia/env/local/lib/python2.7/site-packages/django/template/response.py
>>  
>> in render
>>
>> self.content = self.rendered_content ...
>>
>> ▶ Local vars
>>
>> /home/elanor/Documentos/Pasantia/env/local/lib/python2.7/site-packages/django/template/response.py
>>  
>> in rendered_content
>>
>> context = self.resolve_context(self.context_data) ...
>>
>> ▶ Local vars
>>
>> /home/elanor/Documentos/Pasantia/env/local/lib/python2.7/site-packages/django/template/response.py
>>  
>> in resolve_context
>>
>> return RequestContext(self._request, context, 
>> current_app=self._current_app) ...
>>
>> ▶ Local vars
>>
>> /home/elanor/Documentos/Pasantia/env/local/lib/python2.7/site-packages/django/template/context.py
>>  
>> in __init__
>>
>> self.update(processor(request)) ...
>>
>> ▶ Local vars
>>
>> /home/elanor/Documentos/Pasantia/env/local/lib/python2.7/site-packages/mezzanine/pages/context_processors.py
>>  
>> in page
>>
>> page.set_helpers(context) ...
>>
>> I know that in the pages app of mezzanine, in the models.py is defined 
>> the method set_helpers. So, why django is thinking that the page object is 
>> an int?
>>
>> Any ideas?
>>
>>
>> El martes, 31 de marzo de 2015, 19:30:59 (UTC-4:30), Melvin Ramos 
>> escribió:
>>>
>>> Yea, it did! Thanks I'm so burned right now I missed that answer
>>>
>>> El martes, 31 de marzo de 2015, 19:00:29 (UTC-4:30), Graham Oliver 
>>> escribió:
>>>>
>>

[mezzanine-users] Search engine showing no results

2016-02-09 Thread Melvin Ramos
Hello community,

I'm having a strange issue. I'm my dev project I added four posts, 
containing real info. Then I look for words that I know are in the post 
content and/or title and the result is "No results found".

I haven't touched the search engine or settings at all, so I'm clueless 
about what might be the problem.

Any thoughts on why is it failing? Ask away if you need more info (I don't 
what info to provide).

Thanks in advance,

Melvin

-- 
You received this message because you are subscribed to 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 form shows html tags in mail sent

2016-03-18 Thread Melvin Ramos
I also noticed that this richtext only appear when I'm logged in as admin. 
If I'm not logged in, it appears as a regular textarea. But when I receive 
the email it still shows the first doctype definition.

El jueves, 17 de marzo de 2016, 23:08:24 (UTC-4:30), Stephen McDonald 
escribió:
>
>
>
> On Fri, Mar 18, 2016 at 2:34 PM, Melvin Ramos  > wrote:
>
>> My mezzanine project runs in a VPS. Mail doesn't work by its own so I had 
>> to set it up with Postfix and Mailjet.
>>
>> It is my understanding that Postfix just allows to send the message and 
>> Mailjet is the authenticated handler. This would mean that the render of 
>> the mail occurs in Django.
>>
>
> I don't think any of that has anything to do with what you're asking.
>  
>
>>
>> Why is the message box a RichText editor? Can I change this? Or fix it so 
>> it shows the HTML in the mails?
>>
>
> What message box?
>  
>
>>
>> Thanks in advance,
>>
>> MR
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Mezzanine Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to mezzanine-use...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Stephen McDonald
> http://jupo.org
>

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


[mezzanine-users] Email form shows html tags in mail sent

2016-03-19 Thread Melvin Ramos
My mezzanine project runs in a VPS. Mail doesn't work by its own so I had 
to set it up with Postfix and Mailjet.

It is my understanding that Postfix just allows to send the message and 
Mailjet is the authenticated handler. This would mean that the render of 
the mail occurs in Django.

Why is the message box a RichText editor? Can I change this? Or fix it so 
it shows the HTML in the mails?

Thanks in advance,

MR

-- 
You received this message because you are subscribed to 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 form shows html tags in mail sent

2016-03-19 Thread Melvin Ramos
This is how my form looks like:

<https://lh3.googleusercontent.com/-cy4lpsTHdDI/Vuvj--RC9cI/DOk/2ehsbf2U5fI70RYyV4Y39rnWYUUu3Ow_w/s1600/message-box.jpg>



And this is how I'm receiving the message:

<https://lh3.googleusercontent.com/-1HyNhUPDJR8/VuvkJJSi3ZI/DOo/X6ROqQ6j5VYcCxOEFBtfGXjbv3yQGXv5Q/s1600/message-html-tags.jpg>





El jueves, 17 de marzo de 2016, 23:08:24 (UTC-4:30), Stephen McDonald 
escribió:
>
>
>
> On Fri, Mar 18, 2016 at 2:34 PM, Melvin Ramos  > wrote:
>
>> My mezzanine project runs in a VPS. Mail doesn't work by its own so I had 
>> to set it up with Postfix and Mailjet.
>>
>> It is my understanding that Postfix just allows to send the message and 
>> Mailjet is the authenticated handler. This would mean that the render of 
>> the mail occurs in Django.
>>
>
> I don't think any of that has anything to do with what you're asking.
>  
>
>>
>> Why is the message box a RichText editor? Can I change this? Or fix it so 
>> it shows the HTML in the mails?
>>
>
> What message box?
>  
>
>>
>> Thanks in advance,
>>
>> MR
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Mezzanine Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to mezzanine-use...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Stephen McDonald
> http://jupo.org
>

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


Re: [mezzanine-users] Email form shows html tags in mail sent

2016-03-20 Thread Melvin Ramos
My contact form, a Form page.

El domingo, 20 de marzo de 2016, 19:32:00 (UTC-4:30), Stephen McDonald 
escribió:
>
>
>
> On Fri, Mar 18, 2016 at 10:19 PM, Melvin Ramos  > wrote:
>
>> This is how my form looks like:
>>
>
> What form is this?
>  
>
>>
>>
>> <https://lh3.googleusercontent.com/-cy4lpsTHdDI/Vuvj--RC9cI/DOk/2ehsbf2U5fI70RYyV4Y39rnWYUUu3Ow_w/s1600/message-box.jpg>
>>
>>
>>
>> And this is how I'm receiving the message:
>>
>>
>> <https://lh3.googleusercontent.com/-1HyNhUPDJR8/VuvkJJSi3ZI/DOo/X6ROqQ6j5VYcCxOEFBtfGXjbv3yQGXv5Q/s1600/message-html-tags.jpg>
>>
>>
>>
>>
>>
>> El jueves, 17 de marzo de 2016, 23:08:24 (UTC-4:30), Stephen McDonald 
>> escribió:
>>>
>>>
>>>
>>> On Fri, Mar 18, 2016 at 2:34 PM, Melvin Ramos  
>>> wrote:
>>>
>>>> My mezzanine project runs in a VPS. Mail doesn't work by its own so I 
>>>> had to set it up with Postfix and Mailjet.
>>>>
>>>> It is my understanding that Postfix just allows to send the message and 
>>>> Mailjet is the authenticated handler. This would mean that the render of 
>>>> the mail occurs in Django.
>>>>
>>>
>>> I don't think any of that has anything to do with what you're asking.
>>>  
>>>
>>>>
>>>> Why is the message box a RichText editor? Can I change this? Or fix it 
>>>> so it shows the HTML in the mails?
>>>>
>>>
>>> What message box?
>>>  
>>>
>>>>
>>>> Thanks in advance,
>>>>
>>>> MR
>>>>
>>>> -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Mezzanine Users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to mezzanine-use...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>>
>>> -- 
>>> Stephen McDonald
>>> http://jupo.org
>>>
>>
>
>
> -- 
> Stephen McDonald
> http://jupo.org
>

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


[mezzanine-users] Best way to install mezzanine as an app?

2016-11-02 Thread Melvin Ramos
Hello Mezzanine community,

I hope you are all well.

I'm looking for the best way to have mezzanine as an app instead of being a 
virtualenv package.

I know there is a question in the FAQ section but it really doesn't help say 
much about it, or at least is not that clear to me.

If you can help me out with this, I would really appreciate it.

Regards,

Melvin

-- 
You received this message because you are subscribed to 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.