Re: Run manage.py syncdb without auth prompt

2012-06-12 Thread Robert Steckroth
Perfect, and I appreciate your your time. On Tue, Jun 12, 2012 at 11:02 PM, Russell Keith-Magee wrote: > On Wed, Jun 13, 2012 at 10:00 AM, Robert Steckroth > wrote: >> Hey Gang, I need to install the auth system but have Django answer >> "no" automatically for the super user creation. This happ

Re: Run manage.py syncdb without auth prompt

2012-06-12 Thread Russell Keith-Magee
On Wed, Jun 13, 2012 at 10:00 AM, Robert Steckroth wrote: > Hey Gang, I need to install the auth system but have Django answer > "no" automatically for the super user creation. This happens when a --> > python manage.py syncdb <- is run for the first time on a project. > Should I alter the manage.

Run manage.py syncdb without auth prompt

2012-06-12 Thread Robert Steckroth
Hey Gang, I need to install the auth system but have Django answer "no" automatically for the super user creation. This happens when a --> python manage.py syncdb <- is run for the first time on a project. Should I alter the manage.py script? If, not, where should I look to accomplish this? -- Bu

Re: Django Database Improperly Configured when function called outside of Django

2012-06-12 Thread Nikolas Stevenson-Molnar
This appears to be the first point at which the database is accessed. |email_object = Email.objects.get(email=kwargs['email'])| I would print out some of the settings values before that point to make sure you're actually using the settings file you intend to use. E.g: from django.conf import set

How to use django-facebook-graph

2012-06-12 Thread Ada Pineda
Hi I'm pretty new with django and I'm trying to connect an app that I've created (and it's hosted on Heroku) to Facebook. I created an app in Facebook and indicated that I wanted to use python and Heroku. I have a simple home page that reads some data and store it into a postgresql database. Now,

Re: Error migrating using South

2012-06-12 Thread Daniel França
More information: I'd put a break point just before the crash then I've tested some database queries... and all of them crash with the error: DatabaseError: current transaction is aborted, commands ignored until end of transaction block* But if I access the database using psql it's working f

Re: Error migrating using South

2012-06-12 Thread Daniel França
Thanks for the anwser I've installed Haystack, and it was working fine local, but at the server I got this error. First I've tried to install haystack like I did local, using pip pip install -e git+ https://github.com/toastdriven/django-haystack.git@master#egg=django-haystack But at the server I g

Re: Error migrating using South

