Re: Added-value over PHP?

2010-02-06 Thread Brian Neal
On Feb 3, 1:39 am, Delifisek Tux wrote: > > A decent framework eats up your %50 of > cpu resource. For example that Uber Zend FW gives you 1/6 in a hello world > app comparing plain php. Why would you want to write a Hello World program in a framework? Try writing a

Re: Next previous links from a query set / generi views

2010-02-06 Thread Eric Abrahamsen
Yup, if you have non-null date/datetime fields on your model, each model will automatically get "get_next_by_FOO" and "get_previous_by_FOO" methods, where FOO is the name of the datetime field:

Re: Is there a way to access a field's verbose_name from a object_list generic view template?

2010-02-06 Thread Eric Chamberlain
On Feb 6, 2010, at 2:53 AM, Atamert Ölçgen wrote: > On Saturday 06 February 2010 12:23:16 Dennis Kaarsemaker wrote: >> On do, 2010-02-04 at 11:01 -0800, Eric Chamberlain wrote: >>> I'm using the object_list generic view and it seems there should be a >>> way to pull the field verbose_name from

Reversed URLs problem

2010-02-06 Thread adambossy
Hi folks, I'm having trouble with reversed urls when they are being called as template tags. I posted my question on Stack Overflow last week with no adequate responses. I'll copy it here (with slight modifications) for convenience.

Callback method on session timeout

2010-02-06 Thread adamjamesdrew
Does django have the ability to do a callback when a session time out occurs? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to

dynamic dummy image generator for django

2010-02-06 Thread Rolando Espinoza La Fuente
Hi there! I just release an small app that could be useful for some developers. The idea is from http://dummyimage.com/ I just ported to a reusable django app :) It's called the lorem ipsum for images. {% get_dummyimage_url 320 240 png as myimage %} You can see more usage examples here:

Re: Pulling a user to save a form

2010-02-06 Thread kamilski81
No I am not, once the user is logged in I just want to pull the user from there...sort of like this if request.method == 'POST': instance = request.user goal = Goal(user=instance) form = GoalForm(request.POST, goal) if form.is_valid(): form.save()

Re: Pulling a user to save a form

2010-02-06 Thread Daniel Roseman
On Feb 6, 7:00 pm, kamilski81 wrote: > Basically I am doing the following: > >   u=User.objects.get(username="kamilski81") >   goal = Goal(user=u) >   form = GoalForm(request.POST, goal) > > and get this error: > > (1048, "Column 'user_id' cannot be null") > > FROM THE

Re: satchmo customization experiences? customizing existing e-com vs. roll-your-own

2010-02-06 Thread Chris Moffitt
You may get some more answers on the Satchmo list but I assume all those folks are on this list too. I'll attempt to provide some answers here because it's probably of interest to the broader community. Whenever I hear people talking about writing something from scratch, I think about these two

Re: Pulling a user to save a form

2010-02-06 Thread kamilski81
Basically I am doing the following: u=User.objects.get(username="kamilski81") goal = Goal(user=u) form = GoalForm(request.POST, goal) and get this error: (1048, "Column 'user_id' cannot be null") FROM THE front-end... Kamil On Feb 5, 10:43 pm, Dylan Evans

satchmo customization experiences? customizing existing e-com vs. roll-your-own

