Why use CustomUserManager.create_user and not CustomUserManager.create?

2019-02-17 Thread Maarten Nieber
where the hook can be used to implemented custom behaviour (so that at least we have only 1 function to create users). Would this be a better design? Or is the current design the correct one, and am I missing something? (in that case, please elaborate) Best regards, Maarten -- You received

Re: Geometry vs Geography Data Type for PostGIS PostgreSQL database

2012-10-21 Thread Maarten Japink
I would use geography. You never know from where the user is coming, so you don't know the limitations of the projection. If you need extra functionality you can always transform to the most appropriate projection. 2012/10/21 JJ Zolper > Hello, > > So I've been researching the pros and cons fo

Re: model can return a count but no data

2012-03-18 Thread Maarten Japink
Great! this works. Thank you so much Kevin. 2012/3/18 Kevin Wetzels > > On Sunday, March 18, 2012 12:55:31 PM UTC+1, Maarten Japink wrote: >> >> I 'm working on a taxonomie. >> These are my models: >> >> class Classificatie(models.Model): >

model can return a count but no data

2012-03-18 Thread Maarten Japink
I 'm working on a taxonomie. These are my models: class Classificatie(models.Model): name=models.CharField(max_length=60) def __unicode__(self): return self.name class Taxonomie(models.Model): name=models.CharField(max_length=60) level=models.ForeignKey(Classificatie)

Re: Deploying Django tutorial part 4, redirecting problem, apache error

2009-02-11 Thread Maarten Kossen
Shouldn't it be pointed out in the tutorial that if you use a non-root path for your django-installation, the hard-coded form-action won't work? On Feb 10, 2:27 pm, "a...@amos-site.org.uk" wrote: > Where exactly do you put this I'm guessing in the file, but a bit of > context would be appreciate

Re: Problems setting mutliple filter for a model

2008-01-21 Thread Maarten
Hey, I'd like to help out. But there is limited information to go on. Those options, are that all seperate attributes of your object, or is it one more general 'description' attribute with those different options. How do you want to filter it, when and what exactly? I'm thinking you want to app

Re: A bug (I'm being rejected from submitting a ticket, as it thinks I'm a spammer. I'M NOT!

2008-01-16 Thread Maarten
Just on another note, it doesn't seem that smart to me to use a CharField(max_length=600) for a primary key. I'd use the normal id as primary key, and if you need to use the url actively in searches I'd consider adding an index on the url field. cheers, Maarten On Jan 15, 4

Re: advice on table joins

2008-01-10 Thread Maarten
Hi, I'm notan expert with django yet, but I do recommend to keep your models and not throw everything into 1 big model. The relations are powerfull, don't throw it out even if it means having to write a nest or two. Let's use the following model to look into this: Models: A, B and C. C is a pa

Re: Passing data when using render_to_response

2008-01-08 Thread Maarten
Hello """ def songs(request): songs_listing = [] for songs_list in Song.objects.all(): songs_dict = {} songs_dict['list_object'] = songs_list songs_listing.append(songs_dict) return render_to_response('songs/songs.html', { 's

Re: passing data to view using httpresponseredirect

2008-01-04 Thread Maarten
esponseredirect else: rendertoresponse(... { 'error_list':getErrors, 'message_list':getMessages}) cheers, Maarten On Jan 3, 7:38 pm, Peter Rowell <[EMAIL PROTECTED]> wrote: > I didn't like my own explanation and did a little more searching. > > I just

Re: How especify the default form (html)

2008-01-04 Thread Maarten
Ah, just to be clear: the request.POST.has_key('name') searches for the name of the tag and value is what you get when doing you_get = request.POST['name'] On Jan 4, 10:14 am, Maarten <[EMAIL PROTECTED]> wrote: > Hi, > > I have a view with that also requires

Re: How especify the default form (html)

2008-01-04 Thread Maarten
ency a bit), it's not as clean though. try: request.POST['whatever_field_you_need'] ... except KeyError, e: try: request.POST['the_second_fields_you need] except KeyError, e: etc... Ok, now that I've written this bit down I'm actually going to change this last thing

Re: Foreignkey relationship trouble

2008-01-03 Thread Maarten
"...", category = request.POST['id']) Don't know if this is exactly what you are asking, but it should help out. Regards, Maarten hern42 schreef: > Hello, > I have an issue (it might be a beginner issue, if so I am sorry... > please point to the chapter in the doc)

passing data to view using httpresponseredirect

2008-01-03 Thread Maarten
quot;wrong syntax in entry: %s"%line) return HttpResponseRedirect('/stock/new/') else: errors.append("Please specify a PO") return render_to_response('stock/stock_new.html', {'error_list':errors, 'po_list':PO.objec