Updated news models to use custom user. No migration should be needed. Updated website templates.
This commit is contained in:
parent
55c0e40309
commit
66802f291d
4 changed files with 7 additions and 4 deletions
|
|
@ -486,7 +486,7 @@ INSTALLED_APPS = (
|
||||||
'src.comms',
|
'src.comms',
|
||||||
'src.help',
|
'src.help',
|
||||||
'src.scripts',
|
'src.scripts',
|
||||||
#'src.web.news',
|
'src.web.news',
|
||||||
'src.web.website',)
|
'src.web.website',)
|
||||||
# The user profile extends the User object with more functionality;
|
# The user profile extends the User object with more functionality;
|
||||||
# This should usually not be changed.
|
# This should usually not be changed.
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,9 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth import get_user_model
|
||||||
|
|
||||||
|
User = get_user_model()
|
||||||
|
|
||||||
class NewsTopic(models.Model):
|
class NewsTopic(models.Model):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@
|
||||||
<h1>Recently Connected</h1>
|
<h1>Recently Connected</h1>
|
||||||
<ul>
|
<ul>
|
||||||
{% for player in players_connected_recent %}
|
{% for player in players_connected_recent %}
|
||||||
<li>{{player.user.username}} -- <em>{{player.user.last_login|timesince}} ago</em></li>
|
<li>{{player.username}} -- <em>{{player.last_login|timesince}} ago</em></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
<p class="filler"><!-- Filler para to extend left vertical line --></p>
|
<p class="filler"><!-- Filler para to extend left vertical line --></p>
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,8 @@ Login
|
||||||
<p>Your username and password didn't match. Please try again.</p>
|
<p>Your username and password didn't match. Please try again.</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<form method="post" action="."{% csrf_token %} >
|
<form method="post" action=".">
|
||||||
|
{% csrf_token %}
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td><label for="id_username">Username:</label></td>
|
<td><label for="id_username">Username:</label></td>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue