Problem in user MySQL merge table.

2010-11-03 Thread funcrush
Hi all :) I have a regacy db (4dbs and 8 tables, for distirube data) and wanna build a web tool for these. When django 1.1.x released, I sovled "4dbs" problem the multi database. But I have the problem yet that "8 tables" Some months ago, I worte a code like bellow for sovling the problem class P

Re: Why my model doesn't get saved?

2010-11-03 Thread Łukasz Rekucki
On 3 November 2010 22:17, Marc Aymerich wrote: > Hi, > I have 2 abstract classes with an overrided save function, class BaseA and > class BaseB. BaseA trigger the models.Model save function, the other > doesn't. > class BaseA(models.Model): >     class Meta: >         abstract = True >     def sav

Re: Why my model doesn't get saved?

2010-11-03 Thread Michael
nevermind my previous email, I see now you are talking about the test1 class, which isn't abstract. In that case I assume the problem is Python's multiple inheritance, where the first parent it finds with a save() method gets called, and no others. It's probably calling BaseB.save(), which does

Re: Why my model doesn't get saved?

2010-11-03 Thread Michael
The reason is because you've declared them both to be abstract, which means they don't get tables of their own, rather their fields get added to a non-abstract child model's table. -- Michael On Wed, 2010-11-03 at 22:17 +0100, Marc Aymerich wrote: > Hi, > I have 2 abstract classes with an overr

Re: Admin without template (no colors, no css, just simple html)

2010-11-03 Thread marcoarreguin
I made it!!! Robbington I'm So glad with you and I want to share how I made it. I have a bluehost, and after the pain that was to run django finally via FastCGI, I had a new problem: The media of the admin. I try with a symlink but it was kind of complicated for me, and don't understand exactly

Re: Django auth tutorial

2010-11-03 Thread Sebastian Alonso
Thanks a lot peter! I think I'll get started with that info and move further if needed. thanks seba 2010/11/3 Peter Herndon > > On Nov 3, 2010, at 12:31 PM, Sebastian Alonso wrote: > > > Hi everyone, I'm a complete django newbie, and I need to use the Auth > system. The problem is that I

static file

2010-11-03 Thread Darvin Willy Cotrina Cervera
hello. I am working with django and I have the need to handle static files such as doc, xls, ppt and others, but as private by the user. according to the documentation says django, file management makes to the Apache that can be served. I could give an idea of how I can implement this. I am sorr

Why my model doesn't get saved?

2010-11-03 Thread Marc Aymerich
Hi, I have 2 abstract classes with an overrided save function, class BaseA and class BaseB. BaseA trigger the models.Model save function, the other doesn't. class BaseA(models.Model): class Meta: abstract = True def save(self, *args, **kwargs): super(BaseA, self).save(*arg

Re: Django auth tutorial

2010-11-03 Thread Peter Herndon
On Nov 3, 2010, at 12:31 PM, Sebastian Alonso wrote: > Hi everyone, I'm a complete django newbie, and I need to use the Auth > system. The problem is that I haven't been able to find a good tutorial such > as que django one, with all the examples, pretty simple, very easy, with the > templ

Registrion activate.html 0.8

2010-11-03 Thread craphunter
Hi, I am using the registration 0.8 alpha. I can create an account and the activation email is send the activation link. When I click on the link the account is getting active in the database but the message on the webpage is telling me something different. I do use this template. {% extends "ba

Re: How to aggregate values by month

2010-11-03 Thread Rogério Carrasqueira
Hi Mikhail! Can you give some clue on how to use your plugin considering my scenario? Thanks Rogério Carrasqueira --- e-mail: rogerio.carrasque...@gmail.com skype: rgcarrasqueira MSN: rcarrasque...@hotmail.com ICQ: 50525616 Tel.: (11) 7805-0074 2010/10/28 Mikhail Korobov > Hi Rogério, > >

Re: using strings as fieldnames to save model

2010-11-03 Thread Brian Bouterse
** is part of python the python grammar. See thisfor more info on how to use * and ** in python Brian On Wed, Nov 3, 2010 at 1:52 PM, Thomas M wrote: > Ok, thank

Re: using strings as fieldnames to save model

2010-11-03 Thread Thomas M
Ok, thanks. I'll try it tomorrow. What is the meaning of the **? Thanks, Thomas On 3 Nov., 17:53, Daniel Roseman wrote: > On Nov 3, 4:17 pm, Thomas M wrote: > > > Hi, > > > I have to save a model with dynamic fieldnames. So the field > > identifiers are strings. > > > Example: > > foo  = Genr

Re: using strings as fieldnames to save model

2010-11-03 Thread Daniel Roseman
On Nov 3, 4:17 pm, Thomas M wrote: > Hi, > > I have to save a model with dynamic fieldnames. So the field > identifiers are strings. > > Example: > foo  = Genre("genre_id"=2,"name"="ente") > foo.save() > > This creates an error. Is it somehow possible to do this with the > model instance? > Or do

Django auth tutorial

2010-11-03 Thread Sebastian Alonso
Hi everyone, I'm a complete django newbie, and I need to use the Auth system. The problem is that I haven't been able to find a good tutorial such as que django one, with all the examples, pretty simple, very easy, with the templates included, etc... My main issue is that i dont get on well wit

using strings as fieldnames to save model

2010-11-03 Thread Thomas M
Hi, I have to save a model with dynamic fieldnames. So the field identifiers are strings. Example: foo = Genre("genre_id"=2,"name"="ente") foo.save() This creates an error. Is it somehow possible to do this with the model instance? Or do I have to use custom SQL? Thanks, Thomas -- You receiv

Re: RadioSelect widget in Django 1.1 using Model Form

2010-11-03 Thread Ricardo L. Dani
Thanks Daniel, Now it makes sense. Thank you again 2010/11/3 Daniel Roseman > On Nov 3, 3:03 pm, "Ricardo L. Dani" wrote: > > Hello, > > > > I'm working with an project using django-cms and django 1.1 and I have > this > > problem: > > > > With a big model form with many choice charFields mus

Re: Admin without template (no colors, no css, just simple html)

2010-11-03 Thread Robbington
Well my friend, I have quickly looked into hosting a django project via blue host and this is what the django site has to say: Similar setup as Dreamhost. Django is listed as unsupported, but with some pain it does work, and has a good price.. http://code.djangoproject.com/wiki/DjangoFriendlyWebHo

Re: RadioSelect widget in Django 1.1 using Model Form

2010-11-03 Thread Daniel Roseman
On Nov 3, 3:03 pm, "Ricardo L. Dani" wrote: > Hello, > > I'm working with an project using django-cms and django 1.1 and I have this > problem: > > With a big model form with many choice charFields must be reendered as > and not as 's (default) > > Ex: > >     field = models.CharField(max_length=

Re: Repost Admin Site Without Graphics

2010-11-03 Thread Robbington
So is your media stored at "" a...@h2oamr:~/django/amr/media? "" and you MEDIA_ROOT = '/home/amr/django/media' ? Rob -- 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 unsubsc

Re: FormWizard and permission_required

2010-11-03 Thread cootetom
That's a good idea. I'll do that then. Thanks. On Nov 3, 2:51 pm, ringemup wrote: > I use a wrapping view, rather like this: > > # urls.py > (r'^my_url/?$', my_view, ...) > > # views.py > @permission_required('some_permission') > def my_view(request): >   return MyWizard([Step1, Step2, Step3, .

RadioSelect widget in Django 1.1 using Model Form

2010-11-03 Thread Ricardo L. Dani
Hello, I'm working with an project using django-cms and django 1.1 and I have this problem: With a big model form with many choice charFields must be reendered as and not as 's (default) Ex: field = models.CharField(max_length=1, default=None, choices=CHOICES) renders:

Re: Repost Admin Site Without Graphics

2010-11-03 Thread octopusgrabbus
Here is my symbolic link to what I believe is the admin media: media -> /usr/local/lib/python2.6/site-packages/django/contrib/admin/ media Here's what's in that directory: a...@h2oamr:~/django/amr$ ls -lH media total 12 drwxr-xr-x 2 root root 4096 Sep 15 13:54 css drwxr-xr-x 4 root root 4096 Sep

Re: Admin without template (no colors, no css, just simple html)

2010-11-03 Thread marcoarreguin
Thanks Robbington! Hey, Im watching that you mention "your project directory". But I have my django and my project in another patch, actually, out of www directory, but I have the fastcgi file right there, only that file. So, Where is my project directory in my shared hosting myuser/ home/.l

Re: FormWizard and permission_required

2010-11-03 Thread ringemup
I use a wrapping view, rather like this: # urls.py (r'^my_url/?$', my_view, ...) # views.py @permission_required('some_permission') def my_view(request): return MyWizard([Step1, Step2, Step3, ...]) On Nov 3, 9:54 am, cootetom wrote: > Hi, > > When creating normal views I can decorate the v

Re: django-voting url pattern

2010-11-03 Thread Sithembewena Lloyd Dube
Thanks Daniel! On Tue, Nov 2, 2010 at 11:39 AM, Daniel Roseman wrote: > On Nov 1, 3:08 pm, Sithembewena Lloyd Dube wrote: > > Thanks Daniel, makes sense. Also, I was making the mistake of thinking > that > > I had to create a separate view, forgetting that I am calling the one > > supplied by dj

FormWizard and permission_required

2010-11-03 Thread cootetom
Hi, When creating normal views I can decorate the view with @permission_required('some_permission') but when I'm using a FormWizard class I don't know where to limit access to it based on permissions? I have a FormWizard mapped to a URL: (r'^my_url/?$', Wizard([Step1, Step2, Step3])), Then I hav

Using multiple managers

2010-11-03 Thread Benjamin Wohlwend
Hi, I have a base model A and two models B and C inheriting from the base model. I'm using django-polymorphic[1] since it very conveniently returns a list of B and C when querying on A. The requirement came up that model C needs a GeometryField, and now I'm stuck. Both GeoDjango and django-polymor

Re: How to aggregate values by month

2010-11-03 Thread Rogério Carrasqueira
Hi Scott Thanks for you help, unfortunately on trying sales = Sale.objects.filter(date_ created__range=(init_date,ends_date)) .values(date_ created__month) .aggregate(total_sales=Sum('total_value')) This error appeared, global name 'date_created__month' is not defined Do you have another

SERIALIZING

2010-11-03 Thread sami nathan
HOW TO GET XML RESPONSE in following THIS IS HOW MY URL.PY LOOKS LIKE from django.conf.urls.defaults import * from it.view import current_datetime # Uncomment the next two lines to enable the admin: #from django.contrib import admin #admin.autodiscover() urlpatterns = patterns('', # Example

Re: Attributr error

2010-11-03 Thread sami nathan
i Think serialisation would be helpful for this some one help me how to use it -- 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 dja

Re: Attributr error

2010-11-03 Thread sami nathan
HOW TO GET XML RESPONSE in following THIS IS HOW MY URL.PY LOOKS LIKE from django.conf.urls.defaults import * from it.view import current_datetime # Uncomment the next two lines to enable the admin: #from django.contrib import admin #admin.autodiscover() urlpatterns = patterns('', # Exampl

RE: Sample Auto Log Out Code

2010-11-03 Thread Sells, Fred
I'm running on Windows 7, Python 2.4 and Django 1.2.1 I'm trying to change one table "facility" by dropping it and then letting syncdb recreate it. I thought syncdb was supposed to ignore already created tables, but that does not appear to be the case. What am I doing wrong? >python manage.p

Sample Auto Log Out Code

2010-11-03 Thread octopusgrabbus
Does anyone have samples for auto logging out a user? -- 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 django-users+unsubscr...@goo

Re: Attributr error

2010-11-03 Thread sami nathan
Where should i use this please tell!! should i use in urls.py -- 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 django-users+unsubsc

Re: Whoosh: 'module' object has no attribute 'FileStorage'

2010-11-03 Thread David De La Harpe Golden
On 03/11/10 08:41, sureronald wrote: > Hi all, > > I am using Whoosh version 1.2.5 to allow for full text search on my > models. I was using this guideline from here > http://www.arnebrodowski.de/blog/add-full-text-search-to-your-django-project-with-whoosh.html Note that django-haystack [1] has a

Whoosh: 'module' object has no attribute 'FileStorage'

2010-11-03 Thread sureronald
Hi all, I am using Whoosh version 1.2.5 to allow for full text search on my models. I was using this guideline from here http://www.arnebrodowski.de/blog/add-full-text-search-to-your-django-project-with-whoosh.html but I keep getting the error 'module' object has no attribute 'FileStorage' Has thi

Re: rabbitmq + celery + django + celery.views.task_status ... simple example?

2010-11-03 Thread wawa wawawa
Tom - many thanks again. This is good stuff. W On 3 November 2010 11:36, Tom Evans wrote: > On Wed, Nov 3, 2010 at 10:16 AM, wawa wawawa wrote: >> You Sir, are awesome. >> >> I think this seems to be exactly what I was looking for... >> >> Can I ask for JS code that does the periodic polling f

Re: rabbitmq + celery + django + celery.views.task_status ... simple example?

2010-11-03 Thread Tom Evans
On Wed, Nov 3, 2010 at 10:16 AM, wawa wawawa wrote: > You Sir, are awesome. > > I think this seems to be exactly what I was looking for... > > Can I ask for JS code that does the periodic polling from the client > please and possibly the appropriate bits of the template? > > Many thanks! > > W >

Re: Attributr error

2010-11-03 Thread Tom Evans
On Wed, Nov 3, 2010 at 5:31 AM, sami nathan wrote: > I want my final result in xml format and how can i do that? thanks for > notification > I tell you what, seeing how you've done most of the work already on this, I'll get you started: There are literally thousands of ways you can turn some

Re: rabbitmq + celery + django + celery.views.task_status ... simple example?

2010-11-03 Thread wawa wawawa
You Sir, are awesome. I think this seems to be exactly what I was looking for... Can I ask for JS code that does the periodic polling from the client please and possibly the appropriate bits of the template? Many thanks! W On 3 November 2010 11:10, Tom Evans wrote: > On Tue, Nov 2, 2010 at 5:

Re: rabbitmq + celery + django + celery.views.task_status ... simple example?

2010-11-03 Thread Tom Evans
On Tue, Nov 2, 2010 at 5:12 PM, wawa wawawa wrote: > Hi All, > > So, I've got my django app, rabbitmq and celery working and processing > my uploaded files. Next step is to get the client to display status > results provided by JSON, ultimately refreshing to a results page when > complete. > > I'm

Re: rabbitmq + celery + django + celery.views.task_status ... simple example?

2010-11-03 Thread wawa wawawa
Hi, I'm using a message queue because the task is really "offline" and could take 1sec or 30 seconds (or longer). I'll look at b-list. Thankyou W On 3 November 2010 07:09, Prashanth wrote: > > > On Tue, Nov 2, 2010 at 10:42 PM, wawa wawawa wrote: >> >> Hi All, >> >> So, I've got my django app

Re: Admin without template (no colors, no css, just simple html)

2010-11-03 Thread Robbington
Personally I dont bother creating symlinks to my admin media, I just copy the media folder over to my project directory. Anyway: If you think that your settings.py is right: MEDIA_ROOT = '/var/www/django/project/media/' MEDIA_URL = 'media/' ADMIN_MEDIA_PREFIX = '/media/' or its a permissions pro

Implementing a ldap db backend

2010-11-03 Thread sebastien piquemal
Hi ! I am currently on a big project, which should result in a ldap management service (modifying users, groups, and any other ldap object). Until now, I have been using django-ldapdb, in order to use ldap as a db backend. It was good for a very basic read-only prototype of the service. However,