2012-06-12 Thread James Pyrich
You've got a database error lurking somewhere. I usually encounter this when syncdb needs to be run (to whit, ./manage.py syncdb). Have you added anything to installed apps that is not managed with South? If that's a dead end, see if you can enable SQL logging in the database (in PostgreSQL,

Re: Tip for Geany users or those looking for lightweight IDE

2012-06-12 Thread Enrico Tröger
Hi, On 19/05/12 09:27, graeme wrote: > All it needs is a quick Google to find it, but I missed it before. > This tip on the Geany wiki on how to set it up to work with a syntax > checker is veru useful - IMO it plugs the biggest gap in Geany's > functionality: > > http://wiki.geany.org/howtos/ch

Error migrating using South

2012-06-12 Thread Daniel França
Hi all, I'm using South and it was working fine, but suddenly I start to get this error on the server that's driving me crazy: *(virtualenv)[root@localhost]# ./manage.py migrate accounts* *Traceback (most recent call last):* * File "./manage.py", line 35, in * *execute_manager(settings)* * F

Re: Filter by today

2012-06-12 Thread Andre Terra
You're missing result in your queries because your timestamp DateTimeField includes time information (otherwise it would be a DateField). Cheers, AT -- Sent from my phone, please excuse any typos. -- On Jun 12, 2012 7:55 AM, "Simon Pickles" wrote: > Hi, if my model has a timestamp field, > > c

Re: how to exclude some field from BaseInlineFormSet

2012-06-12 Thread Daniel Roseman
On Tuesday, 12 June 2012 16:34:12 UTC+1, vijay shanker wrote: > > hi > i am trying to do this: > class PakageInfoForm(BaseInlineFormSet): > class Meta: > model = PakageInfo > exclude = ['client_sda',] > this doesn works .. > how to exclude any field from BaseInlineFormSet

Re: more than 1 level of belongsTo

2012-06-12 Thread Ian
On Tuesday, June 12, 2012 1:05:16 AM UTC-6, rahajiyev wrote: > > You can keep laughing all you want, but I at least could get CakePHP > to work with an existing Oracle database lacking primary keys for a > backend app involving role permissions, forms, pagination and other > usual web stuff, as

Re: Getting at Oracle ROWID

2012-06-12 Thread Ian
On Thursday, June 7, 2012 11:22:56 PM UTC-6, rahajiyev wrote: > > > > MyModel.objects.extra(select={'rowid': "rowid || ''"}) > > > Thanks. I don't think extra() takes primary_key=True, does it? > I wouldn't want Django to auto-add column id otherwise. > > Assuming I have: > MyModel.objects.ext

How postgres data type "real" is represented in Django?

2012-06-12 Thread IgorS
Hi ALL! It seems that there is no class in Django models that represents 4-byte data type "real" in postgres. I looked into django\db\backends\postgresql_psycopg2\creation.py but could not find it there. The only choice seems to be FloatField, which represents "double precision" in postgres. B

Re: GeoDjango on Bitnami DjangoStack problems

2012-06-12 Thread victoria
On Sat, Jun 9, 2012 at 12:14 AM, jstratm wrote: > I posted this over at bitnami too, but perhaps the issue is not with > the stack and is simply a general user error (highly likely!) > > I have been struggling now for about two days to get a GeoDjango/ > PostGIS project started.  Sorry to say, I a

how to exclude some field from BaseInlineFormSet

2012-06-12 Thread vijay shanker
hi i am trying to do this: class PakageInfoForm(BaseInlineFormSet): class Meta: model = PakageInfo exclude = ['client_sda',] this doesn works .. how to exclude any field from BaseInlineFormSet .. -- You received this message because you are subscribed to the Google Groups "Dj

django 1.4 memory issues

2012-06-12 Thread Greg Donald
Over the weekend I upgraded my project to Django 1.4. After the upgrade my Apache/mod_wsgi setup began running out of memory. I increased the memory capacity of my virtual servers, but that only extended the time until they began to swap again. I found a blog article that suggested setting Apach

Re: syncdb does not find model, but it does in the shell

2012-06-12 Thread Benedict Verheyen
On 6/06/2012 16:47, jmolmo wrote: > I think that you have to indicate app_label in your separate model > file > According to: > https://docs.djangoproject.com/en/1.4/ref/models/options/ > > class MyTestModel(models.Model): > field1=models.CharField(max_length=12) > field2=models.CharField(

Re: AnonymousUser as Foreignkey?

2012-06-12 Thread Kurtis Mullins
Well, unfortunately the standard Anonymous User ID is always none. (source: https://docs.djangoproject.com/en/dev/topics/auth/#anonymous-users) So, you can't really use their ID as a foreign key. However, I'm having trouble picturing your use-case here. If you could give some more information on

Re: 1.2 ModelForm.is_valid() backward incompatible change

2012-06-12 Thread Kurtis Mullins
I'm not sure if I understand the problem correctly, but I think this might be what you're looking to do. In your ModelForm, simply exclude the fields you don't want or explicitly include only the fields you do want to use. Those are both under the ModelForm's Meta class. e.g. # Include only thes

RE: Filter by today

2012-06-12 Thread Sells, Fred
You probably want __gte in your filter, if your timestamp field is a datetime field, otherwise plain old = should work. When in doubt, you can always print (result.timestamp, date.today() ) or even use the type() function to make sure you're comparing apples to apples. -Original Message- F

RE: DRY violation using get_or_create with defaults

2012-06-12 Thread Sells, Fred
My application is VERY low volume, so I just do this to KISS (resident, created) = models.Resident.objects.get_or_create(pk=resid, defaults=r) resident.__dict__.update(r) resident.save() From: django-users@googlegroups.com [mailto:django-users@googlegroups.com]

Django project structure design

2012-06-12 Thread kesavanlcs
Hi, I need some design help for my concepts:- My concept is mother page contain all the links like( forum, advertiser, classified's,etc) different categories. Based on the mother page registration the forum, advertiser, classified's,etc will be worked(based on the user sign in data's will be captu

Re: DRY violation using get_or_create with defaults

2012-06-12 Thread Jonathan French
On 12 June 2012 04:44, Jerome Baum wrote: > Drop the "defaults" kwarg to get_or_create as apparently you're not using > it. Also drop the conditional on those set/save statements. Ah, I should have made clear that some of the fields in defaults are NOT NULL, so it's necessary to pass them in de

Re: Debug django with autoreload - Pydev - Aptana

2012-06-12 Thread Dilvane
The link: http://bear330.wordpress.com/2007/10/30/how-to-debug-django-web-application-with-autoreload/ Terça-feira, 12 de Junho de 2012 12:41:35 UTC+1, Dilvane escreveu: > > hi everyone. > > I am using Aptana, Pydev and Django and this code to debugging and > autoreload works fine in django 1.3,

Debug django with autoreload - Pydev - Aptana

2012-06-12 Thread Dilvane
hi everyone. I am using Aptana, Pydev and Django and this code to debugging and autoreload works fine in django 1.3, but not in django1.4. Does anyone have this problem? Thank you. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view thi

Time zone (Django 1.4) questions

2012-06-12 Thread Klaas van Schelven
Hi all, I have a number of questions on Django 1.4's Time Zones. 1] Migration of non-UTC to UTC: is there any script / best practice available? Django's documentation mentions that all data should be converted to UTC when switching to USE_TZ=True. See: https://docs.djangoproject.com/en/dev/top

Re: Filter by today

2012-06-12 Thread kenneth gonsalves
On Tue, 2012-06-12 at 07:46 +0100, Simon Pickles wrote: > result = Attempt.objects.filter(timestamp = date.today()) should it not be datetime.datetime.today()? -- regards Kenneth Gonsalves -- You received this message because you are subscribed to the Google Groups "Django users" group. To pos

Filter by today

2012-06-12 Thread Simon Pickles
Hi, if my model has a timestamp field, class Attempt(models.Model): timestamp = models.DateTimeField('Timestamp') How would I query to get entries from today? I tried: result = Attempt.objects.filter(timestamp = date.today()) but it always says DoesNotExist (I can see entry in ta

Re: Validating a specific form field

2012-06-12 Thread kenneth gonsalves
On Tue, 2012-06-12 at 03:25 -0700, gnesher wrote: > but this seems like a bad way of doing this (error message might > change > etc.) Is there a better way to run the validation ? https://docs.djangoproject.com/en/dev/ref/forms/validation/ -- regards Kenneth Gonsalves -- You received this mes

Validating a specific form field

2012-06-12 Thread gnesher
I'm trying to catch a specific error for a specific form field. at the moment I'm doing something like this : if form.is_valid(): else: if 'email' in form.errors and form.errors['email'][0] == 'Email address has already entered today': but this seems like a bad way of doing this (error me

Re: DRY violation using get_or_create with defaults

2012-06-12 Thread Jerome Baum
On 12 Jun 2012, at 10:44, Gelonida N wrote: > On 06/12/2012 05:44 AM, Jerome Baum wrote: >> Drop the "defaults" kwarg to get_or_create as apparently you're not >> using it. Also drop the conditional on those set/save statements. >> >> > > Wouldn't this create more db accesses than the original

Re: DRY violation using get_or_create with defaults

2012-06-12 Thread Gelonida N
On 06/12/2012 05:44 AM, Jerome Baum wrote: Drop the "defaults" kwarg to get_or_create as apparently you're not using it. Also drop the conditional on those set/save statements. Wouldn't this create more db accesses than the original code? On Monday, June 11, 2012 3:44:47 PM UTC+2, ojno wrot

AnonymousUser as Foreignkey?

2012-06-12 Thread Raitucarp
How to use anonymoususer as foreignkey? I need anonymoususer, anonymous user is my main features of my app. Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-

django limited char

2012-06-12 Thread armagan
Hi, I'm trying rss for django project. I want to show limited char not at all in spot field. Can you help me? def item_spot(self, item): return item.spot Thanks, -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, s

Re: more than 1 level of belongsTo

2012-06-12 Thread rahajiyev
You can keep laughing all you want, but I at least could get CakePHP to work with an existing Oracle database lacking primary keys for a backend app involving role permissions, forms, pagination and other usual web stuff, as opposed to designing a new app and database from scratch. I worked around