Tuesday, July 31, 2012

Re: Plotting a line graph

Hi Kevin,

Does what I need, thanks :)

On Mon, Jul 30, 2012 at 5:05 PM, Kevin Anthony <kevin.s.anthony@gmail.com> wrote:
I would look into the Google graph API

On Mon, Jul 30, 2012 at 10:47 AM, Sithembewena Lloyd Dube <zebra05@gmail.com> wrote:
Hi all,

I need to draw a simple line graph do to the following:
- draw a simple line from y, x = 0 going towards x++. In other words, the line should begin at bottom left and run diagonally towards upper right.

I have tried looking at ReportLab but I do not have enough time to dig through the docs. What plotting solution would anyone suggest?

PS: An image of what I need to do is attached. X axis is miles (or points) won and Y axis is items receivable for those points, so if a user has 10000 miles a green dot should appear on the line demarcating 10000 miles.


--
Regards,
Sithembewena Lloyd Dube

--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



--
Thanks
Kevin Anthony
www.NoSideRacing.com

Do you use Banshee?
Download the Community Extensions:

--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



--
Regards,
Sithembewena Lloyd Dube

--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: Error in Brand New Django 1.4.1 released Yesterday

Okay I'm sure it's fine but I was able to get a hold of 1.4 from python.org and I used that when installing Django
to my server on bluehost.com for the time being I'm going to go with that.

Each time I tried to run the command on there after having downloaded the 1.4.1 file from https://www.djangoproject.com/download/
that's what I saw, 1.5.

On Tuesday, July 31, 2012 3:45:50 AM UTC-4, James Bennett wrote:
On Tue, Jul 31, 2012 at 2:42 AM, JJ Zolper <codingatmt@gmail.com> wrote:
> What about if you download it from the link I put.

When I said "I downloaded a copy of the 1.4.1 tarball", that's exactly
what I meant.

django.get_version() prints '1.4.1'. I do not know what the problem is
with your local install, but I can verify that it is not an issue with
the package on djangoproject.com.

--
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/-/CXVD0dSI93gJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: Error in Brand New Django 1.4.1 released Yesterday

On Tue, Jul 31, 2012 at 2:42 AM, JJ Zolper <codingatmt@gmail.com> wrote:
> What about if you download it from the link I put.

When I said "I downloaded a copy of the 1.4.1 tarball", that's exactly
what I meant.

django.get_version() prints '1.4.1'. I do not know what the problem is
with your local install, but I can verify that it is not an issue with
the package on djangoproject.com.

--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: Error in Brand New Django 1.4.1 released Yesterday

What about if you download it from the link I put.

I mean I'm sure it's fine just pointing out that where I got it from it said 1.5

On Tuesday, July 31, 2012 3:30:31 AM UTC-4, James Bennett wrote:
On Tue, Jul 31, 2012 at 2:15 AM, JJ Zolper <codingatmt@gmail.com> wrote:
>>>> import django
>>>> print django.get_version()
>
> I didn't see 1.4.1 I saw 1.5
>
> Sure it's probably a minor configuration fix to change it to 1.4.1 but I was
> really worried that I did something wrong.
>
> Maybe someone else can repeat this and see if I made a mistake or that
> indeed something is wrong with the brand new release?

Here is django/__init__.py in the 1.4 release branch:

https://github.com/django/django/blob/stable/1.4.x/django/__init__.py

VERSION is (1, 4, 1, 'final', 0).

I downloaded a copy of the 1.4.1 tarball, unpacked it, and looked at
the __init__.py; again, VERSION was (1, 4, 1, 'final', 0).

--
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/-/bX7XtGbM88wJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: Error in Brand New Django 1.4.1 released Yesterday

On Tue, Jul 31, 2012 at 2:15 AM, JJ Zolper <codingatmt@gmail.com> wrote:
>>>> import django
>>>> print django.get_version()
>
> I didn't see 1.4.1 I saw 1.5
>
> Sure it's probably a minor configuration fix to change it to 1.4.1 but I was
> really worried that I did something wrong.
>
> Maybe someone else can repeat this and see if I made a mistake or that
> indeed something is wrong with the brand new release?

Here is django/__init__.py in the 1.4 release branch:

https://github.com/django/django/blob/stable/1.4.x/django/__init__.py

VERSION is (1, 4, 1, 'final', 0).

I downloaded a copy of the 1.4.1 tarball, unpacked it, and looked at
the __init__.py; again, VERSION was (1, 4, 1, 'final', 0).

--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Error in Brand New Django 1.4.1 released Yesterday

Hello all,

I didn't realize a new release was put out until something weird happened.

I'm installing DJ on my production server now and when I was downloading a copy from https://www.djangoproject.com/download/

and installed it and went into python:
>>> import django  >>> print django.get_version()
I didn't see 1.4.1 I saw 1.5

Sure it's probably a minor configuration fix to change it to 1.4.1 but I was really worried that I did something wrong.

Maybe someone else can repeat this and see if I made a mistake or that indeed something is wrong with the brand new release?

Cheers to all!

JJ

--
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/-/sN647bh67AAJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Monday, July 30, 2012

Re: Dynamic forms

On Tue, Jul 31, 2012 at 1:23 AM, Sandeep kaur <mkaurkhalsa@gmail.com> wrote:
> I want to have a form, with drop down list and then multiple select
> checkboxes dynamically filtered based on drop down selection. I have
> searched a lot but did not find a complete solution for my
> requirement. Also I want to ask that can we do this without apply java
> query ? Means if a browser doesn't support java, how would our could
> run?
>
> Help would be really appreciated.
Lets say that you need a form with a drop-down list that have dynamic
values. With Django this can be done simple and fast.
MY_CHOICES = (
('1', 'Option 1'),
('2', 'Option 2'),
('3', 'Option 3'),
)

class MyForm(forms.Form):
my_choice_field = forms.ChoiceField(choices=MY_CHOICES)

The form`s class has an __init__ method that is called on every form
load. Most of the times you skipped it in the form definition but now
you will have to use it.

def get_my_choices():
# you place some logic here
return choices_list

class MyForm(forms.Form):
def __init__(self, *args, **kwargs):
super(MyForm, self).__init__(*args, **kwargs)
self.fields['my_choice_field'] = forms.ChoiceField(
choices=get_my_choices() )

You first call the __init__ method of the parent class(Form) using the
super keyword and then declare your dynamic fields(in this case
my_choice_field). With this code get_my_choices is called on every
form load and you will get your dynamic drop-down.

--
Satinderpal Singh
http://satindergoraya.blogspot.in/

--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.