mybuddy/babybuddy/apps.py

19 lines
439 B
Python
Raw Normal View History

2017-12-26 13:53:38 +00:00
# -*- coding: utf-8 -*-
import os
from django.apps import AppConfig
from babybuddy import VERSION
class BabyBuddyConfig(AppConfig):
2022-02-10 00:00:30 +00:00
name = "babybuddy"
verbose_name = "Baby Buddy"
2017-12-26 13:53:38 +00:00
version = VERSION
version_string = VERSION
def ready(self):
2022-02-10 00:00:30 +00:00
if os.path.isfile(".git/refs/heads/master"):
commit = open(".git/refs/heads/master").read()
self.version_string += " ({})".format(commit[0:7])