redirect in view not finding url path or html template

I am trying to redirect from one view to another view or url name but getting errors regardless of what type of redirect I use. My preference is to use the view name to avoid hard coding the url.

Relevant views snippets involved:

main view snippet

        if form.is_valid():
            """ check if passwords match """
            print('form is valid')
            password1 = form.cleaned_data.get('password1')
            password2 = form.cleaned_data.get('password2')
            if password1 and password2 and password1 != password2:
                raise messages.add_message(request, messages.error, "Passwords don't match")
                return redirect('/members:new_profile')

            """ create user, set hashed password, redirect to login page """
            print('creating user')
            user = form.save(commit=False)
            user.set_password(password1)
            user.save()
            return redirect('members:user_login')

user_login view

def UserLogin(request):
    """ Member authenticate, set session variables and login """
    if request.method == 'POST':
        username = request.POST.get('email')
        password = request.POST.get('password')
        user = authenticate(username=username, password=password)
        if user is not None:
            if user.is_active:
                """ set session expiry and variables with login"""
                login(request, user)
                request.session.set_expiry(86400)
                watchlist_items = Watchlist.objects.filter(created_by_id=user.id, status=True).values_list('listing_id', flat=True)
                print(f"watchlist_items: {watchlist_items}")
                if watchlist_items:
                    request.session['watchlist'] = list(watchlist_items)
                    print(f"watchlist session variable: {request.session['watchlist']}")
                    messages.add_message(request, messages.success, 'You have successfully logged in')
                else:
                    request.session['watchlist'] = []
                    messages.add_message(request, messages.success, 'You have successfully logged in')
                return redirect('general/dashboard.html')
            else:
                """ user has old account, prompt to reactivate and pay new subscription """
                messages.add_message(request, messages.error, 'This account is no longer active, please reactivate '
                                                           'account (subscription required)')
                return redirect('members/member_login.html')
        else:
            messages.add_message(request, messages.error, 'Username or password is incorrect')
            return redirect('members/member_login.html')
    else:
        return redirect('members/member_login.html')

members/urls.py

from django.urls import path
from members import views

app_name = 'members'

urlpatterns = [
    path('new_profile/', views.NewUserCreate, name='new_profile'),
    path('user_login/', views.UserLogin, name='user_login'),
    path('user_logout/', views.UserLogout, name='user_logout'),
]

project level urls.py

urlpatterns = [
    path('accounts/', include('django.contrib.auth.urls')),
    path('', include('general.urls')),
    path('members/', include('members.urls')),
    path("__debug__/", include("debug_toolbar.urls")),
]

In the main view code I have tried the following with different issues:

return HttpResponseRedirect(reverse(‘members:user_login’))

  • error page not found – this tries to find template at url http://127.0.0.1:8000/members/user_login/members/member_login.html

return redirect(‘user_login’) – error NoReverseMatch at /members/new_profile/

return redirect(‘members:user_login’) – Page not found error, lists url as http://127.0.0.1:8000/members/user_login/members/member_login.html

return redirect(‘/members:user_login’) – page not found error, tries url http://127.0.0.1:8000/members:user_login

I know this should be a simple thing to do and I have redirects working for other views, cant figure out the best solution here, any help would be appreciated.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật