Skip to content
Sign UpLog In
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
4

Sign up???

techde
techde

Hi everyone, I have a question about how to create a python Django 2.0 sign up form??? So far I have this::

from django.contrib import admin from django.urls import path, include from django.views.generic.base import TemplateView from django.conf.urls import url from . import views as core_views urlpatterns = [ url(r'^signup/$', core_views.signup, name='signup'), ] urlpatterns = [ path('admin/', admin.site.urls), path('accounts/', include('django.contrib.auth.urls')), path('', TemplateView.as_view(template_name='index.html'), name='index'), path('post/', include('post.urls')), ]

Along with the HTML:

{% extends 'base.html' %} {% block content %} <h2>Sign up</h2> <form method="post"> {% csrf_token %} {% for field in form %} <p> {{ field.label_tag }}<br> {{ field }} {% if field.help_text %} <small style="color: grey">{{ field.help_text }}</small> {% endif %} {% for error in field.errors %} <p style="color: red">{{ error }}</p> {% endfor %} </p> {% endfor %} <button type="submit">Sign up</button> </form> {% endblock %}

Also:

  1. Further styling suggestions appreciated!
  2. constructive feedback on my project is accepted!

This project is:

A website where you can post to a database that displays on the UI using python integrated Django converted into HTML

Some forking ideas:

  1. Try to add more login credentials, such as: Google recaptcha, or Challenge PSWD's!
  2. Add a better showcase interface
  3. Improve on things like UI
  4. Anything you can imagine!

A quick vote:

loginbtn{ color:black }

Or

loginbtn{ color:grey }

Credits for some features in this project:

@Bookie0

@dublin
<- My code school(Hackingtons code school for kids)

@svanikthakur

User credentials!

User:Testuser
Pass:powerupthebeast
Pls note this is an entry lvl perms account, all actions done on this account are filtered and limited, cookies saved to this account, are terminated after 30 days.

2 years ago
You are viewing a single comment. View All
1
1
techde
techde

@KirikAltekar
Thx! but got any idea on how to fix the sign up it doesn't display on the screen?

2 years ago
1
littlepenguin
littlepenguin

Quick note: I do not know any Django

@techde
.

2 years ago
1
techde
techde

@KirikAltekar
Oh oof well thx for the feedback!

2 years ago
1
techde
techde

@KirikAltekar
Just for fun should I mark you answer as correct bc I dont think this is gonna get answered!?

2 years ago