FusionIIIT/applications/hostel_management/views.py
def notice_board(request):
    """
    This function is used to create a form to show the notice on the Notice Board.
    @param:
      request - HttpRequest object containing metadata about the user request.

    @variables:
      hall - stores hall of residence related to the notice.
      head_line - stores headline of the notice. 
      content - stores content of the notice uploaded as file.
      description - stores description of the notice.
    """
    if request.method == "POST":
        form = HostelNoticeBoardForm(request.POST, request.FILES)

        if form.is_valid():
            hall = form.cleaned_data['hall']
            head_line = form.cleaned_data['head_line']
            content = form.cleaned_data['content']
            description = form.cleaned_data['description']
            
            new_notice = HostelNoticeBoard.objects.create(hall=hall, posted_by=request.user.extrainfo, head_line=head_line, content=content,
                                            description=description)

            new_notice.save()
            messages.success(request, 'Notice created successfully.')
        return HttpResponseRedirect(reverse("hostelmanagement:hostel_view"))

    This function is used to create a form to show the notice on the Notice Board.
    @param:
      request - HttpRequest object containing metadata about the user request.

    @variables:
      hall - stores hall of residence related to the notice.
      head_line - stores headline of the notice. 
      content - stores content of the notice uploaded as file.
      description - stores description of the notice.
    
This function is used to create a form to show the notice on the Notice Board.
@param:
request - HttpRequest object containing metadata about the user request.

@variables:
hall - stores hall of residence related to the notice.
head_line - stores headline of the notice.
content - stores content of the notice uploaded as file.
description - stores description of the notice.
This function is used to create a form to show the notice on the Notice Board . @param : request - HttpRequest object containing metadata about the user request . @variables : hall - stores hall of residence related to the notice . head_line - stores headline of the notice . content - stores content of the notice uploaded as file . description - stores description of the notice .
def notice_board(request):
    if request.method == "POST":
        form = HostelNoticeBoardForm(request.POST, request.FILES)
        if form.is_valid():
            hall = form.cleaned_data['hall']
            head_line = form.cleaned_data['head_line']
            content = form.cleaned_data['content']
            description = form.cleaned_data['description']
            new_notice = HostelNoticeBoard.objects.create(hall=hall, posted_by=request.user.extrainfo, head_line=head_line, content=content,
                                            description=description)
            new_notice.save()
            messages.success(request, 'Notice created successfully.')
        return HttpResponseRedirect(reverse("hostelmanagement:hostel_view"))
def notice_board ( request ) : if request . method == "POST" : form = HostelNoticeBoardForm ( request . POST , request . FILES ) if form . is_valid ( ) : hall = form . cleaned_data [ 'hall' ] head_line = form . cleaned_data [ 'head_line' ] content = form . cleaned_data [ 'content' ] description = form . cleaned_data [ 'description' ] new_notice = HostelNoticeBoard . objects . create ( hall = hall , posted_by = request . user . extrainfo , head_line = head_line , content = content , description = description ) new_notice . save ( ) messages . success ( request , 'Notice created successfully.' ) return HttpResponseRedirect ( reverse ( "hostelmanagement:hostel_view" ) )
This function is used to create a form to show the notice on the Notice Board.
This function is used to create a form to show the notice on the Notice Board .
"""
    This function is used to create a form to show the notice on the Notice Board.
    @param:
      request - HttpRequest object containing metadata about the user request.

    @variables:
      hall - stores hall of residence related to the notice.
      head_line - stores headline of the notice. 
      content - stores content of the notice uploaded as file.
      description - stores description of the notice.
    """
request