Compare commits
12 Commits
Author | SHA1 | Date |
---|---|---|
![]() |
6194605ccb | 5 days ago |
![]() |
904a880886 | 5 days ago |
![]() |
8690e401f2 | 5 days ago |
![]() |
05b33baf9f | 5 days ago |
![]() |
e9781a3101 | 2 weeks ago |
![]() |
78f2a113dd | 2 weeks ago |
![]() |
3bf75238c6 | 2 weeks ago |
![]() |
5f898c2ef9 | 2 weeks ago |
![]() |
ebb7cf3567 | 2 weeks ago |
![]() |
2f657f5cd2 | 2 weeks ago |
![]() |
37634eef6a | 2 weeks ago |
![]() |
960e55bdae | 2 weeks ago |
Binary file not shown.
@ -1,10 +1,18 @@
|
||||
|
||||
|
||||
from flask import Flask
|
||||
from flask_sqlalchemy import SQLAlchemy # type: ignore
|
||||
from flask_bcrypt import Bcrypt # type: ignore
|
||||
from flask_login import LoginManager # type: ignore
|
||||
|
||||
|
||||
app = Flask(__name__)
|
||||
app.config['SECRET_KEY'] = 'db3746b2ffa650b3804e4316d227f853'
|
||||
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///blogsite.db'
|
||||
db = SQLAlchemy(app)
|
||||
bcrypt = Bcrypt(app)
|
||||
login_manager = LoginManager(app)
|
||||
login_manager.login_view = 'login'
|
||||
|
||||
|
||||
from blogapp import routes
|
||||
from blogapp import routes
|
||||
|
@ -0,0 +1,9 @@
|
||||
.invalid {
|
||||
color:red;
|
||||
}
|
||||
|
||||
.round-image{
|
||||
width: 100px;
|
||||
height:100px;
|
||||
border-radius: 50%;
|
||||
}
|
After Width: | Height: | Size: 445 B |
After Width: | Height: | Size: 4.3 KiB |
@ -1,10 +0,0 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block content %}
|
||||
{% for post in posts %}
|
||||
<p> {{ post.universe }} </p>
|
||||
<p> {{ post.powerlevel }} </p>
|
||||
<i> {{ post.date_posted }} </i>
|
||||
{% endfor %}
|
||||
|
||||
{% endblock content %}
|
@ -0,0 +1,60 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
|
||||
<img src="{{ image_file }}" class="round-image" alt="">
|
||||
<h2> Welcome {{ current_user.username }} </h2>
|
||||
|
||||
<div>
|
||||
<form method="POST" action="" enctype="multipart/form-data">
|
||||
{{ form.hidden_tag() }}
|
||||
<br>
|
||||
<fieldset>
|
||||
<legend>Account Info</legend>
|
||||
<div>
|
||||
{{ form.username.label() }}
|
||||
{% if form.username.errors %}
|
||||
{{ form.username()}}
|
||||
<div class="invalid">
|
||||
{% for error in form.username.errors %}
|
||||
<span>{{ error }}</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
{{ form.username() }}
|
||||
{% endif %}
|
||||
</div>
|
||||
<br>
|
||||
<div>
|
||||
{{ form.email.label() }}
|
||||
{% if form.email.errors %}
|
||||
{{ form.email() }}
|
||||
<div class="invalid">
|
||||
{% for error in form.email.errors %}
|
||||
<span>{{ error }}</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
{{ form.email() }}
|
||||
{% endif %}
|
||||
</div>
|
||||
<br>
|
||||
<div>
|
||||
{{ form.picture.label() }}
|
||||
{{ form.picture() }}
|
||||
{% if form.picture.errors %}
|
||||
{% for error in form.picture.errors %}
|
||||
<br><span class="invalid">{{ error }}</span><br>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
<div>
|
||||
{{ form.submit() }}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
@ -1,8 +1,6 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block content %}
|
||||
{% for post in posts %}
|
||||
<h1>{{ post.pagetitle }}</h1>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% endblock content %}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue