Writing your first Django app - Tutorial Question

2013-06-04 Thread Tony Guilin
In the https://docs.djangoproject.com/en/1.5/intro/tutorial01/ tutorial 
under the,
Playing with the API



section, I'm trying to go through the example in my python shell as 
described.


p = Poll(question="What's new?", pub_date=timezone.now())

But I'm unable to get to next command "p.save()" because of the error below.

> tony@tonymachine:~/django_projects/mysite$ python manage.py shell
> Python 2.7.3 (default, Aug 1 2012, 05:16:07)
> [GCC 4.6.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> (InteractiveConsole)
> >>> from polls.models import Poll, Choice
> >>> Poll.objects.all()
> []
> >>> from django.utils import timezone
> >>> p = Poll(question="What's new?", pub_date=timezone.now())
> Traceback (most recent call last):
>  File "", line 1, in 
>  File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", 
> line 415, in __init__
>  raise TypeError("'%s' is an invalid keyword argument for this function" % 
> list(kwargs)[0])
> TypeError: 'pub_date' is an invalid keyword argument for this function
> >>>
>
Any guidance is appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Writing your first Django app - Tutorial Question

2013-06-25 Thread Tony Guilin

>
>  you have missed 
>  from django.utils import timezone
>

That worked! Thanks.

P.S. I just copy and paste in Chrome (in Ubuntu)  and it picks up the 
formatting.

 

On Tuesday, June 4, 2013 4:10:23 PM UTC-7, Tony Guilin wrote:
>
> In the https://docs.djangoproject.com/en/1.5/intro/tutorial01/ tutorial 
> under the,
> Playing with the API
>
>
>
> section, I'm trying to go through the example in my python shell as 
> described.
>
>
> p = Poll(question="What's new?", pub_date=timezone.now())
>
> But I'm unable to get to next command "p.save()" because of the error 
> below.
>
>> tony@tonymachine:~/django_projects/mysite$ python manage.py shell
>> Python 2.7.3 (default, Aug 1 2012, 05:16:07)
>> [GCC 4.6.3] on linux2
>> Type "help", "copyright", "credits" or "license" for more information.
>> (InteractiveConsole)
>> >>> from polls.models import Poll, Choice
>> >>> Poll.objects.all()
>> []
>> >>> from django.utils import timezone
>> >>> p = Poll(question="What's new?", pub_date=timezone.now())
>> Traceback (most recent call last):
>>  File "", line 1, in 
>>  File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", 
>> line 415, in __init__
>>  raise TypeError("'%s' is an invalid keyword argument for this function" 
>> % list(kwargs)[0])
>> TypeError: 'pub_date' is an invalid keyword argument for this function
>> >>>
>>
> Any guidance is appreciated.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Django Chartit Installed, How do I run the demo???

2013-07-16 Thread Tony Guilin
I'm a complete noob.

I've been able to go through the Djano tutorial with minimal issues.

I successfully installed this according to:
Installation¶ 

You can install Django-Chartit from PyPI. Just do

$ pip install django_chartit

You also need supporting JavaScript libraries. See the Required JavaScript 
Libraries 
section 
for more details.



*Now what???*

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Django Chartit Installed, How do I run the demo???

2013-07-16 Thread Tony Guilin
BTW, I'm using http://chartit.shutupandship.com/docs/#how-to-use

On Tuesday, July 16, 2013 10:43:39 PM UTC-7, Tony Guilin wrote:
>
> I'm a complete noob.
>
> I've been able to go through the Djano tutorial with minimal issues.
>
> I successfully installed this according to:
> Installation¶ <http://chartit.shutupandship.com/docs/#installation>
>
> You can install Django-Chartit from PyPI. Just do
>
> $ pip install django_chartit
>
> You also need supporting JavaScript libraries. See the Required 
> JavaScript 
> Libraries<http://chartit.shutupandship.com/docs/#required-javascript-libraries>
>  section 
> for more details.
>
>
>
> *Now what???*
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.