-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
crucialfelix
committed
Mar 6, 2010
1 parent
ddd72e0
commit bad6321
Showing
13 changed files
with
382 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
|
||
from ajax_select.fields import autoselect_fields_check_can_add | ||
from django.contrib import admin | ||
|
||
class AjaxSelectAdmin(admin.ModelAdmin): | ||
|
||
""" in order to get + popup functions subclass this or do the same hook inside of your get_form """ | ||
|
||
def get_form(self, request, obj=None, **kwargs): | ||
form = super(AjaxSelectAdmin,self).get_form(request,obj,**kwargs) | ||
|
||
autoselect_fields_check_can_add(form,self.model,request.user) | ||
return form | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.