Re: how do I model an auto-populate name from admin authorised users list

2012-02-10 Thread Krondaj
Can anybody help me here??? On Feb 3, 9:40 am, Krondaj <c.d.smi...@gmail.com> wrote: > Hi, > > I have written a model for a web form (of sorts) I'm making that > people can fill in from the admin site.  I have set permissions from > the admin end so they can only writ

how do I model an auto-populate name from admin authorised users list

2012-02-03 Thread Krondaj
Hi, I have written a model for a web form (of sorts) I'm making that people can fill in from the admin site. I have set permissions from the admin end so they can only write or change new posts of the form (see http://dpaste.org/BZ5Nm/). it's still work in progress but I have two problems.

Re: model for uploading a file - not working??

2012-01-25 Thread Krondaj
ad_to 'documents') >                                                                               >                   ^. >SyntaxError: invalid syntax Idon't know why i'm getting this error, or what i'm doing wrong On Jan 25, 3:54 pm, Krondaj <c.d.smi...@gmail.com> wrote: > in my model i'm using: > > from django.db import models, datetime, M

Re: model for uploading a file - not working??

2012-01-25 Thread Krondaj
ad_to 'documents') >                                                                             >           ^. >SyntaxError: invalid syntax Idon't know why i'm getting this error, or what i'm doing wrong On Jan 25, 3:54 pm, Krondaj <c.d.smi...@gmail.com> wrote: > in my model i'm using: > > from django.db import models, datetime, M

Re: model for uploading a file - not working??

2012-01-25 Thread Krondaj
ad_to 'documents') >                                                                             > ^. >SyntaxError: invalid syntax Idon't know why i'm getting this error, or what i'm doing wrong On Jan 25, 3:54 pm, Krondaj <c.d.smi...@gmail.com> wrote: > in my model i'm using: > > from django.db import models, datetime, MEDIA_ROOT > > class Rrs

Re: model for uploading a file - not working??

2012-01-25 Thread Krondaj
ad_to 'documents') > ^. > >SyntaxError: invalid syntax i don't know what i've done wrong, and why i'm getting this error On Jan 25, 3:54 pm, Krondaj <c.d.smi...@gmail.com> wrote: > in my model i'm using: > > from django.db import models, datetime, MEDIA_ROOT > > class Rrs

Re: model for uploading a file - not working??

2012-01-25 Thread Krondaj
upload_doc = models.FileField(upload_to 'documents') ^ On Jan 25, 3:54 pm, Krondaj <c.d.smi...@gmail.com> wrote: > in my model i'm using: > > from django.db import models, datetime, MEDIA_ROOT > > class RrsForm(models.Model): > # > >     upload_doc = models.

Re: model for uploading a file - not working??

2012-01-25 Thread Krondaj
the arrow should be pointing at the last quote at ') like this (hopefully): File "/home/chrissmith/Dcode/rrws/rrs/models.py", line 36 upload_doc = models.FileField(upload_to 'documents') ^ SyntaxError: invalid syntax Any idea's?? On Jan 25, 3:54 pm, Krondaj <c.d.smi...@gma

model for uploading a file - not working??

2012-01-25 Thread Krondaj
in my model i'm using: from django.db import models, datetime, MEDIA_ROOT class RrsForm(models.Model): # upload_doc = models.FileField(upload_to 'documents') I get this error when I run (before running syncdb): python manage.py sql rrs I get: File

Re: django docs __unicode__ return u'%s %s

2012-01-25 Thread Krondaj
(self): return u'{}  {} {} {}'.format(self.project_and_task, self.project_number, self.date_created, self.requested_by) is the two spaces between each {} two seperate the individual strings with two spaces? Krondaj On Jan 25, 11:11 am, "Petr Přikryl" <prik...@atlas.cz> w

is this the correct way to form a model of my data?

2012-01-24 Thread Krondaj
ed, self.requested_by) # may change requested_by to: # requested_by = models.ForeignKey(Person) # ## and then add a Person class after the RrsForm class? # #class Person(models.Model) #first_name = models.CharField(max_length=50) #last_name = models.CharField(max_length=50) # # END OF COD

Re: django docs __unicode__ return u'%s %s

2012-01-24 Thread Krondaj
sorry bottom line should be? as I believe if you take the top example you should be able to do: def __unicode__(self): return (self.first_name, self.last_name) On Jan 24, 11:04 pm, Krondaj <c.d.smi...@gmail.com> wrote: > Hi, > > in the django docs about __uni

django docs __unicode__ return u'%s %s

2012-01-24 Thread Krondaj
) If there is no documentation (for dummies) can anyone explain it to me?? Thanks Krondaj -- 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

Debug = false ruins template

2012-01-23 Thread Krondaj
Hi, After going through to tutorial 3 there is a little bit about setting DEBUG = False to redirect the the 404.html. I have set this, but now the template from the tutorials (also in / admin/) has changed and is not as 'pretty' or well laid out as before. Can someone tell me what has happened

Forms for work request sheets

2012-01-19 Thread Krondaj
Hi, i have completed the tutorials for Django... Unfortunately, as I've only been learning python/django for about 1 week now. I'm a little stuck i would like to make an internal webform (at work, run from my computer - or a new one if successful) that basically people fill in to request

what is the best IDE to use for Python / Django

2012-01-19 Thread Krondaj
Hi, I was wondering what the best IDE to use for Python / Django would be? I am currently using Geany, but i'm sure there is a better (hopefully free) one out there!?! Regards, Chris -- You received this message because you are subscribed to the Google Groups "Django users" group. To post

tutorial 2 admin site problem

2012-01-18 Thread Krondaj
Hi, I have just started tutorial part 2 and in part 2.4.1. I have added django.contrib.admin to the INTALLED_APPS part of mysettings.py I syncd the db I uncommented the requierd three lines from urls.py in mysite folder I ran the runserver, and go to 127.0.0.1:8000, using chromium This is what

Re: I'm stuck on the first tutorial!! - Please HELP!!!!!!!!!!!!

2012-01-16 Thread Krondaj
n, Jan 16, 2012 at 4:31 PM, Krondaj <c.d.smi...@gmail.com> wrote: > > Hi, This is what I have written, which I believe is the correct > > indentation: > > --From Geany editor- > > [ ... ] > > does anyone have any oth

Re: I'm stuck on the first tutorial!! - Please HELP!!!!!!!!!!!!

2012-01-16 Thread Krondaj
! p.s. should it be four spaces per indent (instead of tabs) for python in general, or is this a Django thing? K On Jan 16, 4:31 pm, Krondaj <c.d.smi...@gmail.com> wrote: > Hi, This is what I have written, which I believe is the correct > indentation: > -

Re: I'm stuck on the first tutorial!! - Please HELP!!!!!!!!!!!!

2012-01-16 Thread Krondaj
elf.question > > def was_published_today(self): >     return self.pub_date.date() == datetime.date.today() > > > > > > > > On Tue, Jan 10, 2012 at 2:11 AM, Nasir Rasul <nasir.ra...@gmail.com> wrote: > > check your indentation. > >    def __unicode__(self)

I'm stuck on the first tutorial!! - Please HELP!!!!!!!!!!!!

2012-01-09 Thread Krondaj
On page 19 of the Django documentation release 1.3.1 It tells you to add import datetime #... class Poll(models.Model): def was_published_today(self): return self.pub_date.date() == datetime.date.today() I have added this to the models.py code as including the other __unicode__