(request: WSGIRequest)
return HttpResponse()
Add the given hashtag to the database.
Add the given hashtag to the database.
Add the given hashtag to the database .
def submit_hashtag(request: WSGIRequest) -> HttpResponse:
    """Add the given hashtag to the database."""
    hashtag = request.POST.get("hashtag")
    if hashtag is None or len(hashtag) == 0:
        return HttpResponseBadRequest()

    if hashtag[0] != "#":
        hashtag = "#" + hashtag
    models.Tag.objects.create(text=hashtag, active=storage.get("hashtags_active"))

    return HttpResponse()
def submit_hashtag ( request : WSGIRequest ) -> HttpResponse : hashtag = request . POST . get ( "hashtag" ) if hashtag is None or len ( hashtag ) == 0 : return HttpResponseBadRequest ( ) if hashtag [ 0 ] != "#" : hashtag = "#" + hashtag models . Tag . objects . create ( text = hashtag , active = storage . get ( "hashtags_active" ) ) return HttpResponse ( )