mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2026-02-08 07:40:19 +00:00
preserving expoer order in logbook entries attempt 1
This commit is contained in:
@@ -136,8 +136,8 @@ def writelogbook(year, filename):
|
||||
# print(f'Logbook exported to {filepath}')
|
||||
|
||||
class PersonLogEntry(TroggleModel):
|
||||
"""Single Person going on a trip, which may or may not be written up.
|
||||
It could account for different T/U for people in same logbook entry.
|
||||
"""Single Person going on a trip.
|
||||
In future it could account for different T/U for people in same logbook entry.
|
||||
|
||||
CASCADE means that if the personexpedition or the logbookentry is deleted,
|
||||
then this PersonLogEntry is deleted too
|
||||
@@ -150,8 +150,11 @@ class PersonLogEntry(TroggleModel):
|
||||
nickname_used = models.CharField(max_length=100,default="") # e.g. "Animal" or "Zonker", as it appears in the original logbook
|
||||
|
||||
class Meta:
|
||||
ordering = ("-personexpedition",)
|
||||
# order_with_respect_to = 'personexpedition'
|
||||
ordering = ("nickname_used", "-personexpedition")
|
||||
# order_with_respect_to = 'personexpedition' and then with nickname
|
||||
# within the same logbook entry (which will always be the same expedition) this will
|
||||
# now not re-order the participants in a trip every time we save the logbook.
|
||||
# but this does not work.. need a function
|
||||
|
||||
def next_personlog(self):
|
||||
futurePTs = (
|
||||
|
||||
Reference in New Issue
Block a user