Create a simple Tailwind HTML page called register.html for a Django project.
Browse filesIt should include:
- A form for username, email, and password.
- A submit button labeled “Register”.
- A link at the bottom that says “Already have an account? Login” linking to `{% url 'login' %}`.
- Use a centered card layout with rounded edges and a light background.
Files changed (2)
- login.html+1-2
- register.htmlAdded+41
27 unmodified lines282930313233343527 unmodified lines</button><p class="text-center text-sm text-gray-600">Don't have an account? <a href="{% url 'register' %}" class="font-medium text-blue-600 hover:text-blue-500">Register</a>or <a href="{% url 'home' %}" class="font-medium text-blue-600 hover:text-blue-500">Return Home</a></p></form></div></div>27 unmodified lines2829303132333427 unmodified lines</button><p class="text-center text-sm text-gray-600">Don't have an account? <a href="{% url 'register' %}" class="font-medium text-blue-600 hover:text-blue-500">Register</a></p></form></div></div>
1234567891011121314151617181920212223242526272829303132333435363738394041<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Register</title> <script src="https://cdn.tailwindcss.com"></script></head><body class="bg-gray-50"> <div class="min-h-screen flex items-center justify-center"> <div class="bg-white p-8 rounded-lg shadow-md w-full max-w-md"> <h1 class="text-2xl font-bold text-gray-800 mb-6 text-center">Register</h1> <form method="post" class="space-y-6"> {% csrf_token %} <div> <label for="username" class="block text-sm font-medium text-gray-700">Username</label> <input type="text" id="username" name="username" required class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500"> </div> <div> <label for="email" class="block text-sm font-medium text-gray-700">Email</label> <input type="email" id="email" name="email" required class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500"> </div> <div> <label for="password" class="block text-sm font-medium text-gray-700">Password</label> <input type="password" id="password" name="password" required class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500"> </div> <button type="submit" class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"> Register </button> <p class="text-center text-sm text-gray-600"> Already have an account? <a href="{% url 'login' %}" class="font-medium text-blue-600 hover:text-blue-500">Login</a> </p> </form> </div> </div></body></html>login.html+1-2
register.htmlAdded+41