Re: Read write config from a file. How?
Yes. Thanks for your replies. I have one more question. I want to put all my configures into one file and pass the file name by command line. My django is deployed as in uwsgi, so I pass the command line by -- pyargv '-c /etc/myconfig.ini'. In django, how can I retrieve this command line file name? If I set it by os.enviroment, how to retrieve it? Thanks. On Apr 2, 7:00 pm, Addy Yeow <ayeo...@gmail.com> wrote: > Take a look athttp://docs.python.org/library/configparser.html > > > > > > > > > > On Sun, Apr 3, 2011 at 4:45 AM, Swordfish <djvi...@yandex.ru> wrote: > > Hi! is your file in 'ini' format or simply in 'py'? > > > Regards, > > Eugeny > > > 02.04.11, 10:34, "hollando" <hrqi...@gmail.com>: > > >> Hi, some of my config store in a file not in settings.py. Are there > >> any build in library doing that? Thanks > > > -- > > 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 > > athttp://groups.google.com/group/django-users?hl=en. > > --http://www.dazzlepod.com.http://twitter.com/dazzlepod > We write elegant and minimal apps that works. We develop web apps with > Django framework. -- 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.
Read write config from a file. How?
Hi, some of my config store in a file not in settings.py. Are there any build in library doing that? Thanks -- 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.
How to group rows with same foreign key in change list table
I'm trying to group rows with same foreign key in admin site change list table maybe with same color or something like a sub table which ever is easier for implementation. Also I'm trying to do a button like "more info" and while hit the button, the table will be expand and show the foreign key item. Any idea how to implement this? -- 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.
Database setting from a configuration file.
Hi, I tried to put database setting in a ConfigParser format file and parse that file from command line. I modified manage.py a little bit after loading setting, reinitial DATABASES['default'] with my configure parameter. However, when it comes to execute_manager, it gets data from settings.py again. Is there anyway I can have it load from configuration file? Thanks. -- 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.
Form fields intial from http GET/POST.
I want to make things simple and following django style. So here's my question In the view, I have one form for search input and one pagination table list results. The form has quite some fields mostly CharField. When submit http POST/GET, I want to update table list, but don't want to clean up my CharFields. What's the best way to do that? Thanks. -- 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: Custom ModelAdmin form for distinct logged users
You can use proxy models. Refer to http://stackoverflow.com/questions/2223375/multiplue-modeladmins-views-for-same-model-in-django-admin On 1月27日, 下午4时22分, Mario8kwrote: > Hello, > > How can I customize a form by the user who is logged in? > For example, if the user is_superuser(), i need to display the > standard admin form, but if the user is another one, show only some > fields and not all model fields. For this, I coud use > ModelAdmin.fields (or exclude, or readonly_fields), but i don't know > how to make it conditional to the user. > > Regards, Mario. -- 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.
Advanced search view in admin site.
I known that in admin.py I can put in search_fields with parameters I want for search. This works fine. But I want another View just like advanced search in google. There are boxes for me to specific each field. Like I can choose a date etc. And I can give a range for my numeral fields. Or even do ip address wild casting. Please give me some hint on how to do this. Thanks. -- 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.
How to add a top menu to admin site.
I'm building my application with the admin site. As a start point, it make things so easy. However, I want to add a top menu that links to my apps and some of the dynamic pages. My top menu is kinda simple. Unlike treemenu, it's just flat menu with a few items. One solution I can think of is by modifying base_site.html, add my menu onto it. But I want to high light the app that is currently been choose. What is the best way to do this? Thanks -- 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.
Staticstic app, ask for idea.
I want to make a statistic app. There is a float field in my model(table).I want to use a chart to show what's the percentage in each range. Any suggestion to make such and app that can fit into django model. Thanks. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.