Skip to content

Added current datetime as output in Django devserver as per ticket 18611 #236

Closed
wants to merge 1 commit into from

3 participants

@mgrouchy

thoughts?

@claudep claudep and 1 other commented on an outdated diff Aug 25, 2012
django/core/management/commands/runserver.py
"Django version %(version)s, using settings %(settings)r\n"
"Development server is running at http://%(addr)s:%(port)s/\n"
"Quit the server with %(quit_command)s.\n"
) % {
+ "started_at": strftime('%B %d, %Y - %I:%M %p',
+ datetime.timetuple(datetime.now())),
@claudep
Django member
claudep added a note Aug 25, 2012

simpler: datetime.now().strftime(''%B %d, %Y - %X')

@mgrouchy
mgrouchy added a note Aug 25, 2012

Much simpler, thanks for the feedback. Updated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@mjtamlyn mjtamlyn and 1 other commented on an outdated diff Sep 3, 2012
django/core/management/commands/runserver.py
@@ -1,4 +1,6 @@
from optparse import make_option
+from datetime import datetime
+from time import strftime
@mjtamlyn
Django member
mjtamlyn added a note Sep 3, 2012

This is now an unused import - strftime is a method of the datetime instance

@mgrouchy
mgrouchy added a note Sep 5, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@mgrouchy

Updated as per feedback from @mjtamlyn.

@mjtamlyn
Django member

Looks good, I've marked the ticket as RFC.

@claudep
Django member
claudep commented Sep 10, 2012

Committed in cb1614f

@claudep claudep closed this Sep 10, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.