Implementing a timeline of objects

2015-04-18 Thread Vibhu Rishi
Hi Folks, I am playing around with Django and making a site for my motorcycling group. I am trying to implement a timeline view and thought I would share my thoughts with you and get some feedback. So far, I have a few models which can be user created. A user can add a 'bike' , or a 'place' or

How can I share attribute in other class

2015-04-18 Thread Dariusz Mysior
I have two class, and I want use in method first_distribution_cards self.players from first class how can I do this? class Game(object): def __init__(self,name): self.players=[] self.dealer=Person("Dealer") self.name=name class Deck(object): def first_distribution_cards(self): for player

Testing request parameters in Django (“+” behaves differently)

2015-04-18 Thread Eneko Illarramendi
*Previously posted in SO: http://stackoverflow.com/questions/29703930/testing-request-parameters-in-django-behaves-differently* --- I have a Django View that uses a query parameter to so some content filtering. Something like this:

Django Performance

2015-04-18 Thread Jasvir Singh
Hi all. I have an school assignment in which I have to describe a piece of code of any open source software and I am going to write about django login function (django.contrib.auth.views). I have to add "Performance and Drawbacks" also. Can anyone please help me? I need to know how much efficient

Django Server Deployment - OperationalError on shared hosting ASO

2015-04-18 Thread David F
Hi guys!! Great to be a part of the community. So as the title says, I am deploying a site I made locally to a shared hosting server through "A Small Orange" or ASO. My site structure is as follows: don't judge my naming structure :p (unless it actually is messing something up)

Re: Django Server Deployment - OperationalError on shared hosting ASO

2015-04-18 Thread James Schneider
You don't mention running 'manage.py makemigrations' or 'manage.py migrate' in any of your output. The error you are getting indicates that Django has access to a database, but the table schema is incorrect. If you haven't previously run migrate, then you have no tables, which explains the error

Re: Possible bug with django site frameworks swapping between 2 sites every request

2015-04-18 Thread Joe
My question is this a bug? I want to report it if so. Even if disabling caching works, wouldn't still be considered a bug? On Wednesday, April 15, 2015 at 7:04:47 AM UTC-7, Stephen Butler wrote: > > > https://docs.djangoproject.com/en/1.8/topics/cache/#dummy-caching-for-development > > On Wed,

Re: Possible bug with django site frameworks swapping between 2 sites every request

2015-04-18 Thread Stephen J. Butler
I wasn't suggesting that disabling caching was the fix, but just a way to start debugging the issue. Did it go away when you completely disabled the cache? Next step is to enable the cache again and progressively remove caching statements from your app till you find the culprit. For example: 1.

Re: .get() has unexpected behaviour on a queryset after previously applying .order_by().distinct()

2015-04-18 Thread Sergiy Khohlov
Both methods use SQL request s. Try to test using SQL directly. Database has no idea about a returning order. Good result for filter is "nice shot". Adding and deleting objects you broke filter method. Use always order_by for this kind of purpose. 15 квіт. 2015 19:46, користувач "Nick Smith"