In pre 1.4 projects, it was common for projects to have multiple ways to import stuff; because the project path, and the path 1 level up were both in the python path.
This way, you can actually have 2 versions of the module imported, and hence your singleton breaks (depending on the route taken to access the object). Please make sure your imports are consistent, and your `sys.path` is clean. Greetings, Diederik Op 5 nov. 2012, om 19:07 heeft drunksaint het volgende geschreven: > I am currently using a DJango - apache installation (on mod_wsgi) to run a > website (project) which hosts an intranet cards game, whose rules are > complicated enogh that it requires only 1 master list+dict data structure of > scores for each user. Individual user's score can be impacted by other users > actions also. I am using a Score class which I instantiate in urls.py and all > players / users access this class' object [scObj = Scorer('Spades') ]. > internally in this obj there are Dicts of players actions, score updates etc > etc. > > class Scorer: > def __init__(self, suitname): > self.__suitname = suitname > The scorer class is separately stored in Scorer.py > > scObjs = (Scorer('Spades'), Scorer('Hearts'), Scorer('Clubs'), > Scorer('Diamonds'),) > The objects are created in urls.py > > This model was running perfectly in the DEV deployement. When I moved to PROD > in apache, this broke (as in there are multiple instances of scObj being > created, so a score update from player-1's move on player-2 is not reflected > in a different move by player-3 on player-2) . I need to simulate a singleton > class behaviour / global scObj behaviour, which I am not able to do. I am > running apache in worker - mpm - multithreaded mode, so I assume that the > problem of multiple copies of scObj being there due to multi-process is not > there. > > Is the problem related to mod_wsgi? > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/django-users/-/omNsLiRhcpkJ. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.