Django registration alternatives - python

I'm looking at django-registration. It's in alpha 0.8, and hasn't been updated for 12/13 months. But it seems this is what most people use? I'm just wondering if there is a production standard package out there for managing users on a django site, or do people tend to roll their own?

It hasn't been updated because it works very well ;)
Frankly, you really should use this package, along with django-profiles, django-invitation...
The only problem (for me) is the lack of example templates in django-registration
But you can look at this repository to get some

Try django-registration-redux, a maintained fork of django-registration:
https://github.com/macropin/django-registration
https://django-registration-redux.readthedocs.org/en/latest/

I am working on a GAE app that is going to use its own registration module. It works using AJAX, can create new users in database, send codes for verifying new users and recovering existing users by email. I am almost done with this module and I am sure it won't take much time to configured for using with Django models for works with database. The important thing you could take from there is the concept of the registration/verification/restoring processes. Please feel free to clone the module from here and participate in developing it. You can also ping me if you have any questions, I will help with pleasure! Thanks.

Related

Using custom python classes alongside Django app

In a school project, my team and I have to create a shopping website with a very specific server-side architecture. We agreed to use python and turned ourselves towards Django since it seemed to offer more functionalities than other possible frameworks. Be aware that none of us ever used Django in the past. We aren't masters at deploying application on the web either (we are all learning).
Here's my problem: two weeks in the project, our teacher told us that we were not allowed to use any ORM. To me, this meant bye bye to Django models and that we have to create everything on our own.
Here are my questions: as we already have created all our python classes, is there any way for us to use them alongside our Django app? I have not seen any example online of people using their own python classes within a Django app. If it were possible, where should we instantiate all our objects? Would it be easier to just go with another framework (I am thinking about Flask). Am I just missing important information about how Django works and asking a dumb question?
We have 4 weeks completed and 6 more to go before finishing our project. I often see online "use Flask before using Django" since it is simpler to use. We decided on Django because in the project description, Django was recommended but not Flask.
Thanks for the help.
Without being an absolute Django expert, here is my opinion.
The Django ORM is far from being the only feature this Framework has to offer (URLs routing, test client, user sessions variables, etc.), but surely it is one the main component you want to use while working with Django since it is often directly linked to other core features of Django.
If using the ORM is completely forbidden, a lot of features out of the box won't be available for you. One of the main features I can think about is the admin interface. You won't be able to use it if the ORM is not an option for you.
So, in my opinion, you should go for another Framework like Flask. Mainly because without using the ORM, some of the Django value is gone.
Hope it helps!

Simplest Python user registration system?

I am building in Python on django framework. Having done some tutorials, I now want to build a very simple lightweight application.
The first part of my application is that I need a user system. i.e. a way for people to sign up and a way for me to keep their information private.
What is the easiest way for me to set this up?
Any pre-existing code you could point me to? Or any tutorials that you particularly think are good?
django-registration should get you started.

Tell a friend in django

I am looking for a generic Tell a Friend application in django which will allow my website users to invite and tell about website features to one's mail or social networking friends by sending invitation email to join the website....
Any suggestion will help...
Thanks in advance...
This isn't Django, but you might consider a remotely-hosted application like ShareThis.
Otherwise, you could make use of this code, and add parameters (such as name and email address) into the URL where possible / necessary. In any case, I'm not aware of a Django-specific solution that integrates with the CMS out of the box - you might have to do it yourself, at least partly.
There's a reusable app at github called django-tellafriend.
Haven't used it myself. In the essence however it shouldn't be to hard to roll your own app for this if you have special requirements. Basically you need a form and send out an email if it's valid. If you want to keep track of the you can store the information using a simple model.
Connecting to social networks might be a little trickier, but there are also a few django apps for this like django-facebook and django-social-auth.

Python frameworks for developing facebook apps

I'd like to ask you about your experiences in developing facebook applications in Python. Which of the popular web frameworks for this language you think best suits this purpose? I know "best" is a very subjective word, so I'm specifically interested in the following:
Most reusable libraries. For example one might want to automatically create accounts for new logged in facebook users, but at the same time provide an alternative username + password logging functionality. I need authentication to fit into this nicely.
Facebook applications tend to differ from CMS-like sites. They are action intensive. For more complicated use-cases, usually some kind of caching for the data fetched from Open Graph API is required in order to be able to perform some queries on local and facebook data at once (for example join some tables based on friendship relation).
I'd definitely prefer popular solutions. They just seem to be much more stable and better thought through. I've previously developed a facebook application in Grails and I as much as I liked the architecture and the general ideas, the amount of bugs and complication that I ran into was just a little bit too much. Also Groovy is still quite an exotic language to develop in, and this time I'm not going to work on my own.
I'm not new to Python, but definitely new to web development in Python. Though after the experience with Grails and all its twists and turns I doubt Python could really scare me.
I would almost undoubtedly go with Django as the easiest and most popular framework for developing any type of web applications, if there's a need for a full-stack framework.
Specifically, in regards to Django's app universe, it is plentiful with many active applications -- but that has its downfalls too. There's no standard application for any 'one' thing, but there are a few applications that will do basically 90% of all that's needed. Sometimes the code is poorly written, but most of the time, the apps work and do what they are needed to do, so there's almost no need for someone to dive right in to the code.
Narrowing down our options, I have had great luck with Omab's Django-Social-Auth, which was absolutely a snap to integrate. It required 3 variables in my settings.py and I was up and running.
The only issue might be if you do not want to use the django.contrib.auth.User model, but, if you are not thinking about using that, I would think about that decision twice :)
To narrow it down even further, pyfacebook is another option for integrating Facebook. It comes with a djangofb application so it's just drop, add to settings.py and all is well. It even comes with an example Django application as part of the distribution. I've had pretty good luck with this application, but, I still think Omab's much easier to integrate.
Finally, Facebook's own python-sdk is easy to integrate from a raw standpoint, where they just give you access to their APIs using a simple Python API. However, it seems to cater more to the AppEngine folks, so YMMV.
I've used Django for quite some time. As of late I use Jinja2 instead. No particular reason, but it's another option
If you do not want to start on Django now. Try learning Flask(which is comparatively a lot easier to begin than Django) and then start building app with Flask.

Chat application using django

If i devlop a chat application using django will it have some performance problem?
Can i do server push in django?
I want to have PM and room discussions as well.
I released a Django app on Pypi and Github that provides a multi-user web chat.
It's based on Gevent: works well in multithreaded environments, but not in pre-forked ones such as gunicorn running more than 1 worker.
I'm just writing the documentation. The repo is: https://github.com/qubird/django-chatrooms
How about using tornado? I tried demo chat application of Tornado.
And also Tornado claims to have a better performance than django.
Let me know your thoughts.
grono.net has chat and PMs (although there are no rooms) and is built on django. Performance is pretty well, so I believe you should be able achieve the same performance. It depends, on how much connections you are expecting. grono.net is pretty big and it uses some caching and server distribution to perform well. But it all is doable on Django.
I think for a chat application you can use other technologies, such as AMQP(RabbitMQ, etc), Comet, etc.
But, for develop user profile, PMs, and other you can use Django.
Do not forget that performance still depends on server configuration (web server software, cache, db)
Basically Django is not the best way to do it.
However, if you are really stick to it and don't want to use to much solutions or/and want to keep it simple you can try with it:
http://popcnt.org/2008/01/django-evserver-asynchronous-server-for.html
Whih is asynchronous django server.
Also Twisted is worth checking out. I think that you described their tutorial scenario.

Categories

Resources