Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)

src/b/o/boar-HEAD/boar/accounts/views.py   boar(Download)
from boar.accounts.forms import UserForm
from boar.common.response import JsonResponse
from boar.facebook_connect.decorators import login_required
from boar.mailing_lists.forms import MailingListsForm
from boar.uploads.models import Image
def accounts(request, settings_form=None, mailing_lists_form=None):
    if settings_form is None:
        settings_form = UserForm(instance=request.user, label_suffix='', prefix='user_')
    if mailing_lists_form is None:
        mailing_lists_form = MailingListsForm(initial={
def settings_form(request):
    if request.method == 'POST':
        user_form = UserForm(request.POST, instance=request.user, label_suffix='', prefix='user_')
        ml_form = MailingListsForm(request.POST, prefix='ml_')
        if user_form.is_valid() and ml_form.is_valid():