示例#1
0
文件: views.py 项目: brelig/urlchat
def popup(request):
    
    url = request.GET['url']
    
    # if domain is: boobox means they clicked in left nav. Show popup to promote adding the bookmarklet
    
    # Create link
    link = Link()
    link.url = url
    link.save()
    
    return render_to_response('popup.html', {'link' : link})
示例#2
0
文件: views.py 项目: brelig/urlchat
def create(request):
    
    url = request.GET['url']

    # Add 'http://' before if not there
#    if not url.startswith('http://'):
#        url = 'http://' + url
    
    # if domain is: boobox means they clicked in left nav. Show popup to promote adding the bookmarklet
    
    # Create link

    link = Link()
    link.url = url
    link.save()    
    link.firstsave()
    return redirect(link)