2010-02-06 Thread snfctech
I'm building an order entry and tracking system for a Food Co-op for their case and special orders. We don't need the system to be on-line (at the moment), but many of the system requirements are already present in many existing e-commerce solutions (product catalog/search, order entry screens,

Re: Pulling a user to save a form

2010-02-06 Thread kamilski81
It pulls the User correctly, and there is an object there...but it won't let me store it on the front-end form, cause user_id is not set or something of that sort. On Feb 5, 10:43 pm, Dylan Evans wrote: > user = User.objects.get(username__exact='bob') > Works fine for

Next previous links from a query set / generi views

2010-02-06 Thread eaman
Hello, I have a quite simple query set and a related generic views: http://dpaste.com/155494/ And template for generating a detail page of a photo. Is there an easy way to have a link to previous | next element in the template without manualy coding a view ? Somthing like a: {% if

Re: Added-value over PHP?

2010-02-06 Thread Vincent
On 3 fév, 16:08, Javier Guerra wrote: > that means, a well-coded framework can be extensive, sophisticated, > even heavy; but still perform very quickly. Thanks much Javier for the feedback. -- You received this message because you are subscribed to the Google Groups

Re: ModelAdmin.get_readonly_fields with ForeignKey's

2010-02-06 Thread Rishabh Manocha
On Sat, Feb 6, 2010 at 10:35 PM, Karen Tracey wrote: > On Sat, Feb 6, 2010 at 6:16 AM, Rishabh Manocha wrote: > >> [snip] >> While this works just fine, the one problem I'm having is that instead of >> showing the title of the book (i.e. - calling

Re: Problem setting up mysqldb 1.2.3c1 on Mac 10.5.8 Leopard

2010-02-06 Thread Sector7B
I had this same problem, i eventually abandoned building any of it manually and switched to macports: http://groups.google.com/group/django-users/browse_thread/thread/862ceed6f97acf1c/eeff8aa5fb16ca0c#eeff8aa5fb16ca0c. If you read the thread no one agrees with me, but its working great for me so

Getting endless redirects when accessing root url

2010-02-06 Thread Jan
Hi everyone, I'm new to Django and tried to set up a little project using flatpages. Here's my url conf: from django.conf.urls.defaults import * from django.contrib import admin admin.autodiscover() from django.contrib.flatpages.views import flatpage urlpatterns = patterns('',

Re: django_evolution evolve not found

2010-02-06 Thread Shawn Milochik
No, I have no connection to South other than using and loving it. I used to do all my DB work manually, so having the Django ORM and South is like someone recognizing that and saying "Good work; we'll take it from here." Shawn -- You received this message because you are subscribed to

Re: update with where clause constraints?

2010-02-06 Thread Karen Tracey
On Sat, Feb 6, 2010 at 8:55 AM, Malcolm Box wrote: > 2010/2/5 Jared Smith > >> My use case is that I'll have multiple users trying to update a set of >> objects and I want to make sure that any user committing a change has >> knowledge of the

Re: ModelAdmin.get_readonly_fields with ForeignKey's

2010-02-06 Thread Karen Tracey
On Sat, Feb 6, 2010 at 6:16 AM, Rishabh Manocha wrote: > [snip] > While this works just fine, the one problem I'm having is that instead of > showing the title of the book (i.e. - calling Book.__unicode__), the admin > simply shows the primary key value of the Book. > >

how to do object lookup using hour ,minute

2010-02-06 Thread jimgardener
hi I am a beginner with python and django and am writing my first application.I need to retrieve some objects of my model class created at different minutes in an hour.The class stores a datetime value in a 'creationtime' ( DateTimeField )and have an associated 'subject' string which can get

Re: Flat file application for binary data?

2010-02-06 Thread John DeRosa
On Feb 5, 2010, at 1:27 PM, Peter Herndon wrote: > FileFields and ImageFields are by default stored on disk, with just a pointer > stored in the db. For more examples, take a look at David Larlet's > django-storages (http://code.welldev.org/django-storages/wiki/Home) and > Justin Driscoll's

Re: Flat file application for binary data?

2010-02-06 Thread John DeRosa
On Feb 5, 2010, at 12:36 PM, Mike Ramirez wrote: > It's built in. > > http://docs.djangoproject.com/en/dev/topics/http/file-uploads/ > > http://docs.djangoproject.com/en/dev/ref/files/storage/ > > Between those two docs, you should be able to do everything you want. AFAIK, > no file

Re: update with where clause constraints?

2010-02-06 Thread Malcolm Box
2010/2/5 Jared Smith > My use case is that I'll have multiple users trying to update a set of > objects and I want to make sure that any user committing a change has > knowledge of the existing state. I was going to model that with a version > number so an update would

Re: Site wide configuration in admin

2010-02-06 Thread Gonzalo Delgado
El 06/02/10 10:11, Matt escribió: > I'd like to provide site wide configuration settings in the admin > panel. > > I'd like users to be able to edit things like the front page text and > specify a featured event (represented by a model). > > How can this be achieved? > Try livesettings:

Site wide configuration in admin

2010-02-06 Thread Matt
Hi all I'd like to provide site wide configuration settings in the admin panel. I'd like users to be able to edit things like the front page text and specify a featured event (represented by a model). How can this be achieved? Thanks -- You received this message because you are subscribed to

Re: Sort by attribute not in database

2010-02-06 Thread ChrisC
On 5 Feb, 21:21, Peter Herndon wrote: > Never forget, Django is Python.  One way to do what you need would be to > implement the __cmp__ special method on your Computer class.  Then, if you > make e.g. a list out of the results of your QuerySet, you can call sort() on >

ModelAdmin.get_readonly_fields with ForeignKey's

2010-02-06 Thread Rishabh Manocha
Hi Guys, I was trying to use the newly introduced ModelAdmin.get_readonly_fields method to mark a OneToOne relation as read only - something along the lines of: models.py: class Book(models.Model): title = models.CharField(max_length = 50) ... def __unicode__(self): return

Re: Is there a way to access a field's verbose_name from a object_list generic view template?

2010-02-06 Thread Atamert Ölçgen
On Saturday 06 February 2010 12:23:16 Dennis Kaarsemaker wrote: > On do, 2010-02-04 at 11:01 -0800, Eric Chamberlain wrote: > > I'm using the object_list generic view and it seems there should be a > > way to pull the field verbose_name from the model, without having to > > hard code the name in

Re: django-app user clashes with python-module user

2010-02-06 Thread patrickk
thanks mike & jeff. this very much solves my problem. regards, patrick On 6 Feb., 06:14, newspaper-django-lackey wrote: > Naming conflicts are a consistent issue brought up on the boards. I've > had issues several times where an app name conflicted with a core >

Re: Is there a way to access a field's verbose_name from a object_list generic view template?

2010-02-06 Thread Dennis Kaarsemaker
On do, 2010-02-04 at 11:01 -0800, Eric Chamberlain wrote: > I'm using the object_list generic view and it seems there should be a > way to pull the field verbose_name from the model, without having to > hard code the name in the template. model_class_or_instance._meta.verbose_name

Re: When does syncd create new tables

2010-02-06 Thread Dennis Kaarsemaker
On do, 2010-02-04 at 11:31 -0800, Joakim Hove wrote: >c) I tried to recreate the tables with "./manage.py syncdb" - > but to no avail, nothing happened? syncdb only creates new tables and does not modify the schema of existing ones. > Any tips on what I am doing wrong greatly