mirror of
https://github.com/evennia/evennia.git
synced 2026-04-03 22:47:16 +02:00
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.help',
|
||||
'src.scripts',
|
||||
#'src.web.news',
|
||||
'src.web.news',
|
||||
'src.web.website',)
|
||||
# The user profile extends the User object with more functionality;
|
||||
# This should usually not be changed.
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@
|
|||
#
|
||||
|
||||
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):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@
|
|||
<h1>Recently Connected</h1>
|
||||
<ul>
|
||||
{% 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 %}
|
||||
</ul>
|
||||
<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>
|
||||
{% endif %}
|
||||
|
||||
<form method="post" action="."{% csrf_token %} >
|
||||
<form method="post" action=".">
|
||||
{% csrf_token %}
|
||||
<table>
|
||||
<tr>
|
||||
<td><label for="id_username">Username:</label></td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue