Skip to content

Commit

Permalink
finally read markdown docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sontek committed Oct 20, 2010
1 parent 690c9a7 commit 207a887
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions README.markdown
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
settings.py
====================
`TEMPLATE_CONTEXT_PROCESSORS = (`
` 'tekextensions.context_processors.admin_media_prefix',`
`)`
`INSTALLED_APPS = (`
` 'tekextensions',`
)`
TEMPLATE_CONTEXT_PROCESSORS = (
'tekextensions.context_processors.admin_media_prefix',
)
INSTALLED_APPS = (
'tekextensions',
)

urls.py
====================
`url(r'^add/(?P<model_name>\w+)/?$', 'tekextensions.views.add_new_model'),`
url(r'^add/(?P<model_name>\w+)/?$', 'tekextensions.views.add_new_model'),

forms.py
====================
>override any ModelChoiceField widget with SelectWithPopUp
`from tekextensions.widgets import SelectWithPopUp`
`from django import forms`
`class CustomForm(forms.Form):`
` company = forms.ModelChoiceField(CustomModel.objects, widget=SelectWithPopUp)`
from tekextensions.widgets import SelectWithPopUp
from django import forms

class CustomForm(forms.Form):
company = forms.ModelChoiceField(CustomModel.objects, widget=SelectWithPopUp)

0 comments on commit 207a887

Please sign in to comment.