Re: django tests

2013-11-23 Thread Harjot Mann
On Sat, Nov 23, 2013 at 7:53 AM, Arun K Reddy wrote: > add any other not optional fields. Hope it works. Same error. Even on adding from django.contrib.auth import User Import error is giving. -- Harjot Kaur Mann Blog: http://harjotmann.wordpress.com/ Daily Dairy:

Re: django tests

2013-11-23 Thread Harjot Mann
Now my code is this: class UserProfileTestCase(TestCase): def setUp(self): self.userprofile = UserProfile.objects.filter(user_id = 1).update(first_name = "Harjot") def test_profile(self): self.assertEqual(self.userprofile.user_id, 1) and I am getting this error: Traceback

Re: django tests

2013-11-23 Thread Simone Dalla
2013/11/23 Harjot Mann > Now my code is this: > class UserProfileTestCase(TestCase): > def setUp(self): > self.userprofile = UserProfile.objects.filter(user_id = > 1).update(first_name = "Harjot") > > def test_profile(self): >

Re: django tests

2013-11-23 Thread Harjot Mann
On Sat, Nov 23, 2013 at 2:49 PM, Simone Dalla wrote: > the correct code should be > > ... > self.userprofile = UserProfile.objects.filter(user_id =1) > self.userprofile.update(first_name = "Harjot") > ... > self.assertEqual(self.userprofile.user_id, 1) New Error. Traceback

Call for Sponsors: Django Weekend Cardiff

2013-11-23 Thread Daniele Procida
[With apologies to those who will inevitably see this message in more than one group or list.] In 2014 Cardiff will hold the first-ever Django conference in the UK. Django Weekend Cardiff will take place at Cardiff University in Wales , from

Re: Bug Tracker System

2013-11-23 Thread tim
You may find this list helpful: https://www.djangopackages.com/grids/g/ticketing/ On Friday, November 22, 2013 4:25:38 PM UTC-5, vicherot wrote: > > Hello, everybody... someone knows if there is a good bug tracker system > like Trac or Mantis but django based?? > > many thanks in advance! > >

Did not manage to run manage.py runserver (Django 1.6, Python 2.7.6 on Mac 10.8.5)

2013-11-23 Thread Nicholas Ling
Hi guys i'm new to python as well as django. Seeking help for this problem when im running the command "python manage.py runserver" in Terminal for tutorial in https://docs.djangoproject.com/en/1.6/intro/tutorial01/ The development

Generate a random directory for files to be uploaded

2013-11-23 Thread Matt Lind
So I am trying to modify django-jfu ( a multi uploader) to send files to a unique directory for every unique upload session performed. This is just due to my application's requirements and to prevent file collisions during the operations later down the road in my app. Anyway, here is views.py

Re: django tests

2013-11-23 Thread Felipe Coelho
2013/11/23 Harjot Mann > On Sat, Nov 23, 2013 at 2:49 PM, Simone Dalla wrote: > > the correct code should be > > > > ... > > self.userprofile = UserProfile.objects.filter(user_id =1) > > self.userprofile.update(first_name = "Harjot") > > ... > >

Same PTR behavior in multiple inheritance

2013-11-23 Thread Samuel Chávez
Hi guys, I have some issue with model multi inheritance in Django's ORM. I'm trying to create a ChildModel(ParentModelA, ParentModelB). When I create a ChildModel register, Django's ORM creates backstage both ParentModelA and ParentModelB registers. The odd thing is that both parent registers

Re: How do I use mathematical calculations on my forloop Article/Publication list?

2013-11-23 Thread Pepsodent Cola
I worked some more on James' hint: articles[0].num_publications() And I followed some tutorial exercises on making Template filters. After seeing DJ-Tom's hint. And this is as far as I got from trying things... I'm trying to send two lists to my template so I can do some parallel iteration

How to fix URL link redirecting from login?

2013-11-23 Thread nobody
Hi, I made an URL link in an email, if I have logged into the web site, then I can click the link, it would bring to a valid web page. But if I haven't logged log in, to click the link would result an error "page not found". How can I fix it to check if a user has not logged in, it opens a log

Re: How do I use mathematical calculations on my forloop Article/Publication list?

2013-11-23 Thread Andre Terra
Take a look at the docs for aggregation and annotation and using F expressions in them. I just skimmed over your email, but there might be something useful to learn there. https://docs.djangoproject.com/en/dev/topics/db/aggregation/

Translation from templates doesn't work.

2013-11-23 Thread Shahar Or
String in my template don't translate. They stay English even though they do pop up in the po files using `makemessages`. To make sure that the current `lang` is indeed what I expect it to be, I use `{{ lang }}` in the template somewhere. I have `{% load i18n %}` in the template somewhere near