Skip to content

Commit

Permalink
Update title length (#402)
Browse files Browse the repository at this point in the history
* minor graphical updates and add datefield for backdating posts

* blacken files and fix dep problem

* Bump version number

* date in form should be optional

* oh look more formatting changes that aren't relevant to what I'm working on AT ALL

* update title length

* Bump version number

Co-authored-by: itsthejoker <itsthejoker@users.noreply.github.com>
  • Loading branch information
itsthejoker and itsthejoker committed Apr 19, 2022
1 parent d438478 commit 3431b63
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion blossom/templates/website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h1 class="text-center">
{% endif %}
{% for p in posts %}
<p>
<h1><a href="{% get_absolute_uri p %}">{{ p.title }}</a></h1>
<h1><a href="{% get_absolute_uri p %}">{{ p.title|truncatechars:70 }}</a></h1>
<span class="text-muted">Published {{ p.date }}</span>
</p>
<div class="underline-links">
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "blossom"
version = "1.69.0"
version = "1.70.0"
description = "The site!"
authors = ["Grafeas Group Ltd. <devs@grafeas.org>"]

Expand Down
18 changes: 18 additions & 0 deletions website/migrations/0002_alter_post_title.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.2.13 on 2022-04-19 23:24

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("website", "0001_initial"),
]

operations = [
migrations.AlterField(
model_name="post",
name="title",
field=models.CharField(max_length=300),
),
]
2 changes: 1 addition & 1 deletion website/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


class Post(models.Model):
title = models.CharField(max_length=70)
title = models.CharField(max_length=300)
body = models.TextField()
author = models.ForeignKey(get_user_model(), on_delete=models.CASCADE)
date = models.DateTimeField(default=timezone.now)
Expand Down

0 comments on commit 3431b63

Please sign in to comment.