Re: [Django 1.3] django.views.generic.TemplateView example

2011-09-30 Thread Russell Keith-Magee
On Saturday, October 1, 2011, Micky Hulse wrote: > Code: > > > > When using the new class-based generic views, is there a faster way > for me to pass URL params to the template? There's no need to subclass TemplateView and provide your own implementation of get_c

How REST Access ?

2011-09-30 Thread bino oetomo
Dear All. Kindly please give me your enlightment to CRUD Django database using HTTP-GET. For the sake of simplicity, I use basic django example from https://docs.djangoproject.com/en/1.2//intro/tutorial02/ I didn't add any fancy things. My admin.py as simple as : -START--- from polls.mo

Re: Wired image file upload problem

2011-09-30 Thread @@
Sorry, it's the size limitation. Didn't aware the settings.FILE_UPLOAD_MAX_MEMORY_SIZE was changed. On Thu, Sep 29, 2011 at 5:57 PM, Jian Chang wrote: > size limitation? > it is wired. > [?] > > 2011/9/28 @@ > >> Hi >> I got a image can't upload while other image works fine, and i use paint >>

Re: How to do something just like in user right assignment ?

2011-09-30 Thread bino oetomo
Dear Sébastien Thankyou for your enlightment I really appreciate it Sincerely -bino- On 09/30/2011 03:34 PM, BILLION Sébastien wrote: Hi, You must add a ManyToManyField in your models https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.ManyToManyField ... -- You

Re: Django Forms: Radio buttons and label displayed in the same line?

2011-09-30 Thread voss
Hi eng. Ilian Iliev, I visited your page (http://ilian.i-n-i.org/django-forms-choicefield-and-custom-html-output/) and now my code works! After visiting the page, though, I realized that I'd asked a stupid question. What I ended up doing is that I started a Python interactive interpreter, p

Re: View decorator for common navigation elements?

2011-09-30 Thread Victor Hooi
heya, I do like the idea of just including a custom template tag =). Hmm, can custom template tags interact with models or query the database like that? Firstly, Is it possible, and secondly, is it considered good practice? Cheers, Victor -- You received this message because you are subscri

Re: set_test_cookie() on every page?

2011-09-30 Thread Victor Hooi
heya, John - thanks for the reply. In this case, it's an JQuery .post() call linked to a dropdown menu (https://groups.google.com/d/topic/django-users/tw0lM-QkdGw/discussion). The dropdown is a common navigation element on every page. It's used to set a session variable that stores which objec

Re: Looking for a job in the Arctic Circle

2011-09-30 Thread Cal Leeming [Simplicity Media Ltd]
Swap lifes with me in the UK - seriously, I'd give anything to live in Nederland - you are so lucky! On Fri, Sep 30, 2011 at 10:04 PM, Kevin Renskers wrote: > Thanks for the suggestion, but the US is not really an option, social- and > economic security wise and also the distance back to the Net

Re: Looking for a job in the Arctic Circle

2011-09-30 Thread Kevin Renskers
Thanks for the suggestion, but the US is not really an option, social- and economic security wise and also the distance back to the Netherlands. I'd like to be able to afford a flight back to friends and family more then once or twice a year :) Pretty much the same goes for Chile or Argentina.

Re: Looking for a job in the Arctic Circle

2011-09-30 Thread andres . osinski
You can also go to the (literal) polar extreme and consider something in Antarctica or Tierra del Fuego, in Chile or Argentina. There are many countries that need qualified technical staff for their research/military bases in Antarctica. As for Chile and Argentina, both require highly qualified

Re: Looking for a job in the Arctic Circle

2011-09-30 Thread Brett Epps
Might be too warm or too far south for you, but consider Wisconsin. We get plenty of snow here. Brett From: Kevin Renskers mailto:i...@bolhoed.net>> Reply-To: mailto:django-users@googlegroups.com>> Date: Fri, 30 Sep 2011 06:27:30 -0700 To: mailto:django-users@googlegroups.com>> Cc: <2...@weholt

Re: Looking for a job in the Arctic Circle

2011-09-30 Thread serek
I understand you quite well. >From the same reason I have moved to Copenhagen. Not so cold as I expected, but nice. If you do not find anything in Reykjavik or Tromsø you can try http://www.xstream.dk/company/jobs It is rather PHP job(if we get more python people I hope we switch;) Just send CV do

Re: Django Forms: Radio buttons and label displayed in the same line?

