Re: converting the format of datetime from datetime.datetime( yyyy mm dd hh mm tzinfo=) to yyyy mm dd hh mm

2014-06-22 Thread Kelvin Wong
$ python Python 2.5.4 (r254:67917, Dec 23 2008, 14:57:27) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import datetime >>> dt = datetime.datetime.utcnow() >>> fmt = "%Y %m %d %H %M" >>> print dt.strftime(fmt)

Unable to add CSRF token to the header

2014-06-22 Thread Subodh Nijsure
[ Sorry this is duplicate as I posted previous messages without Subject: !! ] I have following ajax query that gets generated from my template. This is done after user has logged into the system. One thing I have noticed is very first GET request always prompts a dialog box that asks users to

Re: unit test:AssertionError: False is not true

2014-06-22 Thread Russell Keith-Magee
Hi Kim, It seems to me that the error messages you're getting are pretty clear - you're asserting that certain content exists, and it doesn't. I can think of any number of reasons that this might be happening, ranging from a broken template, a mistake in URL resolution, a failed login, to

Re: unit test:AssertionError: False is not true

2014-06-22 Thread Kim
Anyone? Help! 2014年6月21日土曜日 19時29分26秒 UTC+9 Kim: > > Hi everyone, > > I am making my blog from this tutorial: > http://matthewdaly.co.uk/blog/2013/12/28/django-blog-tutorial-the-next-generation-part-1/ > . > But I am continuously getting the AssertionError messages: > > --- > $ python

Re: How to replace Django management command in 1.7

2014-06-22 Thread Russell Keith-Magee
On Sun, Jun 22, 2014 at 5:35 AM, Rafał Pitoń wrote: > Hello, > > In my app I am using custom user model with my own createsuperuser command. > > However after updating my dev to Django 1.7 I've realized that behaviour > of commands discoverer was changed from "last one

Re: Possible error at usage of reverse URL in templates.

2014-06-22 Thread Russell Keith-Magee
Hi Sebastian, There is a very significant difference between the third pattern and the last - the extra set of braces. That extra set of braces means that the regex group that is being matched is (?P\d+)/ That is - one or more numerical digits, identified as playerId, that *must* be followed by

Re: Jump on 1.7 in new project or stick to 1.6, target release date 30th of September

2014-06-22 Thread Lachlan Musicman
Yes, I would go to 1.7. On 22 June 2014 23:22, Jorge Andrés Vergara Ebratt wrote: > I've been asking myself the same thing, I think I'm going to start with > Python3 and Django 1.7 :) > > On Jun 22, 2014 8:20 AM, "pjotr" wrote: >> >> We are starting a

[no subject]

2014-06-22 Thread Subodh Nijsure
I have following ajax query that gets generated from my template. This is done after user has logged into the system. One thing I have noticed is very first GET request always prompts a dialog box that asks users to login with username and password. I have done console.log and csrf_token is

Re: Angular and Django

2014-06-22 Thread Andrew Farrell
Doug, I'm very interested to hear that Angular is more powerful than Ember. After some indecision between Ember and Angular, I decided to start picking up Ember on the advice of a friend that it was the more powerful of the two. Therefore, if you have anything I might read to contradict that, I'd

Re: Angular and Django

2014-06-22 Thread Phang Mulianto
Angularjs great for a front end, and it just plain html + javascript. we won't need django templating, just put the angular app in a webserver like nginx to server static files, then use django for the API part with REST service. The angular html generation should not in django templating,

Re: Angular and Django

2014-06-22 Thread Scot Hacker
Angular is really wonderful, and I use it with several Django projects. But the two are agnostic about each other. All Angular needs from the back-end is a solid JSON API to work with and a few core back-end features like handling authentication. Modern JS frameworks like Angular, sadly, make

Re: Angular and Django

2014-06-22 Thread Doug Snyder
Angular directives and binding are actually more powerful than Django's templating! On Sun, Jun 22, 2014 at 11:29 AM, Doug Snyder wrote: > compared to other js webapp solutions like Ember or Knockout, > Angular is more powerful but maybe a steaper learning curve. > It

