Serializer's to_representation does not check a proper manager base class

2021-08-20 Thread Kamil Kamil
I am wondering why in the serializer's *to_representation* method, in this line: *iterable = data.all() if isinstance(data, models.Manager) else data* *Manager* base class is checked, but not *BaseManager*? I am asking because I have something like this: class MyQuerySet(QuerySet): class

How to test TestContextDecorator

2018-08-03 Thread Kamil Pluciński
Hi all ;) I work with this ticket: 29024 . I changed decorate_class function in TextContextDecorator : def setUp(inner_self): context = self.enable() if self.attr_name:

Re: Django Setup Challenges

2018-04-25 Thread Kamil Dębowski
What is your problem exactly? What have you already done? Do you see some errors in console? W dniu wtorek, 24 kwietnia 2018 13:34:46 UTC+2 użytkownik Nana Kwabena Kwarteng napisał: > > Hi All, > > I'm new here and I'm having getting my django to run... Any help? > -- You received this message

Re: Two sets of registration with django-registration

2013-09-23 Thread Kamil Gałuszka
you are inherit this class https://github.com/pennersr/django-allauth/blob/master/allauth/account/adapter.py and override method save_user to actually do what you want. And that is it. Is just that simple Cheers Kamil On Monday, September 23, 2013 7:32:38 PM UTC+2, Vibhu Rishi wrote

Re: Model QuerySet used in base.html template

2013-08-25 Thread Kamil Gałuszka
times is just bad idea because, you want to separate view stuff from template rendering (especially that django rendering time is sometimes just slower than for example jinja2). But it's just my opinion. I'm maybe wrong :) . Feel free to do what you suits best your needs. :) Cheers, Ka

Re: Model QuerySet used in base.html template

2013-08-25 Thread Kamil Gałuszka
jango/core/context_processors.py And here docs: https://docs.djangoproject.com/en/dev/ref/templates/api/#basics Cheers, Kamil Galuszka On Sunday, August 25, 2013 1:04:01 PM UTC+2, Radomir Wojcik wrote: > > I am actually thinking using some sort of templatetag now instead of > passing the query each

Re: What is the best practice to learn Django 1.5?

2013-07-01 Thread Kamil Gałuszka
after you read documentation. Cheers, Kamil Gałuszka > On 06/28/2013 03:45 PM, Gabriel wrote: > > > > Hey, you could also try Getting Started With Djangorest, that's a > > series of classes in everything you might need to become a Django dev. > > > &

Re: How to add tinyMCE to django 1.0.2 admin

2009-01-14 Thread kamil
Hi Oleg You must create your admin config eg: class ArticleOptions(admin.ModelAdmin): class Media: js = ('/static_media/js/tiny_mce/tiny_mce.js', '/static_media/ js/textareas.js') Please check if it correspond to your urs. good luck kamil On Jan 13,

Re: downloadable django site example anywhere?

2008-05-20 Thread kamil
You can get www.djangoproject.com web itself by: svn co http://code.djangoproject.com/browser/djangoproject.com or get http://jeffcroft.com/blog/2006/jun/06/lost-theories-with-source-code/ sure there are many others good luck On May 20, 2:39 pm, Kenneth McDonald <[EMAIL PROTECTED]> wrote: > Is

how to read progress of uploading on the server in python?

2008-04-30 Thread kamil
hi. I want to implement "fancyupload" from http://digitarald.de/project/fancyupload/ Is there any way to read progress of uploading from the server in python? Any sugestions? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

Re: Great article about web2py

2008-04-28 Thread kamil
thanx interesting On Apr 28, 6:19 pm, Milan Andric <[EMAIL PROTECTED]> wrote: > This is not Django specific but it is framework relevant.  I thought > this was a great writeup of features for any framework.  At least I am > one person who likes the features of this web2py framework. > > http://md

Re: Queryset-refactor branch has been merged into trunk

2008-04-27 Thread kamil
I wish god will pay you Malcolm. ;) It's a great news for django community. thanx --~--~-~--~~~---~--~~ 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.co

Re: Custom ManyToManyField widget in admin

2007-11-23 Thread kamil
congrats. interesting solution. Lately I've switched to newforms admin too. On Nov 22, 11:50 am, Julien <[EMAIL PROTECTED]> wrote: > Hi Kamil and all, > > I have finally found what I was looking for by using the branch > newforms-admin. > It could be tidied up a

Re: Custom ManyToManyField widget in admin

2007-11-21 Thread kamil
sorry line "{{ group.grouper.name }}: [ shoud be: "{{ group.grouper.name }}": [ On Nov 21, 11:49 am, kamil <[EMAIL PROTECTED]> wrote: > Hi Julien > > in fact you don't even have to write view for it you can use generic > vi

