Django

Code

Show
Ignore:
Timestamp:
07/06/08 01:39:44 (6 months ago)
Author:
mtredinnick
Message:

Fixed #5522 -- Moved make-messages, compile-messages and daily-cleanup into django-admin.py.

They are now called "makemessages", "compilemessages" and "cleanup". This is
backwards incompatible for make-messages.py and compile-messages.py, although
the old executables still exist for now and print an error pointing the caller
to the right command to call.

This reduces the number of binaries and man pages Django needs to install.

Patch from Janis Leidel.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/bin/daily_cleanup.py

    r5403 r7844  
    88""" 
    99 
    10 import datetime 
    11 from django.db import transaction 
    12 from django.contrib.sessions.models import Session 
    13  
    14 def clean_up(): 
    15     """Clean up expired sessions.""" 
    16     Session.objects.filter(expire_date__lt=datetime.datetime.now()).delete() 
    17     transaction.commit_unless_managed() 
     10from django.core import management 
    1811 
    1912if __name__ == "__main__": 
    20     clean_up(
     13    management.call_command('cleanup'