Re: Ranking Queryset

2012-06-20 Thread akaariai
On 20 kesä, 20:37, Peter Ung wrote: > Thanks  Chris for your response; however, its not the solution I'm looking > for. I need the ranking to go in sequential order - the solution you > provided will just make my points, or scores in your example, the rank. I > need, for example, the person with t

Re: Our thanks/acknowledgments for Django

2012-06-20 Thread Daniel Sokolowski
Impressive and it more than does satisfy my curiosity; in this industry I find the moment you start doing custom code it's hard to estimate - especially on the larger projects. Super thanks On 20/06/2012 20:11, Cal Leeming [Simplicity Media Ltd] wrote: Sure - I've no problem sharing! The maj

Re: help regarding timezone

2012-06-20 Thread Karen Tracey
On Wed, Jun 20, 2012 at 7:35 AM, Darshan wrote: > hi all, > > I am actually new user for django, when i tried running example from site > > " from django.utils import timezone " it gives error no module timezone and i > changed TIME_ZONE='Asia/Calcutta' ... i dono why error.. > > > The timezone

Re: Our thanks/acknowledgments for Django

2012-06-20 Thread Cal Leeming [Simplicity Media Ltd]
Sure - I've no problem sharing! The majority of the work went into building the billing system, customer control panel, integrating into our interconnect providers API, storing CDRs, call rate groups etc - this was around 80-100 hours. However the front end (which you can see) took around 40-50 h

Re: Our thanks/acknowledgments for Django

2012-06-20 Thread Daniel Sokolowski
Hi Cal, thank you for sharing and congratulations, I do something very similar on my sites but call it a credits page - it is a great place to be putting SEO backlinks. On related note would you be willing to share total turn around time / hour spent for the site you launched ? And would you cl

Re: Displaying events by month