Re: Custom ManyToManyField widget in admin

2007-11-21 Thread kamil
about generic views :) good luck On Nov 21, 12:14 am, Julien <[EMAIL PROTECTED]> wrote: > Thanks again Kamil for your help! > > Ok, now I'm trying to put everything together. Sorry I'm just starting > with Django and I am still a bit lost. > > What I am not sure about

Re: Custom ManyToManyField widget in admin

2007-11-20 Thread kamil
> Could you please give a full example? > > I've spent quite sometime practicing with the tutorials but I'm a bit > lost on this one. > > Thanks a lot! > > On Nov 20, 9:04 pm, kamil <[EMAIL PROTECTED]> wrote: > > > I dont think there is another way that maki

Re: Custom ManyToManyField widget in admin

2007-11-20 Thread kamil
I dont think there is another way that making your hands dirty with javascript. ;) If you want to be fancy you can even make it ajax - getting the cities on demand On Nov 20, 9:35 am, kamil <[EMAIL PROTECTED]> wrote: > You can easily generate cities list to the javascript dynamically

Re: Custom ManyToManyField widget in admin

2007-11-20 Thread kamil
You can easily generate cities list to the javascript dynamically writing the template for separate js file. On Nov 20, 9:22 am, Julien <[EMAIL PROTECTED]> wrote: > Hi Kamil, > > Thanks a lot for your suggestion! > > I have a few remarks though. The list of cities is dy

Re: Custom ManyToManyField widget in admin

2007-11-20 Thread kamil
Hi Julien The simple way is hijack city select box with javascript. You add js=['http://here comes path to your script'] to admin options in your model js can look like this: var countries = {'england': ['London','Manchester'], 'france': ['Paris'] } document.forms['your_form'].id_country.onchan

Re: a rather big, new django site:

2007-07-28 Thread kamil
Bravo Bram! Looks really cool. It's one of best sites made with django i've seen. On Jul 28, 1:19 pm, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote: > http://www.splicemusic.com/ > > ( summary: upload sounds, load them into a flash audio sequencer with > effects and synthesizers + standard c

Re: import problem

2007-04-29 Thread kamil
, 8:50 pm, Michael K <[EMAIL PROTECTED]> wrote: > On Apr 24, 4:19 pm, kamil <[EMAIL PROTECTED]> wrote: > > > Thanx Michael for your attention. > > I'm using todays build from svn trunk. > > I started project from the beginning to eliminate possibility

Re: import problem

2007-04-24 Thread kamil
<[EMAIL PROTECTED]> wrote: > On Apr 24, 5:41 am, kamil <[EMAIL PROTECTED]> wrote: > > > Hi. I'm using developement built-in django server. > > Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25) [GCC 4.1.2 > > (Ubuntu 4.1.2-0ubuntu4)] on linux2 > >

Re: import problem

2007-04-24 Thread kamil
Hi. I'm using developement built-in django server. Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25) [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 on fresh Kubuntu Feisty (7.04) On Apr 23, 4:01 pm, Michael K <[EMAIL PROTECTED]> wrote: > On Apr 22, 4:38 pm, kamil <[EMAIL

import problem

2007-04-22 Thread kamil
Hi. I installed Django on Python 2.5 and I receive following error on the built in server: Exception Type: ImportError Exception Value:No module named utils.text Exception Location: /usr/lib/python2.5/site-packages/django/core/ urlresolvers.py in _get_urlconf_module, line 178

any django host in UK?

2007-03-27 Thread kamil
Hi. Somebody knows if is there any hosting provider in UK who supports django? thanx. Kamil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

Re: haw access to values from field with choices

2007-02-04 Thread kamil
Thanx Nebojša. I already found that. By the way thanx for yout great thumbnails app :) On Feb 3, 6:31 pm, Nebojša Đorđević <[EMAIL PROTECTED]> wrote: > On Feb 2, 2007, at 14:51 , kamil wrote: > > > Surely it's solved but I can't find any info about it. I'm

haw access to values from field with choices

2007-02-02 Thread kamil
Surely it's solved but I can't find any info about it. I'm sure that everybody met this problem. What is the best way to get rendered the value from the field with choices. Generic views spits key not value. --~--~-~--~~~---~--~~ You received this message because

Re: dynamic query key asignment

2007-01-19 Thread kamil
gracias Jorge --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED]

Re: Would Django be a good framework for developing and engineering/science application

