Re: Admin theme started reverting to default

2011-03-24 Thread gondor
. one > project user precompiled\precached files from another.. > I guess I mistakenly ran dev-servers with root account, so python > could put .pyc files into that folder... > I made a simple script to remove all pyc files from sources > > On 24 мар, 10:27, gondor <condor.c...

Admin theme started reverting to default

2011-03-24 Thread gondor
I don't know if anyone has has this problem. I have been using the test django server and it has always rendered my customized admin panel correctly. One day out of the blue the admin panel just started using the default. I don't think I made any changes. I understand this is kind of vague but

overriding the admin save in admin.py?

2010-08-22 Thread gondor
i'm trying to override the save function so I can add set some values that were hidden before saving. The problem is it doesn't seem to be using the save_model? Does anyone know how this is done models.py class Contact(models.Model): user = model.ForeignKey(User, editable=False) notes =

Re: searching stackedinline fields via search_fields in admin

2010-08-21 Thread gondor
Here is what i'm trying to do: I've looked at my code and I don't have a foreign key out reference from my model thus cannot find the inline fields. reverse reference doens't seem to work either class CarRadio(modesl.Model): name = models.ForeignKey('Car'); id =

how to prepopulate admin form with default data?

2010-08-21 Thread gondor
class Notes(models.Model): name = models.ForeignKey('name', blank=True, null=True) text = models.TextField('Text',blank=True) date = models.DateField(blank=True, default=datetime.date.today()); I have a simple admin model for inputting a note with a date into the database. date is

Prepopulate some fields in a admin add form

2010-08-21 Thread gondor
I have a simple admin model for inputting a note with a date into the database. In addition to that I want to prepopulate with the users name when the add new entry button is clicked. The users name is a foreign key to the user table. Does anyone know how to do that? Any help is appreciated.

searching stackedinline fields via search_fields in admin

2010-08-20 Thread gondor
Hello All, I'm wanting to add a field from my stackedinline form to my search_fields in admin. Does anyone know how to do that or point me in a general direction/sample code? Thanx Condor -- You received this message because you are subscribed to the Google Groups "Django users" group. To

list_search searching of stacked_inline forms using admin ?

2010-08-16 Thread gondor
I have several stacked_linline forms and was wondering if anyone knows how to have the filter_search include the stacked_inline attributes? Right now I can search the model and all foreign/many to many fields. I would like to include the stacked_inline fields as well. -- You received this

Does anyone know how to conditionally set the fieldsets??

2010-08-01 Thread gondor
I use fieldsets in my admin panel to group/title my related fields. This works great in superuser. When I log in as staff, which has some fields excluded I get an error. Caught KeyError while rendering: Key 'A' not found in Form In the simple example below if i'm a super user all works great.

admin panel fieldsets for different type of users?

2010-08-01 Thread gondor
I use formset in my admin panel to group/title my related fields. This works great except when I go to exclude some fields for lesser users. In the simple example below if i'm a super user all works great. If i log in as a staff user thus the code exclude A formset I get the following error:

setting intial value for choicefield in admin panel

2010-07-26 Thread gondor
I am using admin panel and using get_form to retrieve one of my table objects. I have a choicefield in this object but I don't know how to set the default. I have saw numerous examples of using the following: class MyAdmin(admin.ModelAdmin): list_display = ('rank', 'name') def

displaying template item based on url

2010-07-12 Thread gondor
to display. In the page I grab data from a database and display it. How do I access page variables so I can display them in the template? I'm trying to pass a particular variable via the url and need access to a particular table ID. thanx Gondor -- You received this message because you

how do I add a custom button (url) to the admin add/change page

2010-07-12 Thread gondor
I'm trying to add a simple button to a specific add/change page. This button takes the user to another url. I'm trying to have a https url form popup in a separate window. I have looked in the documentation and all over google but have not success. Does anyone know how to do this? -- You