Comments (9)
L10n is brilliant, works great.
1 more thing, is there a way to add to admin links for languages? That editor would choose language and stays on that language entire time while editing.
from django-easymode.
Did you install the i18n middlewares? http://packages.python.org/django-easymode/middleware.html
I think these are obsolete though, because django ship with i18n-urls. I didn't really get to testing easymode proper with 1.4. I only managed to find time to fix very obvious bugs.
If you did use the middlewares and the issue stays, this will be fixed in the near future. As for language selection dropdowns, you need to build it yourself, easymode doesn't ship one yet.
from django-easymode.
If I add these - 1 or other or both I got this error:
'easymode.middleware.LocaleFromUrlMiddleWare',
'easymode.middleware.LocaliseUrlsMiddleware',
[Mon Apr 02 15:42:35 2012] [error] [client 127.0.0.1] self.load_middleware()
[Mon Apr 02 15:42:35 2012] [error] [client 127.0.0.1] File "/home/example/webapps/bb4/lib/python2.7/django/core/handlers/base.py", line 45, in load_middleware
[Mon Apr 02 15:42:35 2012] [error] [client 127.0.0.1] mod = import_module(mw_module)
[Mon Apr 02 15:42:35 2012] [error] [client 127.0.0.1] File "/home/example/webapps/bb4/lib/python2.7/django/utils/importlib.py", line 35, in import_module
[Mon Apr 02 15:42:35 2012] [error] [client 127.0.0.1] import(name)
[Mon Apr 02 15:42:35 2012] [error] [client 127.0.0.1] File "/home/example/lib/python2.7/easymode/middleware.py", line 46, in
[Mon Apr 02 15:42:35 2012] [error] [client 127.0.0.1] settings.ADMIN_MEDIA_PREFIX[1:]
[Mon Apr 02 15:42:35 2012] [error] [client 127.0.0.1] File "/home/example/webapps/bb4/lib/python2.7/django/utils/functional.py", line 185, in inner
[Mon Apr 02 15:42:35 2012] [error] [client 127.0.0.1] return func(self._wrapped, *args)
[Mon Apr 02 15:42:35 2012] [error] [client 127.0.0.1] AttributeError: 'Settings' object has no attribute 'ADMIN_MEDIA_PREFIX'
I know that in 1.4 'ADMIN_MEDIA_PREFIX' doesnt exist anymore, when I remove those middlewares all is fine.
from django-easymode.
The middlewares provide the functionality you want. Please add ADMIN_MEDIA_PREFIX = '/admin/media/' to your settings and test again.
On 2 apr. 2012, at 23:03, rentgeeen wrote:
If I add these - 1 or other or both I got this error:
'easymode.middleware.LocaleFromUrlMiddleWare',
'easymode.middleware.LocaliseUrlsMiddleware',[Mon Apr 02 15:42:35 2012] [error] [client 127.0.0.1] self.load_middleware()
[Mon Apr 02 15:42:35 2012] [error] [client 127.0.0.1] File "/home/example/webapps/bb4/lib/python2.7/django/core/handlers/base.py", line 45, in load_middleware
[Mon Apr 02 15:42:35 2012] [error] [client 127.0.0.1] mod = import_module(mw_module)
[Mon Apr 02 15:42:35 2012] [error] [client 127.0.0.1] File "/home/example/webapps/bb4/lib/python2.7/django/utils/importlib.py", line 35, in import_module
[Mon Apr 02 15:42:35 2012] [error] [client 127.0.0.1] import(name)
[Mon Apr 02 15:42:35 2012] [error] [client 127.0.0.1] File "/home/example/lib/python2.7/easymode/middleware.py", line 46, in
[Mon Apr 02 15:42:35 2012] [error] [client 127.0.0.1] settings.ADMIN_MEDIA_PREFIX[1:]
[Mon Apr 02 15:42:35 2012] [error] [client 127.0.0.1] File "/home/example/webapps/bb4/lib/python2.7/django/utils/functional.py", line 185, in inner
[Mon Apr 02 15:42:35 2012] [error] [client 127.0.0.1] return func(self._wrapped, *args)
[Mon Apr 02 15:42:35 2012] [error] [client 127.0.0.1] AttributeError: 'Settings' object has no attribute 'ADMIN_MEDIA_PREFIX'I know that in 1.4 'ADMIN_MEDIA_PREFIX' doesnt exist anymore, when I remove those middlewares all is fine.
Reply to this email directly or view it on GitHub:
#8 (comment)
PermanentMarkers
kvk 09170823
tel 026-3704887
mob 06-24352007
[email protected]
[email protected]
from django-easymode.
ok I did that and got error:
AttributeError at /
'WSGIRequest' object has no attribute 'set_cookie'
Request Method: GET
Request URL: http://dev.example.com/en/
Django Version: 1.4
Exception Type: AttributeError
Exception Value:
'WSGIRequest' object has no attribute 'set_cookie'
Exception Location: /home/example/lib/python2.7/easymode/middleware.py in process_request, line 131
Python Executable: /usr/local/bin/python
Python Version: 2.7.1
Python Path:
['/home/example/webapps/bb4',
'/home/example/webapps/bb4/myproject',
'/home/example/webapps/bb4/lib/python2.7',
'/home/example/lib/python2.7/django_rosetta-0.6.2-py2.7.egg',
'/home/example/lib/python2.7/django_localeurl-1.5-py2.7.egg',
'/home/example/lib/python2.7/South-0.7.3-py2.7.egg',
'/home/example/lib/python2.7/sorl_thumbnail-11.12-py2.7.egg',
'/home/example/lib/python2.7/django_transmeta-0.6.7-py2.7.egg',
'/home/example/lib/python2.7',
'/usr/local/lib/python27.zip',
'/usr/local/lib/python2.7',
'/usr/local/lib/python2.7/plat-linux2',
'/usr/local/lib/python2.7/lib-tk',
'/usr/local/lib/python2.7/lib-old',
'/usr/local/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/site-packages',
'/usr/local/lib/python2.7/site-packages/PIL']
Server time: Tue, 3 Apr 2012 14:38:23 -0500
from django-easymode.
Probably you did not include session middleware or the order of your middle wares is incorrect. Look at the example application to find the correct order.
from django-easymode.
Ok great now fully functional:
- use only 1 middleware: 'easymode.middleware.LocaliseUrlsMiddleware',
- ADMIN_MEDIA_PREFIX = '/admin/media/'
all works on dajngo 1.4 - brilliant
Great work love it :)
Can you explain me 1 thing why I need to put
ADMIN_MEDIA_PREFIX = '/admin/media/'
in django 1.4 is deprecated, what easymode needs to use it? Isnt it only for symbolic link for css (contrib admin)?
Even my symbolic link is pointing to somewhere else in django 1.4 because of new structure.
Anyway awsome work :)
from django-easymode.
Like I said, easy mode is not well tested with django 1.4. Some stuff needs to be removed, some issues might exist. Anyway, your comments are very helpful, because they show me where to look. If you find more stuff that seems weird or bugged, please make more tickets.
from django-easymode.
yes of course will test for sure so far its great :) thanks a lot
from django-easymode.
Related Issues (18)
- Check standard permissions for add/edit/remove features HOT 4
- Django 1.3, 1.4 admin readonly fields problem HOT 1
- wrong import HOT 1
- `I18n` decorator bug in pip package HOT 1
- ImportError: cannot import name execute_manager
- L10n decorator renders two checkbox columns in admin interface HOT 1
- Support django 1.3 static files subsystem HOT 2
- Django 1.8 support HOT 1
- This seems like the perfect module for model translation... but which version to use on Django 1.7.8? HOT 2
- can't import tzinfo HOT 2
- python3 urlparse error.
- from Django.utils import tzinfo HOT 4
- Incorrect LinkInline behaviour HOT 9
- Useful class for easymode to hide parent_link field HOT 1
- unique_error_message has moved to model in Django 1.3 HOT 5
- L10n decorator doesn't respect a ModelAdmin's pre existing 'exclude' field HOT 3
- I18n broken with django 1.4-beta-1 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-easymode.