Re: Using Aggregate and Count

2013-11-21 Thread Daniel Roseman
On Thursday, 21 November 2013 00:49:52 UTC, Timothy W. Cook wrote: > > Does the fact that I use a relat_name on the Review.paper field have > anything to do with it not working? > > In the Review model, notice: > paper = models.ForeignKey(Paper, verbose_name=_('Paper'), >

Re: Using Aggregate and Count

2013-11-21 Thread Timothy W. Cook
On Thu, Nov 21, 2013 at 8:25 AM, Daniel Roseman wrote: > states that if the value is, or ends with, "+", then no reverse relationship > will be created. I'm not sure why you are doing that, but remove the "+" > from the related_name in the ForeignKey definition. Thanks for

Re: Model Design: Adding Params to Relationship FIelds

2013-11-21 Thread Daniel Roseman
On Wednesday, 20 November 2013 22:49:28 UTC, Thomas Murphy wrote: > > Hi all, > > I'm working on a hour-reporting system. > > Each Project has many Users, and each User has many Projects(These are > established and working nicely). > > My design issue is this: > How can I assign each User an

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

2013-11-21 Thread James Turley
On number 3, annotate returns the annotated queryset, not the particular result of the annotation. The annotation is added to each individual object in the set. Turning that into an integer doesn't make sense, because num_publications is a property of *each individual *entry in the set, not the

Form Wizard and middle step data manipulation

2013-11-21 Thread Lachlan Musicman
Hola, I want to collect an integer x in the first form, and then use that to select the x oldest items from collections of items that may have From this perspective it is natural that anarchism be marked by spontaneity, differentiation, and experimentation that it be marked by an expressed

return multiple fields for foreignkey

2013-11-21 Thread Chantal Rosmuller
Hi, I'm pretty new to Django soi excuse me if this is a stupid question, but here we go. I have the following model: class Motivation(models.Model): def __unicode__(self): # Python 3: def __str__(self): return self.score score = models.CharField(max_length=100)

Re: ATOMIC_REQUESTS Alternative - better for highly concurrent systems

2013-11-21 Thread Oleg Korsak
Great! 21 нояб. 2013 г. 22:17 пользователь "SteveB" написал: > Hi, >I want to offer something the the community of Django users. > If you like the safety net of having each request handled by a > transaction, but don't want unnecessary blocking on highly concurrent web >

I'm looking for a Part-Time (4h/day) Django job - remote only

2013-11-21 Thread Python_enthusiast
I'm looking for a Part-Time (4h/day) Django job. I've more than one and a half year of experience using Django. - very good knowledge of Python/Django - experience with MySql, PostgreSql - Linux, GIT - competent in technologies like JS, HTML, Ajax - knowledge of good programming practice -

Re: Model Design: Adding Params to Relationship FIelds

2013-11-21 Thread Thomas Murphy
Thanks Daniel! I try to always RTFM, but this slipped by me. On Thu, Nov 21, 2013 at 5:32 AM, Daniel Roseman wrote: > On Wednesday, 20 November 2013 22:49:28 UTC, Thomas Murphy wrote: >> >> Hi all, >> >> I'm working on a hour-reporting system. >> >> Each Project has many

ATOMIC_REQUESTS Alternative - better for highly concurrent systems

2013-11-21 Thread SteveB
Hi, I want to offer something the the community of Django users. If you like the safety net of having each request handled by a transaction, but don't want unnecessary blocking on highly concurrent web applications, then the following may be of interest. The Django transaction documentation

Re: manage.py deprecation message for model/sql arguments

2013-11-21 Thread Steve Sawyer
Thanks, tim, but it looks like the message says "is deprecated" rather than "will be deprecated" - unless this is just how these warnings are worded. On Thursday, November 21, 2013 11:54:36 AM UTC-5, tim wrote: > > It looks like an issue with pywintypes, not Django. A deprecation warning >

Re: return multiple fields for foreignkey

2013-11-21 Thread Rafael E. Ferrero
class Motivation(models.Model): def __unicode__(self): # Python 3: def __str__(self): return '%s - %s' % (self.score, self.description) score = models.CharField(max_length=100) description = models.CharField(max_length=300) insert_date =

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

2013-11-21 Thread Pepsodent Cola
@James Now I understand what you mean. :) I will work on this some more tonight. On Wednesday, November 20, 2013 10:29:24 PM UTC+1, Pepsodent Cola wrote: > > 1.) > How do I use mathematical calculations on my forloop Article/Publication > list? > > * I have attached a screenshot with the

