Thanks Alex,

1)
I supposed you refer to:
    http://code.google.com/p/django-multilingual-model/
Most of what Django does has to do with handling the table in Django
Admin, but it does not do anything special about the actual table
structure. Django needs special API like this because of the way it
handles joins. We tend to be more low level when dealing with
databases. In web2py you could do something like this:

db.define_table('book',
     Field('isbn'))

db.define_table('book_translation',
     Field('book',db.book),
     Field('language'),
     Field('title'),
     Field('description'))

>>> book = db.book.insert(isbn="1234567890")
>>> db.book.translation.insert(
         book=book,
         language='en'
         title = "web2py for Dummies",
         description = "web2py described in simple words.")
>>> db.book.translation.insert(
         book=book,
         language='pl'
         title = "web2py  opisane w prostych slowach")

2) We do not have it but it is trivial to implement. Create a model
file called (for example) events.py

import xmlrpclib, cPickle
queue=cache.ram('events',lambda:[],10**10)
@service.xmlrpc
def remote_enqueue(data):
      session.forget()
      session._unlock(response)
      queue.append(data)
def enqueue(app,*a):
      url = 'http://127.0.0.1:8000'+URL
(app,'default','call',args='xmlrpc')
      print url
      s=xmlrpclib.ServerProxy(url)
      s.remote_enqueue(cPickle.dumps(a))
def dequeue():
      return cPickle.loads(queue.pop()) if queue else None

and now anywhere in your code you can call

enqueue('target_app',....) # to queue something in the other app
info = dequeue() # to dequeue first received messages

Hope this helps.

On Oct 22, 2:11 am, Alex <[email protected]> wrote:
> Hello All,
>
> web2py looks very intersting framework, just bought a manual in pdf
> today.
>
> But in comparision with Django 2 nice things are missed:
>
> 1. Content Internationalization (automatic handling blog-posts in
> several languages)
>
> 2. Events framework - that allows cross-apps event notification and
> because of it better decomposition of features in the apps (included
> in django core)
>
> How to do it in web2py?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to