Re: How to establish foreign key contraints across models living in different applications

2009-09-27 Thread pkenjora
Guillermo, Having one application depend on another is OK. If your are writing a generic reusable application that other can download and plug in then generic keys may be the way to go. If however, you are simply having one of your own apps depend on another I strongly suggest not using gener

Re: Custom Command as cron

2009-09-27 Thread pkenjora
Here is an example of a complete script that does this: http://blog.awarelabs.com/2007/using-django-models-in-batch-jobs/ You will need to know the complete path to Django. In the CRON you now do not need to set PYTHONPATH for Django because it is set in the actual script. -Paul On Sep 24, 10

Re: Using Admin features on other applications

2009-06-07 Thread pkenjora
Hi, You can use just the models and Django admin by itself. So if you just want back end support run Django on top of your existing DB and implement only the admin and models pieces. The development version of Django (svn) allows you to extend the Django admin if you need better integration

Re: Type Error str is not callable in base.py

2009-06-07 Thread pkenjora
Hi, I just got this error a few days back. It was resulting from a OnetoOne model referencing 'user' in one of the admin display_fields. I thought user would resolve to the __unicode__ value of the user model, for some reason (django bug?) it does not. THE FIX This is more like a patch,

Re: how to use email instead of username for user authentication?

2009-04-12 Thread pkenjora
can include project specific requirements in a framework? The implementation you are advocating is a subset of the general implementation I would like to see bundled out of the box. Why not move it into an optional module? -Paul On Apr 11, 4:13 pm, Malcolm Tredinnick wrote: > On Sat, 2009-04-11

Re: how to use email instead of username for user authentication?

2009-04-11 Thread pkenjora
te: > On Tue, 2009-04-07 at 10:16 -0700, pkenjora wrote: > > Hi, > > >   Why not remove the '@' filter and allow the specific project > > developer the freedom to use email as username?  What was the > > reasoning behind this? > > One reason is that userna

Re: how to use email instead of username for user authentication?

2009-04-07 Thread pkenjora
.. http://code.djangoproject.com/ticket/7591 Should we re-open the ticket? Either way, if you want email authentication leave feedback... -Paul On Apr 7, 10:16 am, pkenjora wrote: > Hi, > >   Why not remove the '@' filter and allow the specific project > developer the free

Re: how to use email instead of username for user authentication?

2009-04-07 Thread pkenjora
Hi, Why not remove the '@' filter and allow the specific project developer the freedom to use email as username? What was the reasoning behind this? I always like Django because it didn't try to force development down a specific path. All developers have their own way and every project is

Re: pagination problem with "Next" and saving results as a dictionary

2009-03-13 Thread pkenjora
Uhm maybe this post will help its a tag that handles the pagination on query objects. I've used it in a few of my projects and its quite handy. http://blog.awarelabs.com/?p=29 -Paul On Mar 13, 12:13 pm, Jesse wrote: > Hello Micah, > > I can get the q with GET, but I have too complicated o

Re: "setup_environ" can't help to run a standalone script

2009-02-15 Thread pkenjora
Hi, You need to define the settings file on top of the python path and the path to your settings file. Start with the xample in the post below... http://blog.awarelabs.com/?p=15 Once you get it to work, back out some of the paths until you find the minimum you need. You will need to type

Re: Trouble adding custom view to admin-site instance

2009-02-15 Thread pkenjora
Hi, There is always more than one way to do anything. For reference you may be interested in a custom action (not view) approach within admin... http://blog.awarelabs.com/?p=75 I've used this for one click emails or custom user reports. May be a bit dated but still useful... "Custom Actio

Re: Changing the name of a project

2009-02-15 Thread pkenjora
Hi, Try using the django-admin.py runserver ... --settings=.., I abandoned manage.py several projects ago as it consistently did not work for me. Mainly because I typically don't start with a fresh project every time, I copy existing ones and modify. If that works then we may need to fi