Re: list of year form

2012-06-04 Thread kenneth gonsalves
On Tue, 2012-06-05 at 10:04 +0700, subtitle indo wrote: > I want to create list of year select form. > I know that i can generate the value using html. > Is there a way to generate the value using forms API. > > For example, i want to generate select field that display year from > 1970-2011. I

list of year form

2012-06-04 Thread subtitle indo
Hi All, I want to create list of year select form. I know that i can generate the value using html. Is there a way to generate the value using forms API. For example, i want to generate select field that display year from 1970-2011. Thanks -- You received this message because you are

Re: django site upload

2012-06-04 Thread 刘耀耀
The same question bother me too , now I trying to figure out today ! 2012/6/5 Mario Gudelj > Upload to where? What's confusing you? > > > On 5 June 2012 02:17, AJAYI THEOPHILUS wrote: > >> I am a newbie to django and i need help on site upload >> >>

Re: Oracle schema not working

2012-06-04 Thread rahajiyev
BTW, simple db_table = 'foo' worked fine. -- 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

Re: Oracle schema not working

2012-06-04 Thread rahajiyev
My bad, folks, late in the day I forgot to add the using() clause as I'm using tiny local postgres and huge remote oracle (read mostly) and oracle won't be default. Foo.objects.using('svfe').all().order_by('-udate', '-time')[:5]; can I somehow configure it using the model? Something like in the

Re: Retrieve datas from database

2012-06-04 Thread Tanveer Ali Sha
Hey.. I am working for project, in that the back-end code is return in perl and am working for front-end part i.e UI using Django, Can any one can tell me how to access back-end database which is return in perl or any othere languages .?? Pls help Thank You On Mon, Jun 4, 2012 at 7:21

Re: PyPm / Django 1.4?

2012-06-04 Thread Mike Dewhirst
On 5/06/2012 10:32am, Dennis Lee Bieber wrote: On Mon, 4 Jun 2012 12:41:10 -0700, "Aaron C. de Bruyn" declaimed the following in gmane.comp.python.django.user: What do Windows Django developers use for small local databases? MySQL seems overkill if you're just doing local

Re: editable option for model field?

2012-06-04 Thread Mike Dewhirst
On 5/06/2012 10:06am, Roy Smith wrote: The description of editable says: If False, the field will not be editable in the admin or via forms automatically generated from the model class. To me, this sounds like it will be shown in the admin, just not as an editable field (i.e. readonly).

Re: Django session and Dojo dnd.

2012-06-04 Thread henzk
Hi Voss, i forgot about django's CSRF protection. You can use the csrf_exempt decorator on the view function to disable django's CSRF protection - however, i wouldn't recommend that. There is a script at https://docs.djangoproject.com/en/dev/ref/contrib/csrf/ To use the script with dojo

editable option for model field?

2012-06-04 Thread Roy Smith
The description of editable says: > If False, the field will not be editable in the admin or via forms > automatically generated from the model class. To me, this sounds like it will be shown in the admin, just not as an editable field (i.e. readonly). However, when I try setting it to False,

Re: List viewable on the website

2012-06-04 Thread rentgeeen
Yes but thats like 2 years ago it was like django 0.96 that wont work On Monday, 4 June 2012 16:32:32 UTC-4, Nikolas Stevenson-Molnar wrote: > > Have you seen this? https://github.com/ojii/django-mailchimp > > _Nik > > On 6/4/2012 1:02 PM, rentgeeen wrote: > > Hello, > > > > Would like to

Re: django site upload

2012-06-04 Thread Mario Gudelj
Upload to where? What's confusing you? On 5 June 2012 02:17, AJAYI THEOPHILUS wrote: > I am a newbie to django and i need help on site upload > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group,

Appropriate way to override Model __getattr__ in 1.4

2012-06-04 Thread Chris
What's the appropriate way of overriding the a Model class's __getattr__ in Django 1.4? I have a model structure like: class Main(models.Model): [blah] class Detail(models.Model): main = models.ForeignKey(Main) name = models.CharField(max_length=255) value=

RE: PyPm / Django 1.4?

