RE: Tutorial Help!

2012-11-03 Thread lacrymol...@gmail.com
Wasn´t a 'myproject' directory created where you ran the command? -Mensaje original- De: almel Enviados: 03/11/2012 06:21:19 Asunto: Tutorial Help! I'm new to Django and trying out the tutorial and almost immediately getting stuck. I'm running django version 1.5, python version 2.7.2,

RE: Displaying a custom field (PickledObjectField) in the admin

2012-10-24 Thread lacrymol...@gmail.com
The short of it is that you should probably subclass the picklefield to add some new validation (basically is_integer_two_tuple_list), and write a custom widget for it that does what you want on the html side. The long of it needs not being written from a phone -Mensaje original- De: A

RE: Best way to detect if a user has changed password

2012-10-24 Thread lacrymol...@gmail.com
If you hook into pre_save, you can compare agaist the DB with MyModel.objects.get(id=object.id) I think there might be a way of checking directly on the instance if a field's been changed in 1.4 -Mensaje original- De: Roarster Enviados: 24/10/2012 18:23:15 Asunto: Best way to detect

RE: Is there any small and easy website example available for Django?

2012-10-09 Thread lacrymol...@gmail.com
First of all, djangobook.com is outdated, and not recommended, at least last time i checked it. Secondly, for what seems to be your need, i'd recommend django-cms or some other cms application for django since without some kind of cms app, building a static content site would rapidly become, i

RE: when is a Context Processor called?

2012-10-09 Thread lacrymol...@gmail.com
For this example in particular, if you have django's UserMiddleware active, and that code assumes you do, you can always do request.user.get_profile() without needing to add this custom middleware -Mensaje original- De: Marek Brzóska Enviados: 09/10/2012 09:28:16 Asunto: Re: when is a

RE: How to override an attribute?

2012-08-04 Thread lacrymol...@gmail.com
It's hard to say without the real ino, and not kowing why you want the info to be a field, I see no good reason you´d want a db field where all instances of a given model would share the same value. But assuming you just want to set up a default, and be able to override it at will, you can al

RE: REMOVE ME

2012-07-29 Thread lacrymol...@gmail.com
Remove yourself, you oaf. Every email from the list comes with instructions to do it. -Mensaje original- De: Andrew Miller Enviados: 29/07/2012 02:47:32 Asunto: REMOVE ME On Sun, Jul 29, 2012 at 10:43 AM, forthfan wrote: > Hi all, > > Being lazy, I want Django to validate the stuff

RE: one field of modelForm doesn't being displayed

2012-07-18 Thread lacrymol...@gmail.com
Show us the model and form code -Mensaje original- De: mapapage Enviados: 18/07/2012 07:48:59 Asunto: one field of modelForm doesn't being displayed I confront a strange situation since one field of my modelForm doesn't being displayed (only its label is) so I can't put a value there

RE: Hierarchy Model

2012-07-15 Thread lacrymol...@gmail.com
Put 'Employee' or if that fails, 'appname.Employee' with the quotes, as a string literal, this works for self-reference and reference loops. -Mensaje original- De: Andre Terra Enviados: 15/07/2012 13:30:05 Asunto: Re: Hierarchy Model I recommend using django-mptt. I can't link to it

RE: Query Distance from User

2012-07-15 Thread lacrymol...@gmail.com
It highly depends on what you want to do, the extension of the area you want to cover, and things like that. There's different projection systems for each area in the world, and making distance calculations on those projections is much faster than on global (lat lon) coordinates, but they're no

RE: Set two fields to the same value

2012-07-12 Thread lacrymol...@gmail.com
You could override .save... -Mensaje original- De: Jaroslav Dobrek Enviados: 12/07/2012 10:51:08 Asunto: Set two fields to the same value Hello, how can I design a model such that two fields are set to the same value when a new object of the type defined by the model is created? Exa

RE: masking only a small part of a template

2012-07-09 Thread lacrymol...@gmail.com
I think he means to override a template without changing it's name (since you don't control 3rd party app's views and the templates they call, most times). I've found a snippet to do this as {% extends "app:template/path.html" %}, a custom template loader. I don't have the code right now, but m

RE: how to use HTTPS with django

2012-07-09 Thread lacrymol...@gmail.com
Middleware is most certainly *not* hacks! They're an intended and perfectly documented hook point for any special behavior you'd like in your webservice that makes sense inserting at that particular point of the request processing -Mensaje original- De: Thomas Orozco Enviados: 08/07/20

RE: Problem with DetailView

2012-07-08 Thread lacrymol...@gmail.com
To do what? I'm trying to lead you to conclussions, but i seem to be leading you to confusion instead. You should read the generic views docs again. For any single object view, the default object name is 'object', unless you set the context_object_name parameter. The list view calls it 'object

RE: Problem with DetailView

2012-07-08 Thread lacrymol...@gmail.com
More data would be nice. What url are you goimg to that's failing, exactly? Are you clicking a link from your ListView? If so, could you show your template? -Mensaje original- De: Soviet Enviados: 07/07/2012 18:10:17 Asunto: Re: Problem with DetailView But the ListView is working fine

RE: Calling model methods from templates

2012-07-06 Thread lacrymol...@gmail.com
Abigger piece of your model would be nice, but arent you missing a "self" in that method definition? TypeErrors would fail silently in the templates -Mensaje original- De: Kevin Enviados: 06/07/2012 16:37:04 Asunto: Re: Calling model methods from templates I should mention this is hap

RE: cannot access admin

2012-07-04 Thread lacrymol...@gmail.com
Are you running admin.autodiscover? Does the admin homepage (/admin/) show your apps? -Mensaje original- De: Scott Somers Enviados: 04/07/2012 14:18:45 Asunto: cannot access admin So I don't normally spam forums/ mailing lists etc for help but I really screwed something up. Basicall