Cách tạo trang chỉnh sửa hồ sơ trong html

        
            
          

Cách tạo trang chỉnh sửa hồ sơ trong html
Marie Horwitz

Web Designer

Information


Email

[email protected]

Phone

123 456 789

Projects

Recent

Lorem ipsum

Most Viewed

Dolor sit amet

        
            
          .gradient-custom {
          /* fallback for old browsers */
          background: #f6d365;

          /* Chrome 10-25, Safari 5.1-6 */
          background: -webkit-linear-gradient(to right bottom, rgba(246, 211, 101, 1), rgba(253, 160, 133, 1));

          /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
          background: linear-gradient(to right bottom, rgba(246, 211, 101, 1), rgba(253, 160, 133, 1))
          }
          
        
    

Tôi muốn tạo trang hồ sơ chỉnh sửa tùy chỉnh của mình. Tôi sắp hoàn thành nhưng tôi không biết hiển thị chi tiết người dùng trong biểu mẫu đó
chỉnh sửa_hồ sơ. html

{% extends "index.html" %}
{% block content %}
{% load static %}

Edit Profile

Cách tạo trang chỉnh sửa hồ sơ trong html
{% csrf_token %}
{% if messages %} {% for message in messages %} {% endfor %} {% endif %}
{% endblock content %}

Ảnh chụp màn hình của trang hồ sơ chỉnh sửa

Cách tạo trang chỉnh sửa hồ sơ trong html

Ảnh chụp màn hình_2021-09-21_11_42_081366×768 67. 8KB


lượt xem. py
def EditProfile(request):

    if request.method == 'POST':

        usern = request.user.username        
        email = request.POST.get('id_email')
        auth = request.POST.get('D_Auth')
        chid = request.POST.get('D_ChID')
        utyp = request.POST.get('U_Type')
        loss = request.POST.get('N_Loss')

        if loss == 'on':
            flos = True
        else:
            flos = False

        if usern is None:
            messages.info(request, 'You must enter Username')
            return redirect('edit_profile')

        elif email is None:
            messages.info(request, 'You must enter Email')
            return redirect('edit_profile')

        elif User.objects.filter(username=usern).exists():
            messages.info(request, 'Username is already taken')
            return redirect('edit_profile')

        elif User.objects.filter(email=email).exists():
            messages.info(request, 'Email is already Taken')
            return redirect('edit_profile')

        elif auth is None:
            messages.info(request, 'Authentication Key Must be Entered')
            return redirect('edit_profile')

        elif chid is None:
            messages.info(request, 'Channel ID Must be Entered')
            return redirect('edit_profile')

        elif UserAuthentication.objects.filter(D_Auth=auth).exists():
            messages.info(request, 'Authentication key in Use')
            return redirect('edit_profile')

        else:
            user = User.objects.get(username=user)
            userauth_obj = UserAuthentication.objects.update(
                U_User = user,
                defaults = {
                    "D_Auth": auth,
                    "D_ChID": chid,
                    "U_Type": utyp,
                    "N_Loss": flos,
                }
            )
            user_obj = User.objects.update(
                defaults = {
                "username": username,
                "email": email
                }
            )

    return render(request, 'registration/edit_profile.html')

Bây giờ, điều của tôi là tôi muốn hiển thị chi tiết người dùng trong cột tương ứng theo cách có thể chỉnh sửa

Làm cách nào để đặt cấu hình trong HTML?

Ví dụ .
bóng hộp. 0 4px 8px 0 rgba(0, 0, 0, 0. 2); . 300px; . tự động; . trung tâm;
màu sắc. xám; . 18px;
ranh giới. không có; . 0; . chặn Nội tuyến; . 8px; . trắng; . #000;.
trang trí văn bản. không có; . 22px; . đen;
độ mờ đục. 0. 7;

Làm cách nào để tạo hồ sơ sinh viên trong HTML?

<. -- Hồ sơ sinh viên -->

Làm cách nào để tạo thẻ ID trong HTML?