Re: [mezzanine-users] Cannot edit content on Rich Text Page

2015-10-16 Thread Ilya Yakunin
Yes, I have another Mezzanine 3 project working under Apache virtual
host. Everything works well in that case.

The problem occurs only with new Mezzanine 4 project running under
its own virtualenv. Cache reloading didn't help

2015-10-15 18:19 GMT+03:00 Eduardo Rivas :
> Were you running a Mezzanine 3 site before? I have experienced a problem
> where the old tinymce files are cached by the browser. A cache reload (Ctrl
> + F5) does the trick.
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Mezzanine Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/mezzanine-users/qkFaUzZ8kvQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> mezzanine-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
Удачи,
Илья

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


[mezzanine-users] Cannot edit content on Rich Text Page

2015-10-15 Thread Ilya Yakunin



Hi all,

I've just started a new mezzanine project using:
* Mezzanine 4.0.1
* Django 1.8.5
* Python 2.7.10
* SQLite 3.8.10.2
* Linux 3.16.0-4-amd64

with default config. Simply ran mezzanine-project, created a database and 
ran developement server.

When I try to create a new Rich Text Page within admin interface I get no 
field for editing my content, it's just a gray div next to the "Content:" 
field. Server log gives several 404 errors linked with TinyMCE plugins:

[15/Oct/2015 14:57:08] "GET 
/static/mezzanine/tinymce/themes/advanced/theme.min.js HTTP/1.1" 404 1751
[15/Oct/2015 14:57:08] "GET 
/static/mezzanine/tinymce/plugins/advimage/plugin.min.js HTTP/1.1" 404 1757
[15/Oct/2015 14:57:08] "GET 
/static/mezzanine/tinymce/plugins/inlinepopups/plugin.min.js HTTP/1.1" 404 
1769
[15/Oct/2015 14:57:08] "GET 
/static/mezzanine/tinymce/plugins/advlink/plugin.min.js HTTP/1.1" 404 1754

My 'pip freeze' result: 
beautifulsoup4==4.4.0
bleach==1.4.1
chardet==2.3.0
Django==1.8.5
django-contrib-comments==1.6.1
django-modeltranslation==0.10.1
filebrowser-safe==0.4.0
future==0.15.0
grappelli-safe==0.4.0
html5lib==0.99
Mezzanine==4.0.1
oauthlib==1.0.1
Pillow==2.9.0
pytz==2015.4
requests==2.7.0
requests-oauthlib==0.5.0
six==1.9.0
tzlocal==1.2

I tried to collect static files using manage.py, but this doesn't return me 
lost plugins.

Please, help me to figure out whats going on, any help would be appreciated.

Cheers,
Ilya

-- 
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] Modeltranslation failed after upgrade to Mezzanine 4.0

2015-08-07 Thread Ilya Yakunin
Hi!

I'm running a simple multilingual site under Mezzanine CMS. Everything was 
fine when I was using Mezzanine==3.1.10 and Django==1.6.8. But after 
upgrade to Mezzanine==4.0.1 and Django==1.8.3 I get an error when trying to 
run ./manage.py with any command.
The error is 
./manage.py 
update_translation_fields   
Traceback (most recent call 
last):  


  File manage.py, line 29, in 
module



execute_from_command_line(sys.argv) 


  File 
/home/elias/FIBREOPTIC/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py,
 
line 338, in 
execute_from_command_line   



utility.execute()   


  File 
/home/elias/FIBREOPTIC/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py,
 
line 312, in execute 

django.setup()  


  File 
/home/elias/FIBREOPTIC/venv/local/lib/python2.7/site-packages/django/__init__.py,
 
line 18, in setup

apps.populate(settings.INSTALLED_APPS)  


  File 
/home/elias/FIBREOPTIC/venv/local/lib/python2.7/site-packages/django/apps/registry.py,
 
line 115, in populate   

app_config.ready()  


  File 
/home/elias/FIBREOPTIC/venv/local/lib/python2.7/site-packages/modeltranslation/apps.py,
 
line 11, in ready  

handle_translation_registrations()  


  File 
/home/elias/FIBREOPTIC/venv/local/lib/python2.7/site-packages/modeltranslation/models.py,
 
line 81, in handle_translation_registrations
autodiscover()
  File 
/home/elias/FIBREOPTIC/venv/local/lib/python2.7/site-packages/modeltranslation/models.py,
 
line 32, in autodiscover
import_module(module)
  File /usr/lib/python2.7/importlib/__init__.py, line 37, in import_module
__import__(name)
  File /home/elias/FIBREOPTIC/fibre_theme/translation.py, line 50, in 
module
translator.register(Page, PageTranslationOptions)
  File 
/home/elias/FIBREOPTIC/venv/local/lib/python2.7/site-packages/modeltranslation/translator.py,
 
line 399, in register
model.__name__)
modeltranslation.translator.AlreadyRegistered: Model Page is already 
registered for translation

i use standard Mezzanine models. My translation.py file is 

from modeltranslation.translator import translator, TranslationOptions
from mezzanine.pages.models import Page, RichTextPage, Link
from mezzanine.forms.models import Form, Field

class FormFieldTO(TranslationOptions):
fields = (
'label',
'default',
'placeholder_text',
'choices',
'placeholder_text',
'help_text',
)

class FormTO(TranslationOptions):
fields = (
'response',
'content',
'button_text',
)

class PageTranslationOptions(TranslationOptions):
fields = (
'title',
# 'description',
)
required_languages = (
'ru',
)

class RichPageTranslationOptions(TranslationOptions):
fields = (
'content',
)
required_languages = (
'ru',
)

class LinkTranslationOptions(TranslationOptions):
pass

translator.register(Page, PageTranslationOptions)
translator.register(RichTextPage, RichPageTranslationOptions)
translator.register(Form, FormTO)
translator.register(Link, LinkTranslationOptions)
translator.register(Field, FormFieldTO)

Using a trick from 
http://mezzanine.jupo.org/docs/multi-lingual-sites.html#translation-fields-and-migrations
 
won't help. After switching to USE_MODELTRANSLATION = False and running 

python manage.py makemigrations

I get an error:

modeltranslation.translator.NotRegistered: The model Page is not 
registered for translation

Lines from settings.py related to mulilingual support are:

LANGUAGES = (
('ru', gettext('Russian')),
('en', gettext('English')),
)

USE_MODELTRANSLATION = True
MODELTRANSLATION_DEFAULT_LANGUAGE = 'ru'

...
INSTALLED_APPS = (
#south,
modeltranslation,
django.contrib.admin,
django.contrib.auth,
django.contrib.contenttypes,
django.contrib.redirects,
django.contrib.sessions,
django.contrib.sites,
django.contrib.sitemaps,
django.contrib.staticfiles,
mezzanine.boot,