Compare commits

..

No commits in common. "90dca0274a3def20b0b414519250ef6c6d5dbefb" and "77d728a1531dc70a5161ec8542475d14ae2961f9" have entirely different histories.

2 changed files with 3 additions and 12 deletions

View File

@ -20,15 +20,15 @@
</head>
<body>
<h1>tilde.town guestbook</h1>
<p><em>don't try to post urls. it won't work.</em></p>
<marquee>~*~*~*~*say hello*~*~*~*~</marquee>
<form class="tilde" action="{% url 'guestbook:guestbook' %}" method="post">
<!-- <form class="tilde" action="{% url 'guestbook:guestbook' %}" method="post">
{% csrf_token %}
<table>
{{form.as_table}}
</table>
<input type="submit" value="sign" >
</form>
-->
{% for m in messages %}
<p>

View File

@ -78,13 +78,6 @@ class Townie(User):
def home(self):
return os.path.join('/home', self.username)
def generate_gift(self):
command = '/town/bin/generate_welcome_present.sh'
error = _guarded_run(['sudo', command, self.username])
if error:
logger.error(error)
return
def send_welcome_email(self):
welcome_tmpl = get_template('users/welcome_email.txt')
context = {
@ -257,11 +250,9 @@ def on_townie_pre_save(sender, instance, **kwargs):
instance.create_on_disk()
instance.write_authorized_keys()
except Exception as e:
logger.error('Failed syncing user {} to disk: {}'.format(instance.username, e))
logger.error('Failed syncing user {} to disk: {}'.format(instance.username, e)
else:
instance.send_welcome_email()
instance.generate_gift()
return
else:
# This user state transition is currently undefined. In the future, we can check for things