示例#1
0
def member_newsletter(request):
    context = RequestContext(request)
    try:
        member_newsletter = MemberNewsletter.objects.order_by('-created')[0]
    except:
        member_newsletter = None

    return render_to_response(
        "mailinglists/member_newsletter.html", {
            'newsletter': member_newsletter,
            'featured_articles': get_featured_articles(5),
            'events': get_latest_events(5),
            'opps': get_latest_opps(5),
            'threads': DiscussionThread.objects.filter(is_public=True)[:5],
            'download': DownloadOfTheMonth.objects.latest('premier_date')
        }, context)
示例#2
0
文件: views.py 项目: hgw/rhizome.org
def member_newsletter(request):
    context = RequestContext(request)
    try:
        member_newsletter = MemberNewsletter.objects.order_by('-created')[0]
    except:
        member_newsletter = None

    return render_to_response("mailinglists/member_newsletter.html", {
        'newsletter': member_newsletter,
        'featured_articles':get_featured_articles(5),
        'events':get_latest_events(5),
        'opps': get_latest_opps(5),
        'threads': DiscussionThread.objects.filter(is_public=True)[:5],
        'download': DownloadOfTheMonth.objects.latest('premier_date')
        },
        context
    )
示例#3
0
文件: views.py 项目: hgw/rhizome.org
        pass
    else:
        banner_ad = True 
    
    try:
        authors = newsletter.article().authors.all()
    except:
        authors = None
        
        
    return render_to_response('mailinglists/newsletter.html', {
        'article': newsletter.article(),
        'newsletter': newsletter,
        'featured_articles':get_featured_articles(5),
        'authors': authors,
        'events':get_latest_events(5),
        'opps': get_latest_opps(5),
        'threads': DiscussionThread.objects.filter(is_public=True)[:5],
        'banner_ad':banner_ad,
        'random_int': random.randrange(100, 1000),   
        },
        context
    )

def member_newsletter(request):
    context = RequestContext(request)
    try:
        member_newsletter = MemberNewsletter.objects.order_by('-created')[0]
    except:
        member_newsletter = None
示例#4
0
        pass
    else:
        banner_ad = True

    try:
        authors = newsletter.article().authors.all()
    except:
        authors = None

    return render_to_response(
        'mailinglists/newsletter.html', {
            'article': newsletter.article(),
            'newsletter': newsletter,
            'featured_articles': get_featured_articles(5),
            'authors': authors,
            'events': get_latest_events(5),
            'opps': get_latest_opps(5),
            'threads': DiscussionThread.objects.filter(is_public=True)[:5],
            'banner_ad': banner_ad,
            'random_int': random.randrange(100, 1000),
        }, context)


def member_newsletter(request):
    context = RequestContext(request)
    try:
        member_newsletter = MemberNewsletter.objects.order_by('-created')[0]
    except:
        member_newsletter = None

    return render_to_response(