Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django vs Pylons vs Web2py : registration, invitation, events [closed]

I am comparing these 3 very different frameworks on a few precise points. I already know Django has more users and that Pylons is more flexible. I am a bad programmer so I am looking for a framework which makes things easy for me.

First, I want users to be able to register with their e-mail adress : no stupid username ! Like on Facebook, they have to add their first and last names. I know this is not easy to do in the good old Django framework. I have tested the django-registration application. It does not allow this type of registration ! One has to create an AUTHENTICATION_BACKEND. That's too complicated for me... I wonder if there exists an easy solution in Pylons. I have seen it is easy to do in Web2Py.

Second, I want only invited people to be allowed to register. I want an e-mail invitation system. I know it exists in Django but the django-invitation application works on top of the django-registration application, and so it requires a username ! Is there an easy solution in Pylons or Web2Py ?

Third, in my kind of social network application, I want people to send messages to other people. So when they type somebody's name, it must appear as an existing name. A bit like the "tag system" on Stackoverflow. Is that easy to do in Django, Pylons or Web2py ?

like image 871
David Avatar asked May 22 '11 12:05

David


2 Answers

About web2py:

1) yes that is easy. You just do:

db.auth_user.insert(username='....', email=email)

and

mail.send(to=email,message='you are registered, please reset password')

2) yes you can

# store invitations
db.define_table('invitation',Field('token'))

# send invitations
for email in emails_to_invite:
    uuid=str(uuid.uuid4())
    db.invitation.insert(token = uuid)
    mail.send(to=email,message='click %s to register' % URL('register',args=uuid))

# allow them to register
def register():
    if not db(db.invitation.uuid==request.args(0)).count():
        redirect('error')
    delete = lambda form:db(db.invitation.uuid==request.args(0)).delete()
    return dict(form=auth.register(onaccept=delete))

3) not sure I understand. There is a tagging system in plugin_wiki and an async chat using html5 websockets and tornado in web2py/gluon/contrib/comet_messaging.py. Between the two I am sure you get what you need.

like image 107
Massimo Avatar answered Sep 22 '22 15:09

Massimo


Your final point about showing existing names is purely a question of designing views, forms, javascript,and templates, and as such is about the same difficulty in any framework.

like image 25
Spacedman Avatar answered Sep 25 '22 15:09

Spacedman