2011-09-30 Thread voss
Thanks, eng. Ilian Iliev. I will definitely take a look! -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/e3OJD8G-ob4J. To post to this group, send email to

Re: Django Forms: Radio buttons and label displayed in the same line?

2011-09-30 Thread Ilian Iliev
Hi, you can do it with CSS styling, custom widget or custom HTML. Check this link for the custom HTML approach - http://ilian.i-n-i.org/django-forms-choicefield-and-custom-html-output/ This is not the best one but if you need it only for a single place go for it. -- eng. Ilian Iliev Web Software

Django Forms: Radio buttons and label displayed in the same line?

2011-09-30 Thread voss
Hello all, Is it possible to display radio buttons and label in the same line using Django forms? Below is an example: _Choices = ( (1,'A'), (2,'B'), (3,'C'), ) class QuestionForm(forms.Form): question = forms.ChoiceField(label='Please choose one!', cho

Re: CSRF with AJAX problem

2011-09-30 Thread Yaşar Arabacı
To create csrf cookie without using csrf tag, your view needs to be decorated with django.views.decorators.csrf.ensure_csrf_cookie. Also check: https://code.djangoproject.com/ticket/16936 2011/9/30 Kenneth Love > You're using AJAX and forms incorrectly, then. Any form that has a > solid effect o

"Unidentified Errors" message instead of ValidationError

2011-09-30 Thread Ted Gruenloh
Hey there. OK, trying to add a clean method to a ModelForm in Django.  I'm adding a simple raise statement just to see if it works, and instead of my message, I get "Unidentified Errors.  Please notify..." Here's my (simple) test: class ConfigurationForm(forms.ModelForm):     ...     def c

Re: Get latest item by many items in a queryset

2011-09-30 Thread Colin
Hmm this may work for me. if I add the time range to the latest_status it is close to what I want! Thanks a bunch On Sep 30, 9:47 am, Dmitry Kuznetsov wrote: > Something like this? > > backends = [backend1,backend2,backend3] > latest_status = Status.objects.filter(backend__in=backends).latest() >

[Django 1.3] django.views.generic.TemplateView example

2011-09-30 Thread Micky Hulse
Code: When using the new class-based generic views, is there a faster way for me to pass URL params to the template? Thanks! Micky -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send e

Re: CSRF with AJAX problem

2011-09-30 Thread Kenneth Love
You're using AJAX and forms incorrectly, then. Any form that has a solid effect on your database (creating, replacing, or deleting data) should be POSTed and should have CSRF token. Look into pydanny's django-uni-form project (http://readthedocs.org/ docs/dango-uni-form/en/latest/) for creating yo

Re: Get latest item by many items in a queryset

2011-09-30 Thread Colin
Thanks for the info guys! Is there any changes I could make to my model? Right now I have about 165k backends and a huge number of statuses. But they are small if you only grab the last 10 or so minutes of statuses. On Sep 30, 10:43 am, Tom Evans wrote: > On Fri, Sep 30, 2011 at 2:48 PM, John w

Re: Get latest item by many items in a queryset

2011-09-30 Thread Tom Evans
On Fri, Sep 30, 2011 at 2:48 PM, John wrote: > I believe that there is no real way for you to avoid having to perform > a query for each backend instance.  Even in raw SQL, I don't think > there is a way to do what you want - in postgres, for example, you > could not both order by the timestamp an

Re: Get latest item by many items in a queryset

2011-09-30 Thread John
That would still return a single value - the status update with the latest timestamp with one of those backends. On Sep 30, 9:47 am, Dmitry Kuznetsov wrote: > Something like this? > > backends = [backend1,backend2,backend3] > latest_status = Status.objects.filter(backend__in=backends).latest() >

Re: Get latest item by many items in a queryset

2011-09-30 Thread John
I believe that there is no real way for you to avoid having to perform a query for each backend instance. Even in raw SQL, I don't think there is a way to do what you want - in postgres, for example, you could not both order by the timestamp and get distinct values based on backend. However, ther

Re: Get latest item by many items in a queryset

2011-09-30 Thread Dmitry Kuznetsov
Something like this? backends = [backend1,backend2,backend3] latest_status = Status.objects.filter(backend__in=backends).latest() Regards, Dmitry On Sep 29, 7:36 pm, Colin wrote: > Hi Users, > > So I have a DB that has a list of backends and there properties and I > have a table that gets updat

Re: Looking for a job in the Arctic Circle

2011-09-30 Thread Yves S. Garret
You got your reasons. That's alright. Have you looked into Greenland? How about doing a self-employed gig where you do coding for other based on contracts and orders? On Fri, Sep 30, 2011 at 9:27 AM, Kevin Renskers wrote: > I don't think many people will ever understand why I'd want to move t

Re: [Admin] Form Fields Rendering Completely Incorrectly

2011-09-30 Thread Nikhil Somaru
Much obliged, thank you. On Fri, Sep 30, 2011 at 4:35 PM, Ilian Iliev wrote: > As stated in dcumentation: > https://docs.djangoproject.com/en/dev/ref/models/fields/#textfield > > A large text field. The admin represents this as a (a > multi-line input). > You should use CharField instead of Tex

Re: set_test_cookie() on every page?

2011-09-30 Thread John
While this is not directly your question, if you want to do something on literally every view, the easiest way to do it would most likely be to add a custom middleware with a process_request or process_response method. More to the point, you should not call set_test_cookie on every view - in the e

Re: View decorator for common navigation elements?

2011-09-30 Thread Luis Morales
wouldn't a template tag work best in a case like this? something like {% NavBar %} or {% GetNav NavName %} that way you can have your own cache code inside you template tag code, like storing the database result into memcached or redis and avoid a relational db call each page. them you you modify

Re: Looking for a job in the Arctic Circle

2011-09-30 Thread Kevin Renskers
I don't think many people will ever understand why I'd want to move to the Arctic region. But, I really don't understand how many people would like to live in Spain, France or Italy. Me, I like long, cold winters with lots of snow. I don't like hot summers. I'm just weird I guess :) Reykjavik a

Re: Define Meta attributes at runtime

2011-09-30 Thread John
I don't believe you'd be able to do this without altering the code for the framework itself; the Django model metaclass hides the Meta attribute (among other things) for non-abstract-base classes. On Sep 30, 6:45 am, Isaac wrote: > Hi folks, > > I'm wondering if it's possible to set / redefine Me

Re: Looking for a job in the Arctic Circle

2011-09-30 Thread Thomas Weholt
Ok, this is of-topic, but why immigrate from The Netherlands and why for the Love of All that's Holy would you move to the coldest place on earth? I live in Norway and just don't understand this. And sorry, I am aware this is not django related. Thomas On Fri, Sep 30, 2011 at 2:55 PM, Kevin Rensk

Re: Looking for a job in the Arctic Circle

2011-09-30 Thread Kevin Renskers
Finding a position in The Netherlands would be SUPER easy. The problem is that I want to immigrate to another country :) Remote working from The Netherlands is not what I am looking for. On Friday, September 30, 2011 2:51:28 PM UTC+2, SleepyCal wrote: > > Hmm - CCP would have been a very good c

Re: Looking for a job in the Arctic Circle

2011-09-30 Thread Cal Leeming [Simplicity Media Ltd]
Here you go: http://blog.boxedice.com/2011/05/25/were-hiring-sysadmin-devops/ * * http://blog.boxedice.com/2011/08/12/were-hiring-engineering-and-design/ Contact David at he...@boxedice.com for more info. Cal On Fri, Sep 30, 2011 at 1:51 PM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simp

Re: Looking for a job in the Arctic Circle

2011-09-30 Thread Cal Leeming [Simplicity Media Ltd]
Hmm - CCP would have been a very good company to get in with :/ I'm surprised you have not found any other decent positions in Nederland tbh. BoxedIce (owners of ServerDensity) are always on the look out for new developers, they offer remote working, and they already have staff in Nederland. Hop

Re: Looking for a job in the Arctic Circle

2011-09-30 Thread Yves S. Garret
Whatever, their loss :-) On Fri, Sep 30, 2011 at 8:47 AM, Kevin Renskers wrote: > CCP actually wanted me for their UI Programmer position. Did the first > round of interviews, made a usability report for them, all was well. And > then they decided that they don't really need a UI Programmer afte

