My favorites | Sign in
Project Home
Search
for
CommandExtensionIdeas  

#Here are some ideas for some future command extensions.

Ideas for New Command Extensions

  • create form/manager for App
  • CSS and JS concatenation and minification scripts
Comment by rockmhow...@gmail.com, Jul 27, 2008

clean-pyc -- recursively delete pyc files

Comment by kyz...@gmail.com, Aug 1, 2008

This may be beyond the scope of this project, but it would be nice to have a command which could easily automate the task of repairing a database which was migrated from MySQL to PostgreSQL (a common task with Django). The common issue is that you can lose the PK sequencing (which is stored in sequences in PG, and not in MySQL). If the sequences are not correct, inserting new records causes a failure.

The process is something like...

For each table (if not specified):

1. Select PK field & sort DESC

2. Update the appropriate sequence to the latest PK

Not a complex process, but quite tedious when done by hand. Bearing the future in mind, this would also be useful when migrating to any DB that uses sequences (i.e. Oracle).

Comment by project member v.oostv...@gmail.com, Sep 6, 2008

@rockmhoward, added clean_pyc and compile_pyc to svn

@kyzylh, if you have some code for that ?

Comment by clai...@gmail.com, Sep 17, 2008

I don't know if it already exists (I wasn't able to find it) but it will be very cool to have django_bash_completion working with django-command-extensions.

Is that possible ?

Comment by project member vari...@gmail.com, Sep 18, 2008

A command to list and/or remove files under MEDIA_ROOT that are not referenced in the database. I am imagining something like "manage.py list_unreferenced_files" with either another command for remove or a flag to remove, or even just piping that into rm/xargs like find.

If I have time, I will put together some code for this. But I just wanted to get this idea out there if I don't have time.

BTW, I see this as something useful when I in development mode and I get a LOT of old files after dropping/recreating the database a lot. Not really a production task.

Comment by project member v.oostv...@gmail.com, Oct 15, 2008

@clairon, yeah that would be very cool !! if anybody would like to write the the /etc/bash_completion.d/django_extensions script ? :)

Comment by jeffru...@gmail.com, Dec 8, 2008

CreationUserField?, ModificationUserField?: Similar to CreationDateTimeField? and ModificationDateTimeField?, but would record the id of the logged in user. I need this capability for my project, so I'd be willing to write and contribute patches.

Comment by scotfhac...@gmail.com, Jan 26, 2009

Apps have fine-grained permissions, exposed in the admin as options like "Can add question" for a quiz app. In templates, you can use tags like

{% if perms.quiz.add_question %}

The Django docs are unclear on how to discover a list of all possible codenames. In other words it's unclear how to write a template tag like the one above because you assume it will be

{% if perms.quiz.can_add_question %}

There's no simple way to get a list of actual permission codenames. A good addition would be a "show_codenames" option that would do exactly that. Thanks.

Comment by jimmy...@gmail.com, Jul 7, 2010

extend autoload in shell_plus with a customizable script (so I can autoload helper functions/parameters)


Sign in to add a comment
Powered by Google Project Hosting