2012-06-04 Thread Sells, Fred
I just use MySQL. Better the devil you know ... -Original Message- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Aaron C. de Bruyn Sent: Monday, June 04, 2012 3:41 PM To: django-users@googlegroups.com Subject: Re: PyPm / Django 1.4? On Sun, Jun

Re: List viewable on the website

2012-06-04 Thread Nikolas Stevenson-Molnar
Have you seen this? https://github.com/ojii/django-mailchimp _Nik On 6/4/2012 1:02 PM, rentgeeen wrote: > Hello, > > Would like to ask I have Django website and would like to do following: > > I know I can view LIST in mailchimp and also can download csv from > mailchimp and upload to my host

List viewable on the website

2012-06-04 Thread rentgeeen
Hello, Would like to ask I have Django website and would like to do following: I know I can view LIST in mailchimp and also can download csv from mailchimp and upload to my host and view on the website. What I want to do, how can I make it automatic, best would be CSV or LIST sync with

Re: PyPm / Django 1.4?

2012-06-04 Thread Aaron C. de Bruyn
On Sun, Jun 3, 2012 at 9:48 AM, Aaron C. de Bruyn wrote: > On Sat, Jun 2, 2012 at 9:43 AM, Bill Freeman wrote: >> Have you considered running under a virtualenv and pip installing >> exactly what you need? Windows is such a nightmare. PyPm doesn't have

Re: Now I know I solved this before, but...

2012-06-04 Thread Nikolas Stevenson-Molnar
The problem is likely in your Python code somewhere. That error usually means that you have some incorrectly (un)indented code. _Nik On 6/4/2012 11:16 AM, Robert Steckroth wrote: > Can anyone explain this on to me. It seams like an easy fix, but > I can't get my fingers on it. Any help is

Now I know I solved this before, but...

2012-06-04 Thread Robert Steckroth
Can anyone explain this on to me. It seams like an easy fix, but I can't get my fingers on it. Any help is appreciated. In template /home/sites/radio_show/radio/serve/templates/registration/activation_email.txt, error at line 5 unindent does not match any outer indentation level 1 {% load

Re: how to suppress ForeignKey related query

2012-06-04 Thread Nikolas Stevenson-Molnar
Related objects are lazy by default, unless you're using select_related() or prefetch_related(): https://docs.djangoproject.com/en/dev/ref/models/querysets/#django.db.models.query.QuerySet.select_related So if you're seeing a player query and you're not using one of those methods, then I would

how to suppress ForeignKey related query

2012-06-04 Thread Zheng Li
I have a class class PlayerSoul(ModelAbstract, ModelBatchSaveHelper): player = models.ForeignKey(Player) .. When I call PlayerSoul.objects.all() PlayerSoul.objects.get() there is always an additional query for Player. Can I delay the query for Player until I really

Re: Django session and Dojo dnd.

2012-06-04 Thread voss
Hi Hendrik, I forgot to mention in my previous message that the debug shows the following: code 400, message Bad request syntax ("\x16\x03\x01\x00\x8b\x01\x00\x00\x87\x03\x01O\xcc\xd8\xc0\x18hZ\x7f\xa3h\xb9l\xaf\xdb\xfbp}(\xc1\xc6\xa5g\x18\xe5!\x87\xd4\xe2`_'\x90\x00\x00H\x00\xff\xc0") Thank

django site upload

2012-06-04 Thread AJAYI THEOPHILUS
I am a newbie to django and i need help on site upload -- 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

Re: Django session and Dojo dnd.

2012-06-04 Thread voss
Hello Hendrik, Thank you for your help! I can get the 'ok' in the alert with your code. However, how do I show the response in the alert? For some reason I am unable to pass the message back from the view; I keep getting an empty alert(response). My view looks like: def

Question regarding cloud deployment and bash automatization

2012-06-04 Thread Robert Steckroth
Hey Gang, I have created a juju charm to deploy multiple django apps to ec2. Currently, I am working on multiple site control and need help with the django_site table. When am instance is destroyed, the database remains but django is re-installed. The problem arises when old database is kept

Re: Oracle schema not working