Re: Angular and Django

2014-06-22 Thread Doug Snyder
compared to other js webapp solutions like Ember or Knockout, Angular is more powerful but maybe a steaper learning curve. It lets you get really under the hood and has a unique feature called directives where you're essentially creating html tags to use as widgets. Its state of the art and Google

Re: Angular and Django

2014-06-22 Thread Doug Snyder
be sure to check out: django-angular I'm just starting to use angular and django together. I plan on using django's integration with Content Delivery Networks to serve static files including the Angular app files ( AngularJS itself can

Re: Jump on 1.7 in new project or stick to 1.6, target release date 30th of September

2014-06-22 Thread Jorge Andrés Vergara Ebratt
I've been asking myself the same thing, I think I'm going to start with Python3 and Django 1.7 :) On Jun 22, 2014 8:20 AM, "pjotr" wrote: > We are starting a new project and 1.7 is not far away according to > information provided in the release plan etc. Do we "dare" to

Jump on 1.7 in new project or stick to 1.6, target release date 30th of September

2014-06-22 Thread pjotr
We are starting a new project and 1.7 is not far away according to information provided in the release plan etc. Do we "dare" to jump on 1.7 already now or should we be super careful and stick to 1.6? My intuition says 1.7 :) -- You received this message because you are subscribed to the

Re: Angular and Django

2014-06-22 Thread Glen Jungels
When I am finally able to get django to work, I plan on doing this. I think the client side processing of Angular will be a nice complement to Django on the back end. On Jun 22, 2014 5:12 AM, "zweb" wrote: > > I was looking at Angular and looks like it does many of the

Re: NoReverseMatch error when following Django Tutorial

2014-06-22 Thread Jerry Wu
It works! Thank you very much! On Sunday, June 22, 2014 7:54:41 PM UTC+8, Noxxan wrote: > > Hi > It looks like you have in polls/views.py whitespace in reverse function > ("polls: results"), try without it ('polls:results"). > > On Sunday, June 22, 2014 10:53:12 AM UTC+2, Jerry Wu wrote: >> >>

Re: NoReverseMatch error when following Django Tutorial

2014-06-22 Thread Noxxan
Hi It looks like you have in polls/views.py whitespace in reverse function ("polls: results"), try without it ('polls:results"). On Sunday, June 22, 2014 10:53:12 AM UTC+2, Jerry Wu wrote: > > Dear every one, > > I am new to Python and Django and am following the Tutorial to start my > first

Re: Howto update a package in venv

2014-06-22 Thread Lachlan Musicman
I'm a big fan of pip-tools: pip install pip-tools Once installed, you can do: pip-review --interactive which will check all installed apps and off to update them - you can choose to upgrade for each app (hence the --interactive). Cheers L. On 22 June 2014 07:28, Tom Evans

Angular and Django

2014-06-22 Thread zweb
I was looking at Angular and looks like it does many of the thing Django Templates does but on the client side. Are you using Angular with Django? How is the experience? What are the /pros/cons? What are using django for and what are you using angular for? Is django pretty much a rest

NoReverseMatch error when following Django Tutorial

2014-06-22 Thread Jerry Wu
Dear every one, I am new to Python and Django and am following the Tutorial to start my first site. But I am getting an error of NoReverseMatch error when vote. It should be redirected but error below happened. NoReverseMatch at /polls/1/vote/ Reverse for ' results' with arguments '(1,)' and

converting the format of datetime from datetime.datetime( yyyy mm dd hh mm tzinfo=) to yyyy mm dd hh mm

2014-06-22 Thread Rini Michael
Hi I am working in datetime in django,this is the code in my forms.py from_time = forms.DateTimeField(label="FromTime", required=True, input_formats=["%Y-%m-%d %H:%M:%S"], widget=DateTimeInput(format="%Y-%m-%d