Re: [Announce] Django Graphos - Django charting made *really* easy

2013-11-21 Thread Fabio Caritas Barrionuevo da Luz
These modifications made by "anentropic" are good too. https://github.com/anentropic/django-graphos/tree/a7bae2c0e67d6f8deda1a75fac8c1574ab1b884c -- You received this message because you are subscribed to the Google Groups "Django

prefetch_related() failure in django 1.6

2013-11-21 Thread Rhett G.
Trying to migrate our Django 1.5 application to 1.6. I hit what I think is a bug, or at the very least very confusing behavior. Imagine some models like the following: class Img(Model): uuid = CharField() class ImgResolutions(Model): img = ForeignKey(Img,

Re: I'm looking for a Part-Time (4h/day) Django job - remote only

2013-11-21 Thread Cal Leeming [Simplicity Media Ltd]
I'll be very surprised if you get any offers from this post in its current format, you might get a better response if you post more information about yourself. For example; * Blog (if you have one) * Linkedin profile * Github profile * Your real name Hope this helps Cal On Thu, Nov 21, 2013

Re: Apache environment variables in Django 1.6

2013-11-21 Thread Jon Dufresne
On Thu, Nov 21, 2013 at 8:46 AM, Mike Starov wrote: > I encountered same issue in my deployment. Have you found a solution? > Yes I did. I am still not sure if this is a bug or intentional. It appears that in 1.6, settings.py is now imported *before* the first run of the

manage.py deprecation message for model/sql arguments

2013-11-21 Thread Steve Sawyer
Working my way through the Django tutorial (running Python 3.3 and Django 1.6), and when I run manage.py with any of the model arguments (validate/sqlcustom/sqlclear/sqlall etc.) the output seems to be what the tutorial leads me to expect, but I'm getting this message:

Re: Using admin views "outside" of admin

2013-11-21 Thread Brad Smith
Thanks for the reply! The main thing I'm looking for is the ability to create more granular permissions. For example, I want only the person who creates an instance of something (plus a few admins) the be able to modify that instance. I talk about working "outside" the admin interface because

How mature is Microsoft SQL Server support by the ORM?

2013-11-21 Thread CLIFFORD ILKAY
Hello, There is an upcoming project where support for an existing application where Microsoft SQL Server is being used. Switching to another database is not an option. There are hundreds of custom reports that the users have created with Crystal Reports. I found django-sqlserver

Re: manage.py deprecation message for model/sql arguments

2013-11-21 Thread tim
It looks like an issue with pywintypes, not Django. A deprecation warning means some code needs to update itself in order to work with future versions of some other code. In this case, it looks to me like pywintypes is using some functionality that will probably be removed in a future version

Re: Using admin views "outside" of admin

2013-11-21 Thread Brad Smith
...and of course now I find a FAQ item that seems to talk about exactly what I want to do: https://docs.djangoproject.com/en/1.6/faq/admin/#how-do-i-limit-admin-access-so-that-objects-can-only-be-edited-by-the-users-who-created-them I'm still curious to hear comments, though, because if this

Re: How mature is Microsoft SQL Server support by the ORM?

2013-11-21 Thread Larry Martell
On Thu, Nov 21, 2013 at 1:20 PM, CLIFFORD ILKAY wrote: > Hello, > > There is an upcoming project where support for an existing application > where Microsoft SQL Server is being used. Switching to another database > is not an option. There are hundreds of custom reports

Trouble running Celery as a service on Windows

2013-11-21 Thread DJ-Tom
Hi, I followed http://mrtn.me/blog/2012/07/04/django-on-windows-run-celery-as-a-windows-service/ and managed to get redis run as a service on Windows 7. Now I tried to get the Celery processes to run as a service but keep getting the following error: Traceback (most recent call last): File

Re: Apache environment variables in Django 1.6

2013-11-21 Thread Mike Starov
I encountered same issue in my deployment. Have you found a solution? On Wednesday, November 20, 2013 7:16:47 PM UTC-8, Jon Dufresne wrote: > > Hi, > > I recently upgraded my Django application from 1.5 to 1.6. This > application runs on Apache with mod_wsgi. After upgrading, Django > seems

django tests

2013-11-21 Thread Harjot Mann
I am creating tests for my django app. Here is my test and I am getting an error. Here is my test code. UserProfile is my model name and profile is my view corresponding to that. http://tny.cz/82ce97ef This is the error I am getting ERROR: test_profile (Automation.tcc.tests.UserProfile)

Re: How mature is Microsoft SQL Server support by the ORM?

2013-11-21 Thread Fred Stluka
Clifford, I use: - http://code.google.com/p/django-pyodbc/ No problem except that the MS SQL Server DB identifies itself as using UTF-8, but actually contains Windows-1252 chars, so we get UnicoeDecodeError a lot and have to repair the data. --Fred

html to odt

2013-11-21 Thread Harjot Mann
I want to save my html django templates to odt file. Is there any way to do this? -- Harjot Kaur Mann Blog: http://harjotmann.wordpress.com/ Daily Dairy: http://harjotmann.wordpress.com/daily-diary/ -- You received this message because you are subscribed to the Google Groups "Django users"

Re: django tests

2013-11-21 Thread Charly Román
Your testcase's name and model's name its the same, fix this. 2013/11/21 Harjot Mann : > I am creating tests for my django app. Here is my test and I am > getting an error. > Here is my test code. > UserProfile is my model name and profile is my view corresponding to

Re: django tests

2013-11-21 Thread Harjot Mann
On Fri, Nov 22, 2013 at 11:17 AM, Charly Román wrote: > Your testcase's name and model's name its the same, fix this. Changed it. But still getting the same error. Now the code is this: http://tny.cz/941266d9 -- Harjot Kaur Mann Blog: http://harjotmann.wordpress.com/

Re: django tests

2013-11-21 Thread Charly Román
http://tny.cz/c883f980 You need to rea about OOP in Python. 2013/11/22 Harjot Mann : > On Fri, Nov 22, 2013 at 11:17 AM, Charly Román wrote: >> Your testcase's name and model's name its the same, fix this. > > > Changed it. But still getting

Re: django tests

2013-11-21 Thread Charly Román
http://tny.cz/c883f980 You need to read about OOP in Python. 2013/11/22 Charly Román : > http://tny.cz/c883f980 > > > You need to rea about OOP in Python. > > > > 2013/11/22 Harjot Mann : >> On Fri, Nov 22, 2013 at 11:17 AM, Charly Román

Re: django tests

2013-11-21 Thread Xavier Ordoquy
Hi, I doubt the error is the same although it might look similar. Please note that TestCase use setUp instead of setup. Regards, Xavier Ordoquy, Linovia. Le 22 nov. 2013 à 07:17, Harjot Mann a écrit : > On Fri, Nov 22, 2013 at 11:17 AM, Charly Román

Re: django tests

2013-11-21 Thread Harjot Mann
On Fri, Nov 22, 2013 at 12:13 PM, Xavier Ordoquy wrote: > I doubt the error is the same although it might look similar. > Please note that TestCase use setUp instead of setup. Oh thankyou. But now I am getting a long list of errors. http://tny.cz/c4018552 -- Harjot Kaur

Re: django tests

2013-11-21 Thread Charly Román
It's because you have fields in your model that aren't optional, and in your code you only set one field. 2013/11/22 Harjot Mann : > On Fri, Nov 22, 2013 at 12:13 PM, Xavier Ordoquy wrote: >> I doubt the error is the same although it might look

Re: django tests

2013-11-21 Thread Harjot Mann
On Fri, Nov 22, 2013 at 12:50 PM, Charly Román wrote: > It's because you have fields in your model that aren't optional, and > in your code you only set one field. Ok so I need to give alll the fields and it is having foreign key constraint I think, so for that I need to

Re: django tests

2013-11-21 Thread Charly Román
Yes, you need to give all the fields that arent't optional. Included foreign keys. 2013/11/22 Harjot Mann : > On Fri, Nov 22, 2013 at 12:50 PM, Charly Román wrote: >> It's because you have fields in your model that aren't optional, and >> in your

Re: django tests

2013-11-21 Thread Harjot Mann
On Fri, Nov 22, 2013 at 1:13 PM, Charly Román wrote: > Yes, you need to give all the fields that arent't optional. Included > foreign keys. Not optional means that are not validated. If yes why? I mean these are the compulsory fields, so why we should not give it. I used