2012-06-20 Thread Nikolas Stevenson-Molnar
First, order by date in your query: events = Event.objects.order_by('date') Then in your template, use the ifchanged tag (https://docs.djangoproject.com/en/1.4/ref/templates/builtins/#ifchanged): {% for event in events %} {% ifchanged event.date.month event.date.year %} month here

Re: setting up new django project

2012-06-20 Thread Peter of the Norse
On 5/27/2012 8:53 PM, xaegis wrote: Hello, this is my first time posting to a list! I am running python 2.7 with django 1.4 installed on Ubuntu 12.04 I am having trouble creating new projects with django. Whenever I use the command: Code: sudo /usr/local/lib/python2.7/dist-packages/django/bin/

Displaying events by month

2012-06-20 Thread grimmus
Hi, I am trying to output upcoming events in the following format *June 2012* 12th - Event 1 15th - Event 2 *July 2012* 1st - Event 3 *August 2012* 20th - Event 4 My model is very simple with just a title and dateTime field. I am unsure how i could output the months followed by the events in

Our thanks/acknowledgments for Django

2012-06-20 Thread Cal Leeming [Simplicity Media Ltd]
Hi all, Last week we released a new site into the wild - sadly I haven't had much time to contribute to tickets, or even support on the mailing list - so felt it was about time I started showing our appreciation for Django and its community. Therefore we created an acknowledgements section on the

Re: Oracle: blank, null, and empty_strings_allowed

2012-06-20 Thread Ian Kelly
On Wed, Jun 20, 2012 at 12:31 PM, André Pang wrote: > I honestly don't mind whether Django decides to do this or not, since I can > always hack our local tree to enforce this at the database level, but I > thought it's an idea worth discussing. In my case, I found a couple of stray > records with

Odd problem

2012-06-20 Thread Patrick Edwards
When I started out, I had no problems. Starting yesterday, when I type django-admin.py startproject asitename, all that happens is that notepad opens with the source file (django-admin.py). This worked properly on Monday and I can't figure out what I must have done. I am using 32-bit Win7 Pro

Weird problem

2012-06-20 Thread Patrick Edwards
Just starting out and had no problems at first. Starting yesterday, when I type django-admin.py startproject asitename, all that happens is notepad opens the source file. This was working on Monday. I can't figure out what I did. Using 32 bit Windows 7 Pro, the current Active Python version

Re: Oracle: blank, null, and empty_strings_allowed

2012-06-20 Thread André Pang
On 6/20/2012 11:46 AM, Melvyn Sopacua wrote: On 20-6-2012 20:31, André Pang wrote: Right. There's currently no way to enforce required=True at the database level. So, your model clearly defines that it doesn't allow empty values, yet some were inserted? Can you pull this out of the abstract w

Re: Oracle: blank, null, and empty_strings_allowed

2012-06-20 Thread Melvyn Sopacua
On 20-6-2012 20:31, André Pang wrote: > Right. There's currently no way to enforce required=True at the database > level. So, your model clearly defines that it doesn't allow empty values, yet some were inserted? Can you pull this out of the abstract with an example? > I honestly don't mind wheth

Re: Oracle: blank, null, and empty_strings_allowed

2012-06-20 Thread André Pang
Right. There's currently no way to enforce required=True at the database level. I honestly don't mind whether Django decides to do this or not, since I can always hack our local tree to enforce this at the database level, but I thought it's an idea worth discussing. In my case, I found a coup

Re: Custom model field as foreign key

2012-06-20 Thread Melvyn Sopacua
On 19-6-2012 17:02, Kurtis Mullins wrote: > hmm, maybe you need a custom Select Widget for your custom field? Or check > out the select widget and see if it's looking for any _meta information on > the field that determines how the widget is displayed. I traced this down to the ModelForm() getting

Re: Ranking Queryset

2012-06-20 Thread Peter Ung
Thanks Chris for your response; however, its not the solution I'm looking for. I need the ranking to go in sequential order - the solution you provided will just make my points, or scores in your example, the rank. I need, for example, the person with the highest number of scores/points with t

Monitoring memory usage of an external component

2012-06-20 Thread Marcin Tustin
Not strictly a django question, but one I hope someone else here might have faced. I have an a site which depends on a java web service (of my own creation). This seems to leak memory like a sieve, because of the various libraries involved. This is a problem because my host sets a limit on the tot

Monitoring cache usage?

2012-06-20 Thread Roy Smith
What tools exist to monitor django's cache usage? I'd like to see things like number of keys stored, total amount of memory used, hit rates broken down by key prefix, that sort of thing. We're using django.core.cache.backends.memcached.MemcachedCache. --- Roy Smith r...@panix.com -- You rece

Re: Ranking Queryset

2012-06-20 Thread Chris Lawlor
If you can use .annotate()to calculate the rank, you can further filter / order the annotation results. An example: class Book(models.Model): title = models.CharField(max_length=

Re: New to Django, need help starting

2012-06-20 Thread Kurtis Mullins
Try "easy_install django" or "pip install django". Really, though -- I recommend going with a combination of Mac Brew (or ports or whatever third-party distribution) to install Python and pip then install virtualenv and virtualenvwrapper to create a virtual environment, then inside of the virtual

Re: Oracle: blank, null, and empty_strings_allowed

2012-06-20 Thread Thomas Lockhart
On 6/20/12 3:33 AM, Melvyn Sopacua wrote: On 20-6-2012 0:49, André Pang wrote: The idea is to try to ensure that no empty strings make it to the database, so you're not allowed to insert them into the database. You can ensure this at the Django (ORM) layer right now with blank=True for the admin

Re: New to Django, need help starting

2012-06-20 Thread Harjot Mann
do one thing open ur terminal and run the following command python then u will get Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24) [GCC 4.5.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. then type >>> import django >>> print django.get_version() if you have v

Re: Django SYNCDB or SQL error, in core models.

2012-06-20 Thread Harjot Mann
SQL does not allow max_length>255 while using unique=Trueso either you have to minimize the max_length or to remove unique..For more information just go through the following links https://groups.google.com/forum/?fromgroups#!topic/django-developers/7fMxLE-h0tQ https://groups.google.com/for

I need something to help with.

2012-06-20 Thread Oladipupo Elegbede
Hello everyone, I have been away from the group for sometime now. This is due to the nature of my current job sadly. My first love is programming and it is in Python and by extension, django. While it is true that my current engagement takes almost all of my time, I have a strong feeling that my

Re: Django SYNCDB or SQL error, in core models.

2012-06-20 Thread Diego pascual lopez
On Tue, Jun 19, 2012 at 8:17 PM, upmauro wrote: > Hi all ! > HI, > > When i begin my application i used inspectdb to generate models, after > this when i try use SYNCDB or SQL > > Django raise this exception: > > python2.7 manage.py syncdb > > Error: One or more models did not validate: > cor

Re: New to Django, need help starting

2012-06-20 Thread Diego pascual lopez
On Wed, Jun 20, 2012 at 1:49 PM, kenneth gonsalves wrote: > On Wed, 2012-06-20 at 13:15 +0200, Diego pascual lopez wrote: > > > try typing /path_to_django/bin/django-admin.py startproject > > > > > > > If you don't know the path of the django-admin.py, you can type > > > > #which django-admin.py >

Re: New to Django, need help starting

2012-06-20 Thread kenneth gonsalves
On Wed, 2012-06-20 at 13:15 +0200, Diego pascual lopez wrote: > > try typing /path_to_django/bin/django-admin.py startproject > > > > If you don't know the path of the django-admin.py, you can type > > #which django-admin.py it will say 'no django-admin.py' -- regards Kenneth Gonsalves -- Yo

help regarding timezone

2012-06-20 Thread Darshan
hi all, I am actually new user for django, when i tried running example from site " from django.utils import timezone " it gives error no module timezone and i changed TIME_ZONE='Asia/Calcutta' ... i dono why error.. -- You received this message because you are subscribed to the Google Groups

Re: New to Django, need help starting

2012-06-20 Thread Diego pascual lopez
HI, On Wed, Jun 20, 2012 at 1:10 PM, kenneth gonsalves wrote: > On Tue, 2012-06-19 at 19:57 -0700, Morris Zeitouni wrote: > > I just downloaded and installed Django. I am trying to run the command > > of > > startproject, but when I type in "django-admin.py startproject > > iFriends," > > Termin

Re: New to Django, need help starting

2012-06-20 Thread kenneth gonsalves
On Tue, 2012-06-19 at 19:57 -0700, Morris Zeitouni wrote: > I just downloaded and installed Django. I am trying to run the command > of > startproject, but when I type in "django-admin.py startproject > iFriends," > Terminal is telling me-" -bash: django-admin.py: command not found." > Why is >

Re: Oracle: blank, null, and empty_strings_allowed

2012-06-20 Thread Melvyn Sopacua
On 20-6-2012 0:49, André Pang wrote: > The idea is to try to ensure that no empty strings make it to the > database, so you're not allowed to insert them into the database. You > can ensure this at the Django (ORM) layer right now with blank=True for > the admin or by checking the blank attribute m

Re: New to Django, need help starting

2012-06-20 Thread Frankline
Have you tried 'python django-admin.py startproject iFriends' Make sure your python path installation can be found. -- 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 unsubscri

Re: Django newbie

2012-06-20 Thread Corey MacDonald
Its most certainly an issue with your env variables. Double check, reboot. If you still have problems please post the string from your path. On Wed, Jun 20, 2012 at 2:46 AM, lovetoprogram wrote: > I am trying django using the djangobook tutorial. I have Python > experience. However when I'm try

Re: Django newbie

2012-06-20 Thread Jirka Vejrazka
> experience. However when I'm trying to execute following command in > command prompt (Windows 7), I get this error. > File "", line 1 > django-admin.py startproject mysite >                                        ^ > SyntaxError: Invalid synatx Hi there, this is a typical Python interprete

Django newbie

2012-06-20 Thread lovetoprogram
I am trying django using the djangobook tutorial. I have Python experience. However when I'm trying to execute following command in command prompt (Windows 7), I get this error. File "", line 1 django-admin.py startproject mysite ^ SyntaxError: Invalid synatx

New to Django, need help starting

2012-06-20 Thread Morris Zeitouni
I just downloaded and installed Django. I am trying to run the command of startproject, but when I type in "django-admin.py startproject iFriends," Terminal is telling me-" -bash: django-admin.py: command not found." Why is it not understanding the django- admin function? I am using Mac OS X 10.