Re: Looking for a job in the Arctic Circle

2011-09-30 Thread spawgi
Have you checked hdmessaging.com? On Fri, Sep 30, 2011 at 6:17 PM, Kevin Renskers wrote: > CCP actually wanted me for their UI Programmer position. Did the first > round of interviews, made a usability report for them, all was well. And > then they decided that they don't really need a UI Progra

Re: Looking for a job in the Arctic Circle

2011-09-30 Thread Kevin Renskers
Awesome, thanks! On Friday, September 30, 2011 2:44:45 PM UTC+2, Sumod wrote: > > http://www.arcticstartup.com/ > > > > On Fri, Sep 30, 2011 at 6:09 PM, Kevin Renskers wrote: > >> Ha, yeah I know that Iceland is not in the Arctic Circle, strictly >> speaking. Maybe I should've said the Arctic Ci

Re: Looking for a job in the Arctic Circle

2011-09-30 Thread Kevin Renskers
CCP actually wanted me for their UI Programmer position. Did the first round of interviews, made a usability report for them, all was well. And then they decided that they don't really need a UI Programmer after all :( Their other positions are not really a great match for me, sadly. Too much C

Re: Looking for a job in the Arctic Circle

2011-09-30 Thread spawgi
http://www.arcticstartup.com/ On Fri, Sep 30, 2011 at 6:09 PM, Kevin Renskers wrote: > Ha, yeah I know that Iceland is not in the Arctic Circle, strictly > speaking. Maybe I should've said the Arctic Circle region. > > -- > You received this message because you are subscribed to the Google Gro

