Discussion:
custom django-admin commands naming convention
Marwan Al-Sabbagh
2011-03-08 08:02:46 UTC
Permalink
Hi,
I need to cron a few jobs for my django app to run daily. I went through
the docs on "Writing custom django-admin commands" and thats the direction
I'm planning to go to run these jobs. Our company has a number of teams
developing different apps and I didn't want the naming of the commands to be
a mess. Are there any recommendations for naming conventions of the
commands. Is it common for example to call the command appname_command to
make it clear which app is implementing which command. Any advice/experience
is welcome.

thanks,
Marwan
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com.
To unsubscribe from this group, send email to django-users+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
creecode
2011-03-08 21:14:52 UTC
Permalink
Hello Marwan,

I don't know if it's common but for my needs it's a must! :-) I have
several apps with custom management commands and I've taken to naming
the commands like...

my_app_name_my_custom_management_command_name.py

If find it easier to read the command name if I separate each word
with an underscore. The names are fairly long but I'm not typing them
into the terminal all that much. Mostly called from cron or pulled up
through my bash history.

Toodle-looooooooooo..........
creecode
Post by Marwan Al-Sabbagh
Our company has a number of teams
developing different apps and I didn't want the naming of the commands to be
a mess. Are there any recommendations for naming conventions of the
commands. Is it common for example to call the command appname_command to
make it clear which app is implementing which command. Any advice/experience
is welcome.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com.
To unsubscribe from this group, send email to django-users+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Marwan Al-Sabbagh
2011-03-09 07:07:48 UTC
Permalink
cool thanks,

Marwan
Post by creecode
Hello Marwan,
I don't know if it's common but for my needs it's a must! :-) I have
several apps with custom management commands and I've taken to naming
the commands like...
my_app_name_my_custom_management_command_name.py
If find it easier to read the command name if I separate each word
with an underscore. The names are fairly long but I'm not typing them
into the terminal all that much. Mostly called from cron or pulled up
through my bash history.
Toodle-looooooooooo..........
creecode
Post by Marwan Al-Sabbagh
Our company has a number of teams
developing different apps and I didn't want the naming of the commands to
be
Post by Marwan Al-Sabbagh
a mess. Are there any recommendations for naming conventions of the
commands. Is it common for example to call the command appname_command to
make it clear which app is implementing which command. Any
advice/experience
Post by Marwan Al-Sabbagh
is welcome.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com.
To unsubscribe from this group, send email to django-users+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Loading...