Hello,
I had some copies of a model with 10 fields serialized in a file.
I deleted some of the fields (since I don't need them anymore) now I
can't deserialize the model.
error: raise FieldDoesNotExist, '%s has no field named %r' %
(self.object_name, name)
Any help, please.
Luis
--
You recei
I have this structure:
class Album(models.Model):
caption = models.CharField(max_length=500)
def get_album_type(self):
if self.a_set.count() > 0: return 'a'
if self.b_set.count() > 0: return 'b'
def _get_a(self):
return self.a_set.all()[0]
def _get_b(self):
s__ of the model, but seems one can
> manually filter it afterwords:
>
> qs = Player.objects.all()
> for i,obj in enumerate(qs):
> if obj.__class__ != Player:
> del(qs[i])
>
> On Nov 22, 4:32 pm, lfrodrigues wrote:
>
> > Hello,
>
>
Hello,
I have these models:
class Player(models.Model):
.
class PlayerM(Player):
...
If I do PlayerM.objects.all() e get all PlayerM objects and for
Player.objects.all() I get all Player and PlayerM as expected.
How can get only the objects of type Player (only retrieve the objects
Hello,
I've been using admin to create/change some objects in my company.
Now I have a new set of users that will be able to change objects but
a moderator needs to approve the changes. Do you have any suggestion
on how to implement this?
Best regards,
Luis
--
You received this message becaus
Hello,
I'm not sure this is possible but I would to save a oracle connection
across several requests (like I do with a normal object)
I would like to:
if 'object' in request.session:
do stuff
else:
import cx_Oracle
conn = cx_Oracle.connect(constring)
request.session['object'] = conn
do stu
Hi,
I want to deploy 2 django sites in different subdirectories so I have:
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE admin.settings
PythonDebug On
PythonOption django.root /admin
SetHandler
the only similar query I managed to make using the
ORM.
On Aug 12, 3:44 am, Russell Keith-Magee
wrote:
> On Wed, Aug 12, 2009 at 5:50 AM, lfrodrigues wrote:
>
> > Hi,
>
> > I'm having some problems with "having":
>
> > I want to group by date and re
Hi,
I'm having some problems with "having":
I want to group by date and restrict to a given week, in my tests I
can do this:
select_data = {"d": """date_format(date, '%%U')"""}
ScoreHistory.objects.extra(select=select_data).values('d').annotate
(l=Sum("points")).filter(l=2).query.as_sql()
sql:
Hello,
All my previous projects I've deployed them on the root of a web
address. Now I have to deploy two in the same address eg:
http://myserver.com/proj1
http://myserver.com/proj2
I'm using django.root to set the correct root (with works fine). I
just have two questions:
1 - all the media are
Hi,
I've developed a special Auth backend for a internal communication
protocol. Everything was ok but now the requirements changed and I
need to allow on the same browser (in diferent tabs) several logged
users.
How can I have (in the same browser process) several logged users at
the same time?
Isn't there any way to cache profile data on User side? When are you
planning on closing 7270?
A lot of my code uses get_profile in templates and that is always a
query. Isn't it possible to optimize this?
On Aug 3, 3:45 pm, lfrodrigues wrote:
> Ok Thanks
>
> On Aug 3
Ok Thanks
On Aug 3, 12:12 pm, Malcolm Tredinnick
wrote:
> On Mon, 2009-08-03 at 02:48 -0700, alant...@neei.uevora.pt wrote:
> > Hello,
>
> > I'm displaying lot of user profile picture with are on a user profile
> > (i'm using contrib.auth). So for each picture I have a query for the
> > user pr
13 matches
Mail list logo