Re: how do you display custom permissions on admin site?

2009-08-17 Thread fabrix

On Aug 16, 2:29 pm, sam lee  wrote:
> I run syncdb and runserver
[...]
> But I don't see the myapp | test_perm listed under Permissions field.

permissions are stored in db, syncdb doesn't alter existing tables, so
your permission will not  show up in your admin.

As the Fu..Funny Maunal say:

http://docs.djangoproject.com/en/dev/ref/django-admin/#syncdb

"Syncdb will not alter existing tables

syncdb will only create tables for models which have not yet been
installed. It will never issue ALTER TABLE statements to match changes
made to a model class after installation. Changes to model classes and
database schemas often involve some form of ambiguity and, in those
cases, Django would have to guess at the correct changes to make.
There is a risk that critical data would be lost in the process.

If you have made changes to a model and wish to alter the database
tables to match, use the sql command to display the new SQL structure
and compare that to your existing table schema to work out the
changes.
"

or.. you can try discarding the permission table and redo a syncdb,
but i can't assicure you that preexisting permissions assigned to
users will be conserved...

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: How redirect lightweight webserver messages?

2009-07-19 Thread fabrix

On Jul 17, 3:29 pm, Andrea Della Pietra 
wrote:
> Django source. Server log message are send to stderr (stdout is set as a
> file handler) but tee logs only stdout.

Bash programming: stderr and stdout 2 file

http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-3.html#ss3.6

$ python manage.py runserver &> example.log

stderr 2 stdout

$ python manage.py runserver 2>&1 | tee log.txt

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---