Re: Looking for a job in the Arctic Circle

2011-09-30 Thread Kevin Renskers
Ha, yeah I know that Iceland is not in the Arctic Circle, strictly speaking. Maybe I should've said the Arctic Circle region. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/

Re: Looking for a job in the Arctic Circle

2011-09-30 Thread Yves S. Garret
http://www.ccpgames.com/en/jobs On Fri, Sep 30, 2011 at 7:35 AM, Kevin Renskers wrote: > Hi all, > > I am a Senior Python/Django programmer from The Netherlands, and I am on a > quest to move to the Arctic Circle. Right now my focus is on Reykjavik in > Iceland and Tromsø in Norway. It's quite h

Re: Looking for a job in the Arctic Circle

2011-09-30 Thread Daniel Roseman
On Friday, 30 September 2011 12:35:30 UTC+1, Kevin Renskers wrote: > Hi all, > > I am a Senior Python/Django programmer from The Netherlands, and I am on a > quest to move to the Arctic Circle. Right now my focus is on Reykjavik in > Iceland and Tromsø in Norway. It's quite hard to find jobs in

Looking for a job in the Arctic Circle

2011-09-30 Thread Kevin Renskers
Hi all, I am a Senior Python/Django programmer from The Netherlands, and I am on a quest to move to the Arctic Circle. Right now my focus is on Reykjavik in Iceland and Tromsø in Norway. It's quite hard to find jobs in these regions, and it's even harder because I don't have a network of people

Re: [Admin] Form Fields Rendering Completely Incorrectly

2011-09-30 Thread Ilian Iliev
As stated in dcumentation: https://docs.djangoproject.com/en/dev/ref/models/fields/#textfield A large text field. The admin represents this as a (a multi-line input). You should use CharField instead of TextField -- eng. Ilian Iliev Web Software Developer Mobile: +359 88 66 08 400 Website: htt

[Admin] Form Fields Rendering Completely Incorrectly

2011-09-30 Thread Nikhil Somaru
Hi All, Django Version: 1.3 OS: Mac OS X Lion Browsers: Chrome, Safari, FF Other: Virtualenv The models are only registered with admin, there are no ModelAdmin classes. For some reason, all TextField's on all models (even those with really small max_length's) render as textarea, even those which

Define Meta attributes at runtime

2011-09-30 Thread Isaac
Hi folks, I'm wondering if it's possible to set / redefine Meta attributes of a given model at runtime. The problem arises because I'm using a framework with many classes defined there, and interacting in a right way. I need to redefine some of Meta attributes of that class, but without over

Re: How to do something just like in user right assignment ?

2011-09-30 Thread BILLION Sébastien
Hi, You must add a ManyToManyField in your models https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.ManyToManyField class Person(models.Model): name = models.Charfield(max_lenght=200) colours = models.ManyToManyField(Color) class Color(models.Model): name = models.C

Re: Anyone sync'd a django project with flickr recently? django-syncr

2011-09-30 Thread i...@webbricks.co.uk
ok, couple of things to note. 1. get it from the svn, the zip hasn't been updated in a while. 2. you need to follow the instructions here. http://skooshmagoo.com/weblog/2010/sep/05/fixing-django-syncr-umedium-640/ with those two, you might stand a chance of syncing some photos. sets, now thats a