SHARE
TWEET

Untitled

a guest Oct 3rd, 2017 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class appointment(db.Document):
  2.     person_id = db.ReferenceField('user')
  3.     type_s = db.StringField()
  4.     club_access_type = db.StringField()
  5.     sub_subscription_type = db.StringField()
  6.     subscription1 = db.StringField()
  7.  
  8.  
  9. class User(UserMixin, db.Document):
  10.     created_at = db.DateTimeField(default=datetime.datetime.now, required=True)
  11.     email = db.StringField(max_length=255, required=True)
  12.     username = db.StringField(max_length=255, required=False)
  13.     password = db.StringField(required=True)
  14.     active = db.BooleanField(default=False)
  15.     roles = db.ListField(db.ReferenceField(Role),default=[])
  16.     confirmed_at = db.DateTimeField()
  17.     last_login_at = db.DateTimeField()
  18.     current_login_at = db.DateTimeField()
  19.     last_login_ip = db.StringField()
  20.     current_login_ip = db.StringField()
  21.     login_count = db.IntField()
  22.     appointments = db.ListField(db.ReferenceField(appointment))
  23.  
  24.     def __unicode__(self):
  25.         return '%s' % self.id
  26.  
  27.     def __repr__(self):
  28.         return "%s %s %s" % (self.username, self.id, self.email)
  29.  
  30.  
  31.     meta = {
  32.         'allow_inheritance': True,
  33.         'indexes': ['created_at', 'email', 'username'],
  34.         'ordering': ['-created_at']
  35.     }
  36.    
  37. {% extends 'layout.html' %}
  38. {% block content %}
  39.     <main>
  40.  
  41.         {% from "security/_macros.html" import render_field_with_errors, render_field %}
  42.         <h2>{{register_user_form.inner.type_s}}</h2>
  43.  
  44.         <form action="{{ url_for_security('register') }}" method="POST" name="register_user_form">
  45.  
  46.             {{ register_user_form.hidden_tag() }}
  47.             {{ render_field_with_errors(register_user_form.email) }}
  48.             {% for items in register_user_form.inner %}
  49.             {{ render_field_with_errors(.type_s, type="hidden", value=request.args.get('type_s')) }}
  50.             {% endfor %}
  51.             {{ render_field_with_errors(register_user_form.password) }}
  52.             {% if register_user_form.password_confirm %}
  53.                 {{ render_field_with_errors(register_user_form.password_confirm) }}
  54.             {% endif %}
  55.             {{ render_field(register_user_form.submit, class='btn btn-primary') }}
  56.  
  57.  
  58.         </form>
  59.  
  60.  
  61.     </main>
  62. {% endblock %}
  63.    
  64. {% for items in register_user_form.inner %}
  65.             {{ render_field_with_errors(.type_s, type="hidden", value=request.args.get('type_s')) }}
  66.             {% endfor %}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top