using return upper

2011-02-01 Thread makayabou
Hello, I'm trying to modify my admin.py from my app "ordis": from ordis.models import Ordi, Maintenance, OperatingSystem from django.contrib import admin #class MaintenanceAdmin(admin.ModelAdmin): #list_display = (???) here I would like to see my Computer id, and the OS installed on it d

Re: using return upper

2011-02-01 Thread makayabou
Hello, With your stuff, it still shows me (None). You are right, Ordi means Ordinateur (computer) Florian On 1 fév, 13:40, Tom Evans wrote: > On Tue, Feb 1, 2011 at 10:32 AM, makayabou wrote: > > Hello, > > I'm trying to modify my admin.py from my app "ordis":

Re: using return upper

2011-02-01 Thread makayabou
Hello, I try to simplify the problem. This model gives me a (None) result: class OperatingSystem (models.Model): operatingsystem = CharField (max_length=30, blank=True, null=True) def __unicode__(self): return "%s" % (self.operatingsystem) class Ordi(models.Model):

Re: using return upper

2011-02-02 Thread makayabou
uot; % (oses_installed)) class MaintenanceAdmin(admin.ModelAdmin): list_display = (renvoi_os,) Thanks for your help On 2 fév, 03:31, Rainy wrote: > On Feb 1, 6:12 pm, makayabou wrote: > > > > > Hello, > > I try to simplify the problem. > > > This model gives me a

view queryset object in admin view

2015-04-12 Thread makayabou
# Je voudrais, dans ma vue admin, avoir un affichage clair des maintenances # effectuées, qui corresponde à __unicode__ définie dans Ordi # mais j'ai : In admin view, I would like to get a clear list of results, as defined in __unicode__ from class User. Instead, I get: > I just need Jean Duboi

Re: view queryset object in admin view

2015-04-12 Thread makayabou
Hello, Sorry for the previous send unattended... I have problems trying to print values of a QUerySet Object in Admin View. In admin view, I would like to get a clear list of results, > as defined in __unicode__ from class User. > Instead, I get: > > > > > I just need Jean Dubois.. > > Here's th

Re: view queryset object in admin view

2015-04-13 Thread makayabou
uld define and set the attribute name with > something like a textfield > On Apr 13, 2015 3:21 AM, "makayabou" > > wrote: > >> Hello, >> >> Sorry for the previous send unattended... >> >> I have problems trying to print values of a QUerySet

Re: view queryset object in admin view

2015-04-13 Thread makayabou
mport admin from users.models import User, PC class PCAdmin(admin.ModelAdmin): list_display = ('users','id') class UserAdmin(admin.ModelAdmin): list_display = ('name','mypc') admin.site.register(User, UserAdmin) admin.site.register(PC, PCAdmin) /]

Re: view queryset object in admin view

2015-04-13 Thread makayabou
Thank you Jani, it solved it! I was just loosing around, I finally got it... thanks all On Monday, April 13, 2015 at 2:29:36 PM UTC+2, makayabou wrote: > > I made a clearer and full sample code. > When I use the code as is, I get results in a poor readable > format in PCAdmin view >

classic: unsupported operand type(s) for +: 'int' and 'NoneType'

2015-04-13 Thread makayabou
Hello, I'm sorry for that trivial problem, but I'm still a bit lost... [code] #In models.py: class Ordi(models.Model): RAM_CAP_1 = 1024 RAM_CAP_2 = 2048 RAM_CAP_CHOICES = ( (RAM_CAP_1, u'1G'), (RAM_CAP_2, u'2G'), ) ram_1 = models.IntegerField("memory slot 1", max_length=10, choices=RAM_CAP_CHOIC

Re: classic: unsupported operand type(s) for +: 'int' and 'NoneType'

2015-04-13 Thread makayabou
It's ram_tot = self.ram_1 + self.ram_2 that returns me "cannot contenate int and NOne On Monday, April 13, 2015 at 10:05:49 PM UTC+2, makayabou wrote: > > Hello, > I'm sorry for that trivial problem, but I'm still a bit lost... > > [code] > #In