title: Invalid syntax error in view.py in django
body: <p>I can't figure out what i've done wrong here. In my views.py.</p>
  <pre><code>def register(request):
      if request.method == 'POST'
          form = UserCreationForm(request.POST)
          if form.is_valid():
              username = form.cleaned_data.get('username')
              messages.success(request, f'Account created for {username}!')
              return redirect('home')
      else:
          form = UserCreationForm()
      return render(request, 'users/register.html', {'form': form})
  </code></pre>