Random auth_permission + content_type errors during test runs

2014-04-02 Thread Greg Taylor
I've got a project running Django 1.4, Postgres 3, Python 2.7. Our tests get about halfway through, then we get a sudden flood of errors showing that the django_content_type table may be empty: ..

Auth section not showing in admin interface

2009-01-21 Thread Greg Taylor
Does anyone have any idea why the "Auth" section wouldn't show up in the admin display? Here's my APPS: INSTALLED_APPS = ( 'django.contrib.sites', 'django.contrib.admin', 'django.contrib.admindocs', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sess

Store python modules in a DB model

2009-01-17 Thread Greg Taylor
This is more of an experiment than anything, but I've got a model as such to store python modules: class StoredModule(models.Model): name = models.CharField() text = models.TextField() I want to be able to pull one of these and get access to the 'text' field as if it were a module. I can't

Re: FTP'ing without locking

2008-12-17 Thread Greg Taylor
Keith-Magee" wrote: > On Thu, Dec 18, 2008 at 7:55 AM, Greg Taylor wrote: > > > Yeah, I was afraid this would be the case. The interval polling script > > was something I really wanted to avoid. > > > I can't believe this isn't possible, though. I assu

Re: FTP'ing without locking

2008-12-17 Thread Greg Taylor
Dec 18, 2008 at 6:15 AM, Greg Taylor wrote: > > > This is somewhat of a core Python question with a Django twist. I'm > > running mod_wsgi and am trying to figure out how to FTP a file from my > > Django app to a remote host without locking the thread up. I've tried

FTP'ing without locking

2008-12-17 Thread Greg Taylor
This is somewhat of a core Python question with a Django twist. I'm running mod_wsgi and am trying to figure out how to FTP a file from my Django app to a remote host without locking the thread up. I've tried something like: from subprocess import Popen print Popen(["python", command_str, "53363"

Re: Django new comments framework error

2008-11-19 Thread Greg Taylor
I've been seeing this same exact issue, even after completely deleting and re-exporting Django and my project's source (minus all .pyc files). It appears to be something else that's being buried by that non-descriptive error message. On Oct 1, 2:53 pm, hotani <[EMAIL PROTECTED]> wrote: > It's bac

Re: Forms problem?

2008-08-28 Thread Greg Taylor
te, whereas Django is expecting a datetime.datetime.  Does that > make sense?  Perhaps you are passing in something like > "datetime.date.today()" where you should be passing in something like > "datetime.datetime.now()".  Or else maybe your field really should be a d

Re: Forms problem?

2008-08-28 Thread Greg Taylor
ideas, I'm all ears, this is a bit of a showstopper for me. Thanks! Greg On Aug 28, 10:31 am, Daniel Roseman <[EMAIL PROTECTED]> wrote: > On Aug 28, 3:01 pm, Greg Taylor <[EMAIL PROTECTED]> wrote: > > > I'm getting the following error on some of my models

Re: Database schema migration - any tools available?

2008-08-28 Thread Greg Taylor
There are quite a few that take different approaches. Your best bet may be to use the search feature with the keywords 'schema migration' within the group. On Aug 28, 10:05 am, Alex <[EMAIL PROTECTED]> wrote: > Hi all, > > I have a migrations tool made by me for an internal project. > I couldn't

Forms problem?

2008-08-28 Thread Greg Taylor
I'm getting the following error on some of my models with DateTimeFields. Any ideas? Traceback (most recent call last): File "/home/clemsoncrew/site-packages/django/core/handlers/base.py", line 86, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/home/

Determining Multi-Table Child Type

2008-07-04 Thread Greg Taylor
So I've got a Multi-Table parent model, CalendarEvent, and two child models: Regatta and Meeting. I've got a calendar view that shows all of the upcoming events like this: events = CalendarEvent.objects.all() But I want to determine what kind of event each of these are (Regatta or Meeting) from

User Filtering

2008-06-26 Thread Greg Taylor
I've got a model that represents a boat of rowers which has eight seats (order is important). The easiest way to handle this was a model with eight foreign keys: class Boat(models.Model): seat_1 = models.ForeignKey(User) [...] seat_8 = models.ForeignKey(User) Which is fine and great, but n

Re: Multi-Table Saving Duplicates in Admin?

2008-06-14 Thread Greg Taylor
Thanks! Any idea if this issue appears outside of the admin interface with newforms in a regular view? This isn't a show-stopper if that's a case, just a speed bump. Thanks again, Greg On Jun 14, 2:43 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Sat, Jun 14,

Multi-Table Saving Duplicates in Admin?

2008-06-14 Thread Greg Taylor
Hello all, I'm running Django trunk, and have noticed that editing and saving an object in the admin interface (an object that is a multi-table child model) results in a duplicate object with the new attributes appearing. It should just set your new values on the existing object rather than creat

Re: Multi-table Models and Fixtures

2008-06-09 Thread Greg Taylor
That clears it up perfectly. This is great to have working, thanks again! Greg On Jun 9, 10:19 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On Mon, Jun 9, 2008 at 10:09 PM, Greg Taylor <[EMAIL PROTECTED]> wrote: > > > Wonderful, I'll be able

Re: Multi-table Models and Fixtures

2008-06-09 Thread Greg Taylor
MAIL PROTECTED]> wrote: > On Mon, Jun 9, 2008 at 8:12 PM, Russell Keith-Magee > > > > <[EMAIL PROTECTED]> wrote: > > On Mon, Jun 9, 2008 at 8:06 PM, Greg Taylor <[EMAIL PROTECTED]> wrote: > > >> Much appreciated, Russ! I was not sure whether I was doing

Re: Multi-table Models and Fixtures

2008-06-09 Thread Greg Taylor
Excellent news, I appreciate it very much! On Jun 9, 8:12 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On Mon, Jun 9, 2008 at 8:06 PM, Greg Taylor <[EMAIL PROTECTED]> wrote: > > > Much appreciated, Russ! I was not sure whether I was doing something

Re: Multi-table Models and Fixtures

2008-06-09 Thread Greg Taylor
more details. Thanks again, Greg On Jun 8, 9:39 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On Mon, Jun 9, 2008 at 12:09 AM, Greg Taylor <[EMAIL PROTECTED]> wrote: > > > I've submitted a bug about this since I haven't been able to turn up >

Re: Multi-table Models and Fixtures

2008-06-08 Thread Greg Taylor
I've submitted a bug about this since I haven't been able to turn up any kind of response. In the mean-time, I've had to rig something up with generic relations to serve the same purpose. It's a really nasty kludge, I think, which is a shame. I can't believe this hasn't cropped up with anyone else

Re: Multi-table Models and Fixtures

2008-06-02 Thread Greg Taylor
I've been looking through the source to try to see if there is any indicator as to whether this is the intended behavior. If nobody speaks up today, I'll file a bug, as it would appear to be. --~--~-~--~~~---~--~~ You received this message because you are subscribed

Multi-table Models and Fixtures

2008-06-01 Thread Greg Taylor
It seems like multi-table sub-classed models (not abstract) don't honor the "pk" being specified in fixtures. For example, I have an Event class that is sub-classed by a Race model. The Event class is in an app called "calendar" and the Race model is in an app called "regattas". I dumpdata regatta

Re: Django and Comma-Formatting Numbers

2008-05-28 Thread Greg Taylor
Bingo, I could've sworn I remembered doing it somehow or another. Thanks a lot, Greg On May 28, 7:42 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On Thu, May 29, 2008 at 7:26 AM, Greg Taylor <[EMAIL PROTECTED]> wrote: > > > I was wondering if th

Django and Comma-Formatting Numbers

2008-05-28 Thread Greg Taylor
I was wondering if there was any facility within Django that makes formatting numbers with commas or periods in templates possible from template-land. I know you can use locale.format() on the Python side, but was hoping there was some tag/filter feature I missed that would allow me to do this wit

Re: Getting 'instance' in ModelForms

2008-05-16 Thread Greg Taylor
To elaborate, I can't do a self.instance, as it errors saying "self is not defined". For example: color_field = forms.ModelMultipleChoiceField(queryset=self.instance.colors) I need to find the difference of two lists on a model to form the queryset in my application. --~--~-~--~~

Getting 'instance' in ModelForms

2008-05-16 Thread Greg Taylor
Is there a way to get the value of the 'instance' keyword argument from within a Form sub-classed by ModelForm? For example: class CS_SKU(models.Model): colors = models.ManyToManyField(Color, blank=True, null=True) color_field = forms.ModelMultipleChoiceField(queryset=colors) class Form_

get_FOO_display() and Update Messages

2008-05-02 Thread Greg Taylor
I was wondering if there's any reason why get_FOO_display() calls aren't being evaluated when updating/adding new objects via the admin interface. What I mean by this is: The workout "1" was changed successfully. Instead of: The workout "Running" was changed successfully. The field in question

Re: app engine db backend project

2008-04-08 Thread Greg Taylor
This would be great, I'd love to see this although I'm not really experienced enough to help much. On Apr 8, 10:21 am, "Peter Baumgartner" <[EMAIL PROTECTED]> wrote: > Anybody interested in starting an app engine/big table db backend > project? Should be interesting and might help pave the way fo

Initial Data for Django Classes?

2007-04-25 Thread Greg Taylor
Greetings, I was wondering if there's a way to include initial data for Django classes. I noticed that there is a way to do so via a 'sql' subdirectory under your own models, but didn't see any indication if there was a way to do this for base Django classes. --~--~-~--~~~

Initial Data for Django Classes?

2007-04-25 Thread Greg Taylor
Greetings, I was wondering if there's a way to include initial data for Django classes. I noticed that there is a way to do so via a 'sql' subdirectory under your own models, but didn't see any indication if there was a way to do this for base Django classes. --~--~-~--~~