2012-06-04 Thread Ian
On Monday, June 4, 2012 5:36:32 AM UTC-6, rahajiyev wrote: > > Why is Django strangely quoting column and table names? It gives > Oracle syntax errors. > > DatabaseError at / > > relation "foo" does not exist > LINE 1: ...ty", "foo"."address_country" FROM "foo"."... > > Of course it exists as

Re: uploading images via API

2012-06-04 Thread Aljoša Mohorović
take a look at gist w/ base64 file upload solution: https://github.com/toastdriven/django-tastypie/issues/42 it works great, you can add Base64FileField implementation to your app (it's only ~15 lines of code) and you can upload from anything that can open a file and encode it. you can also use

Re: Retrieve datas from database

2012-06-04 Thread bruno desthuilliers
On Jun 4, 2:23 pm, by-neron wrote: > however, > > in mysite/template/index.html > >  {% for post in latestPosts %} >      {{ post.id }} >     {% endfor %} > prints nothing because it could not send data here. How can i send it ? You pass them as a Context object to the

RE: django 1.4, wsgi, flex deploy best practices

2012-06-04 Thread Sells, Fred
That's a nice clean solution requiring only a minimal edit on a redeploy(server move). I had previously tried to semi-automate this using the javascript code below; but that did not provide a host or hostname; however I'm not really a javascript guru and may have missed something.

Re: How to perform a simple search ignoring characters with accents (á, é, í, ó, ú)

2012-06-04 Thread Peter of the Norse
One possibility is to use MySQL. By default it indexes things so that a, á, and À are the same thing. There are some gotchas though: you have to make sure that it’s using an appropriate character set for the languages you’re using. (UTF-8 is a good choice.) There’s not a good similar solution

Re: Sorl thumbnails VS Google

2012-06-04 Thread fabrixxm
On 4 Giu, 12:32, kooliah wrote: > So i can't understand if i want to have a better ranking, it is better > to not use sorl for this kind of images and use > > height="{{ pic.picture.height }}" /> > > that gives > width="187" height="280" /> > from a user

Re: Retrieve datas from database

2012-06-04 Thread kenneth gonsalves
On Mon, 2012-06-04 at 05:23 -0700, by-neron wrote: > i have a project called mysite and project has an application called > blog. Project file has template/ directory which includes html files > of site.Additionally, blog application has a model like that > > class Post(models.Model): > title

Retrieve datas from database

2012-06-04 Thread by-neron
hi there, i'm new with Django. What i want is that retrieve some datas from db. First of all, i have a project called mysite and project has an application called blog. Project file has template/ directory which includes html files of site.Additionally, blog application has a model like that

Re: Oracle schema not working

2012-06-04 Thread Jani Tiainen
4.6.2012 14:36, rahajiyev kirjoitti: Why is Django strangely quoting column and table names? It gives Oracle syntax errors. DatabaseError at / relation "foo" does not exist LINE 1: ...ty", "foo"."address_country" FROM "foo"."... Of course it exists as foo, not as "foo". I already did the

Re: Oracle schema not working

2012-06-04 Thread rahajiyev
Exact error: > DatabaseError at / > > relation "foo" does not exist > LINE 1: ...ty", "foo"."address_country" FROM "foo... > -- 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

Re: Oracle schema not working

2012-06-04 Thread rahajiyev
Why is Django strangely quoting column and table names? It gives Oracle syntax errors. DatabaseError at / relation "foo" does not exist LINE 1: ...ty", "foo"."address_country" FROM "foo"."... Of course it exists as foo, not as "foo". I already did the CREATE SYNONYM trick to avoid messing with

Sorl thumbnails VS Google

2012-06-04 Thread kooliah
May be it's a stupid question, but i can't find an answer. Using sorl thumbnails and inspecting the page source i notice that images are coded in html in the following way: width="187" height="280" /> but here http://support.google.com/webmasters/bin/answer.py?hl=en=114016 "The filename

onetoone field in admin

2012-06-04 Thread het.oosten
When i select a onetoone field in admin which has already been taken, I get an error message (already exist). This is of course expected behaviour. The problem i have is that the list to select from gets very long because all items are listed. Is there a way to hide all options that are already

Re: Using the django.contrib.auth User in my model - database error