2006-12-16 Thread Kamil Wdowicz
2006/12/14, T. Size <[EMAIL PROTECTED]>: > > > I guess the next thing for me to do is to spend alot of > time with the documentation and built a couple of simple apps/tutorials > to flush out my understanding of how Django will work. > > a lot of time... not really, django was my first contact wi

Re: Get next object

2006-12-16 Thread Kamil Wdowicz
quickly: {{ current_object.id|add:"1" }} but u havent access to methods of next object if it doesn't exist, but you can hardcode a link to object. 2006/12/16, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > > Hey Everyone, > > Wondering if anyone can help me out here. Is it possible to get the > next

Re: Why does Django think my browser isn't accepting cookies?

2006-12-16 Thread Kamil Wdowicz
I had it before, once. Restart everything! 2006/12/16, Jeremy Dunck <[EMAIL PROTECTED]>: > > > On 12/15/06, DavidAtEcodata <[EMAIL PROTECTED]> wrote: > > > > This seems to be a known problem but no-one has offered a solution as > > What URL are you requesting? > > > so I'm convinced this is purely

Re: displaying thumbnails in admin

2006-12-06 Thread Kamil Wdowicz
the worst idea is: class Picture(models.Model): file = models.ImageField(upload_to=settings.MY_MEDIA, blank=True, null=True) entry = models.ForeignKey(Entry) def filename(self): if os.name == 'nt': return str(self.f

Re: Say hi.

2006-11-28 Thread Kamil Wdowicz
Hi 06-11-28, Jarosław Świerad <[EMAIL PROTECTED]> napisał(a): > > I just want to say: Hi to all. > > I'm a new django user and hopefully this is a right place to stay and > set/get informations! > > See You in net, > > Messer. > > > > --~--~-~--~~~---~--~~ You rec

Re: Django and CRM or ERP

2006-11-17 Thread Kamil Wdowicz
I'm building kind of CRM.. Project manager, client base and Invoice system. 2006/11/17, Picio <[EMAIL PROTECTED]>: > > Just courious if Is there anyone that have built or will build a CRM > or an ERP using Django? > Thanks > Picio > > > > --~--~-~--~~~---~--~~ Yo

Re: Generating slug for words with accents

2006-11-16 Thread Kamil Wdowicz
Polish: ą = a ć = c ź or ż = z ę = e ó = o ł = l ś = s ń = n 2006/11/17, zenx <[EMAIL PROTECTED]>: > > Spanish info: > á é í ó úshould be a e i o u > ü should be u > ñ should be n > > I think that's everything in spanish ;) > > > > > --~--~---

Acces to model object inside model

2006-11-16 Thread Kamil Wdowicz
It is possible to access, and do a query inside models.py ? Something like this: class Tag(models.Model): #props... def _get_count(self): return Tag.objects.all().count() counter = property(_get_count) Do you know what I mean ? --~--~-~--~~~---

Re: How does the forloop really work?

2006-11-15 Thread Kamil Wdowicz
or try this: {% for a in list|slice:"1" %} {{ something }} {% endfor %} {% for a in list|slice:"1:3" %} {{ something }} {% endfor %} {% for a in list|slice:"3:" %} {{ something }} {% endfor %} a little bit better i think 2006/11/14, Julio Nobrega <[EMAIL PROTECTED]>: > > Ugly, but I gue

get_absolute_url syntax error ?

2006-11-13 Thread Kamil Wdowicz
class Page(models.Model): title = models.CharField(maxlength=200) pub_date = models.DateTimeField('Publication date') content = models.TextField(blank=True) category = models.ForeignKey(Category, blank=True) seo = models.ForeignKey(Seo, blank=True) slug = models.SlugField('

Re: Add to Favourites type feature?

2006-11-11 Thread Kamil Wdowicz
Make a relation ManyToMany between user and article, adding to favorite (in your example) is creating record with userId and ArticleId. 2006/11/11, Jamie Pittock <[EMAIL PROTECTED]>: > > Sorry, I didn't mean add to your browser favourites. > > I meant more of a feature built into a website where

Re: How do you iterate over a dictionary of objects within a template?

2006-11-10 Thread Kamil Wdowicz
{% for item in campaigns %} {{ item.id }} {% endfor %} 2006/11/10, Merric Mercer <[EMAIL PROTECTED]>: > > As part of my render_to_response I have returned the following:- > 'campaigns':dict1 - where dict1 is a dictionary of objects from a model > called "Campaigns". > > In my template I can d

filter records without parent

2006-11-08 Thread Kamil Wdowicz
Hello, I need all records of _Category_ that doesn't have _parent_: In my model: # class Category(models.Model): #... code here parent = models.ForeignKey('self', blank=True, null=True, related_name='child_set') ## all_categorys = Category.objects.all().filter(parent=N