creating automatically url for additional column in admin view

2009-08-04 Thread Sławek Tuleja
Hi All! In admin.py I created special column named 'downloading list' class TenderAdmin(...): # in this column I show url to all downloads for tender list_display = ( , 'downloading_list',) def downloading_list(self, obj): return obj.get_downloading_list_url()

Re: creating automatically url for additional column in admin view

2009-08-04 Thread Sławek Tuleja
nice! thank you krylatij! On 4 Sie, 14:56, krylatij wrote: > Look > athttp://docs.djangoproject.com/en/dev/ref/contrib/admin/#reversing-adm... > > It will be like this: > > from django.core import urlresolvers > > my_url = "%s?tender__id__exact=%s" % ( >     urlresolvers.reverse('admin:tender_d

HttpResponseRedirect with POST

2009-08-06 Thread Sławek Tuleja
HI everyone! Can I redirect to view with form passing few variables in POST method (request.POST) and showing them in the form? (i need this in admin action) for example this works: def add_mailing(self, request, queryset): return HttpResponseRedirect('%s?subject=halo' % \

Re: HttpResponseRedirect with POST

2009-08-06 Thread Sławek Tuleja
Thank you! On 6 Sie, 14:21, Daniel Roseman wrote: > On Aug 6, 1:09 pm, Sławek Tuleja wrote: > > > > > HI everyone! > > > Can I redirect to view with form passing few variables in POST method > > (request.POST) and showing them in the form? (i need this in ad

site-wide admin action

2009-09-21 Thread Sławek Tuleja
Hello Can you guide me where is the best place to put site-wide admin actions? Is this right place [for example]: global_actions folder (with 2 files: init.py and admin.py) ? where admin.py: from django.contrib import admin def export_as_pdf(modeladmin, request, queryset): ret

updating selectbox, validation errors page

2009-09-21 Thread Sławek Tuleja
Hello In admin panel I created simply jquery ajax function to update second selectbox if first was changed. selectbox1 = category1, category2, category3 category1 has: sub1, sub2, sub3 category2 does not have any subcategories category3 has: sub4, sub5 So when I select category1 I get sub1, sub

[django-registration] urls in templates

2009-10-25 Thread Sławek Tuleja
Hi I am using django-registration. In my base.html file I have: login register How to avoid hardcoded urls? {% url ?:? %} greetings --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to th

post_syncdb signal

2010-03-26 Thread Sławek Tuleja
Hi all! In my application i have mutable and immutable components. After sync_db command i use post_syncdb singal to create table with info about this components. How to pass new attr about component to register_component function established with post_syncdb signal? code: # Page models are imm

tag generates another tags

2010-03-28 Thread Sławek Tuleja
Hi all! my question is: can 'tag' generate another tag/s? if yes, what is the best practice? In template e.g. `base.html` i want to have tag: {% area 1 %}, this tag communicates with database table called `components` and searching for a components (apps) which are established with area 1, let's