2012-06-04 Thread bruno desthuilliers
On Jun 4, 11:01 am, xTalisman wrote: > Solved : > I dropped all the database tables (including the contib.auth ones) and ran > syncdb, suddenly everything was fine. odd , but is working now . Well, nice to know it works now, but yes this _is_ odd. -- You received

Re: Understanding Django for PHP developer

2012-06-04 Thread bruno desthuilliers
On Jun 3, 12:18 pm, mikegolf wrote: > Hi, > I've started to learn Django recently, however for last 5+ years I've > been developing using PHP (especially Yii) and thus asking if there's > any tutorial / documentation on significant differences in > *thinking*. > What I mean is

Re: Using the django.contrib.auth User in my model - database error

2012-06-04 Thread xTalisman
Solved : I dropped all the database tables (including the contib.auth ones) and ran syncdb, suddenly everything was fine. odd , but is working now . Jonathan On Monday, June 4, 2012 11:27:44 AM UTC+3, xTalisman wrote: > > Bruno , > I thought so , so I deleted the the whole database (sqlite3)

Django ForeignKey which does not require referential integrity?

2012-06-04 Thread diabeteman
For the record, I've looked deep into django's code to find what needs to be done, but I think that simply subclassing ForeignKey will not be enough. NB: I use South for managing my database schema, so I figure I'll need to do something about that too. But it may be out of the subject here :)

Re: Using the django.contrib.auth User in my model - database error

2012-06-04 Thread xTalisman
Bruno , I thought so , so I deleted the the whole database (sqlite3) and ran the syncdb again , it created the tables as defined by django.contrib.auth and my application - but did not create the foreignkey columns manager and users. Any ideas ? On Monday, June 4, 2012 11:23:33 AM UTC+3,

Re: Using the django.contrib.auth User in my model - database error

2012-06-04 Thread bruno desthuilliers
On Jun 4, 9:49 am, xTalisman wrote: > I ran syncdb without a problem ,  then when I used the admin interface I > get the following error : > > Exception Type: DatabaseError at /admin/coordination/project/ > Exception Value: no such column:

Django ForeignKey which does not require referential integrity?

2012-06-04 Thread diabeteman
Bump ;-) I know my question is a bit technical but could someone help ? -- 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/-/WuyUm2Xs5jYJ. To post to this

Re: Understanding Django for PHP developer

2012-06-04 Thread mikegolf
Doug, thanks a lot! I've read the article and it really explains a lot, but what I'm actually looking for is a list of differences like the one you've pointed out (listofstuff lifetime)... anything? ;) On Jun 4, 12:10 am, Doug Ballance wrote: > I should have looked a little

Using the django.contrib.auth User in my model - database error

2012-06-04 Thread xTalisman
Part of my application that uses the contrib,auth User from django.db import models from django.contrib.auth.models import *User* class Project(models.Model): name = models.CharField(max_length=200) startdate = models.DateField('Project Started') enddate = models.DateField('Expected end date')

Re: Scaling django installation

2012-06-04 Thread vivek
> I guess it was 16. Sounds good. > Separation of django and static content is part of the deployment/setup > change anyway. Yes that would definitely help. As mentioned before look at varnish. rgds vivek -- You received this message because you are subscribed to the Google Groups "Django

Re: How to perform a simple search ignoring characters with accents (á, é, í, ó, ú)

2012-06-04 Thread djcoin [Simon Thépot]
Hi, if you are using postgreSQL, I released a week ago a library to do just what you need: see: https://github.com/djcoin/django-unaccent/ Once you got the `unaccent` function set up in your postgreSQL db, you can make unaccented search from the Django ORM as usual. Eg: Given a book title of "The

Re: Scaling django installation

2012-06-04 Thread Subhranath Chunder
On Mon, Jun 4, 2012 at 12:15 PM, vivek wrote: > > > > > > That's aggregated load time, and not a single page loading time. The test > > comprised of navigating to multiple pages to generate more real life > > scenario. > > > > How many pages? > I guess it was 16. > > > >

Re: Scaling django installation

2012-06-04 Thread vivek
> > That's aggregated load time, and not a single page loading time. The test > comprised of navigating to multiple pages to generate more real life > scenario. > How many pages? > > > 3. text/html , which is the output of django app, is taking 62.74 % > > time. > > This number might not be