Re: Class in a Class

2010-06-02 Thread Daemoneye
class A: class B: pass a=A() B=A.B() you should add A. to control the class B 在 Thu, 03 Jun 2010 12:50:06 +0800,JF Simon 写道: Hello, I'm lost in Python !! If I write this class Dated(Behavior): created_on = models.DateTimeField(_('Created

Getting Duplicate records with Q query

2010-06-02 Thread Lee Hinde
Hi; Goal is to get a list of notes that include all those created or addressed to the current user, within the last few days. Model is a Note, with a created_by field and a many-to-many to a recipients table which is itself linked to a User Profile table which is linked to Users. Note

Class in a Class

2010-06-02 Thread JF Simon
Hello, I'm lost in Python !! If I write this class Dated(Behavior): created_on = models.DateTimeField(_('Created on')) updated_on = models.DateTimeField(_('Updated on')) class Events: def __init__(self): super(Events, self).__init__() I get an error

Re: File Upload with Progress Bar

2010-06-02 Thread Venkatraman S
Tell me about it! Its quite insane that there is no single-standard solution for this. I have been hanging around in #django for sometime and there is still opposition to flash based solution. Also, i have not been to get it working inspite of it being not an ideal solution. I hear that there are

Re: File Upload with Progress Bar

2010-06-02 Thread Brad Pitcher
Sort of, that's what the default is in the demo, but now I've noticed I have the same problem with apache progress reporting as I did using django progress reporting. It's behaving like it's not multi-threaded or something. It seems like I don't get any progress reports until the file has

Model Issue - wont let me name it follower or followee

2010-06-02 Thread joelklabo
http://dpaste.org/JjE4/ -- 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...@googlegroups.com. For more

Re: File Upload with Progress Bar

2010-06-02 Thread Venkatraman S
Does this work with the Django development server? On Thu, Jun 3, 2010 at 8:13 AM, Brad Pitcher wrote: > Since I just spent much longer than it should have taken figuring this > out, I will try and help you out. I followed the instructions at the > provided link and it

OAuth/Twitter flow question

2010-06-02 Thread steve
Hi, for those using OAuth for a Twitter-based app, I'm wondering what page you take the User after they click on a "logout" link. Do you take them to a simple login page where you simply display the standard Twitter-brand "Log in with Twitter" image button? If they're still logged into Twitter

Re: Unable to import libxml2mod from the python script

2010-06-02 Thread Bruce Wang
On Thu, Jun 3, 2010 at 1:26 PM, Graham Dumpleton wrote: > > > > > Are you running your django app under mod_wsgi? It may not running with > your > > interpreter in your #! line. > > > > Try using > > import sys; print sys.executable > > in your wsgi file to find out

Re: Unable to import libxml2mod from the python script

2010-06-02 Thread Graham Dumpleton
On Jun 3, 1:20 pm, Bruce Wang wrote: > On Thu, Jun 3, 2010 at 12:38 PM, Superman wrote: > > Thanks for your reply. How do you check env path variables diff > > between shell and code > > execution? > > > To my wsgi file, I have this line

Re: Unable to import libxml2mod from the python script

2010-06-02 Thread Graham Dumpleton
On Jun 3, 12:38 pm, Superman wrote: > Thanks for your reply. How do you check env path variables diff > between shell and code > execution? > > To my wsgi file, I have this line "#!/usr/local/bin/python" which > tells which interpreter to use. Generally, no it doesn't.

Re: Unable to import libxml2mod from the python script

2010-06-02 Thread Bruce Wang
On Thu, Jun 3, 2010 at 12:38 PM, Superman wrote: > Thanks for your reply. How do you check env path variables diff > between shell and code > execution? > > To my wsgi file, I have this line "#!/usr/local/bin/python" which > tells which interpreter to use. And yes,

Re: File Upload with Progress Bar

2010-06-02 Thread Brad Pitcher
Since I just spent much longer than it should have taken figuring this out, I will try and help you out. I followed the instructions at the provided link and it sort of worked. Not quite as well as I liked. I used Apache for the progress reporting, which the author doesn't mention in the

Re: Unable to import libxml2mod from the python script

2010-06-02 Thread Superman
Thanks for your reply. How do you check env path variables diff between shell and code execution? To my wsgi file, I have this line "#!/usr/local/bin/python" which tells which interpreter to use. And yes, libxml2.py and libxml2mod.so files are there in "/usr/local/lib/python2.5/site-packages/"

Re: Google maps like app for Django for small area?

2010-06-02 Thread Sam Walters
http://geodjango.org/ On Thu, Jun 3, 2010 at 11:35 AM, Stodge wrote: > Is there a Django app (or SDK/API/technology/etc) that can recreate > Google maps for a small area (say 60 square miles) with all maps > stored locally on the server? Thanks > > -- > You received this

Google maps like app for Django for small area?

2010-06-02 Thread Stodge
Is there a Django app (or SDK/API/technology/etc) that can recreate Google maps for a small area (say 60 square miles) with all maps stored locally on the server? Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

How to count queries at unit tests

2010-06-02 Thread lukaszb
After firing up tests django sets DEBUG to False and django.db.connection doesn't update it's queries attribute. Is there any (probably lower level) access to fired queries? Or should I change/ write own runner class... Anyone? -- You received this message because you are subscribed to the

Admin field defaults

2010-06-02 Thread Agore
I'm using 1.1 Admin to add rows to a database table that represent small transactions. is there a way of making a field dynamically default to 'last value entered' for that field in the previous table row? Being able to so this would save the user a lot of time in entering rows. -- You received

Re: SQL along side NoSQL

2010-06-02 Thread nudzo
Try to dig some info here: http://www.allbuttonspressed.com/projects/django-nonrel I. On Jun 2, 5:45 pm, Sean Brant wrote: > Whats the best way to use django's orm along side a NoSQL DB? I want > to keep my users and other data in postgres but have some data that > would

Authentication lost one page-load after login.

2010-06-02 Thread Shawn Milochik
I'm having an extremely weird problem which I've been unable to solve for weeks. It's entirely possible that there's something odd I've done somewhere in the system, but I thought I'd throw it out there in case someone has seen this already. Background: User must be logged in to view a page or

Re: Integrity Error with trying to save UserProfile automatically

2010-06-02 Thread kalinski
Hello again, well i am stupid: the code above works,null=True should work but when changin the model a simple "manage.py syncdb" is sometimes not enough as it does not alter created tables so i "manage.py reset" the whole thing and that's it... sorry for the spam kalinsko On Jun 2, 8:34 pm,

Integrity Error with trying to save UserProfile automatically

2010-06-02 Thread kalinski
Hi Djangos, i am attaching a UserProfile to my Users by using a post_save signal: class UserProfile(models.Model): user = models.ForeignKey(User, unique=True) address = models.ForeignKey(Address, blank=True, null=True) def user_post_save(sender, instance, signal, *args, **kwargs):

MultiValueField and MultiWidget

2010-06-02 Thread David
I created a MultiWidget, SelectDateTimeWidget, to allow date/time input with select boxes. I created a MultiValueField, SelectDateTimeField, to use this widget. I created a ModelForm, SubmissionForm, that uses this field. Here are the source files: * widgets.py: http://dpaste.com/hold/202352/ *

Re: Unable to import libxml2mod from the python script

2010-06-02 Thread Jeliuc Alexandr
You should check env path variables diff between shell and code execution. Another way check this error path is there libxml2 or not. it may be in usr/lib/python2.5. or something like that. On Jun 2, 4:57 pm, Superman wrote: > I have a django site that is integrated with

Re:[SOLVED] Path issue (TemplateDoesNotExist)

2010-06-02 Thread M. Bashir Al-Noimi
Thanks Nuno this fixed the issue. On 02/06/2010 12:17 م, Nuno Maltez wrote: Well, if you're trying to render a template : "posts/post_list.html", the post_list.html file should live inside "posts" directory inside of your "templates" directory : templates/posts/post_list.html Don't mix html

Re: Unable to import libxml2mod from the python script

2010-06-02 Thread Darren
Just grasping at straws here, but could it have anything to do with permissions or the python path? I don't fully understand how imports work. But, those are things I'd explore first. Darren On Jun 2, 2010, at 8:57 AM, Superman wrote: I have a django site that

Re: AJAX request does not seem to have request.user

2010-06-02 Thread Carl Nobile
Well that fixed it. I guess I'll be looking at the release notes from now on before I upgrade versions of Django. Thanks Brian for your time. ~Carl On Jun 2, 11:31 am, Brian Neal wrote: > On Jun 2, 10:14 am, Carl Nobile wrote: > > > > > Could the new

SQL along side NoSQL

2010-06-02 Thread Sean Brant
Whats the best way to use django's orm along side a NoSQL DB? I want to keep my users and other data in postgres but have some data that would be better suited for a NoSQL DB like redis. I see a lot of talk about switching to NoSQL but little talk on integrating it with existing systems. I think

Re: AJAX request does not seem to have request.user

2010-06-02 Thread Brian Neal
On Jun 2, 10:14 am, Carl Nobile wrote: > > Could the new code not work with a class. I'm still looking into this > and may discover the answer myself, but if anybody knows or has an > idea I'd be much appreciative. > > ~Carl Carl, those decorators no longer work on class

Re: AJAX request does not seem to have request.user

2010-06-02 Thread Carl Nobile
As it turns out this is not just an AJAX issue. I have looked at the decorators in both Django 1.1 and 1.2.1 and the one in 1.2.1 now looks for the request.user object where the older one did not. I also do something that I think most developers don't do and that is write most of my views in

Survey on Project Management/ALM Application

2010-06-02 Thread anandagar
If you have trouble viewing or submitting this form, you can fill it out online: http://spreadsheets.google.com/viewform?formkey=dEMweGI0RWhZZmF2TWdja0NSZ2FCNHc6MQ Survey on Project Management/ALM Application Can you please find some time to answer below questions? I am putting all the

Re: AJAX request does not seem to have request.user

2010-06-02 Thread Bill Freeman
On Wed, Jun 2, 2010 at 9:35 AM, Carl Nobile wrote: > Nothing has changed at all. I was just going through the steps to > migrate my code base to Django 1.2.1 and this stopped working. If I > comment out the decorator everything works just fine minus the > protection of

Re: select multiple without using foreignkey

2010-06-02 Thread Daniel Roseman
On Jun 2, 2:00 am, HARRY POTTRER wrote: > I have a models that represents an event. > > I want it to have a field that represents the days of the week that > the event occurs. This is easy if all you need to be able to do is be > able to select one day, but if you want to

Re: Django 1.2.1 doesn't work with South but 1.2 works? How to find the previous version Django 1.2?

2010-06-02 Thread Streamweaver
South is working fine for me with Django 1.2 as well. What errors are you getting? There's a south discussion group that may be more productive for this conversation though. On Jun 1, 9:29 pm, flyinglegs wrote: > I am having some trouble with South database migration

Unable to import libxml2mod from the python script

2010-06-02 Thread Superman
I have a django site that is integrated with scrapy, but when the scrapy code is called from the view, I get this error: File "/usr/local/lib/python2.5/site-packages/libxml2.py", line 1, in import libxml2mod ImportError: /usr/local/lib/python2.5/site-packages/ libxml2mod.so: undefined

Re: AJAX request does not seem to have request.user

2010-06-02 Thread Daniel Roseman
On Jun 2, 2:35 pm, Carl Nobile wrote: > Nothing has changed at all. I was just going through the steps to > migrate my code base to Django 1.2.1 and this stopped working. If I > comment out the decorator everything works just fine minus the > protection of cause. The

Re: AJAX request does not seem to have request.user

2010-06-02 Thread Carl Nobile
Nothing has changed at all. I was just going through the steps to migrate my code base to Django 1.2.1 and this stopped working. If I comment out the decorator everything works just fine minus the protection of cause. The internal wrapper (closure) in the decorator is failing when it tries to get

Re: Django 1.2.1 doesn't work with South but 1.2 works? How to find the previous version Django 1.2?

2010-06-02 Thread Wiiboy
Djago 1.2.1 works fine for me with South. -- 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

Re: select multiple without using foreignkey

2010-06-02 Thread derek
On Jun 2, 3:00 am, HARRY POTTRER wrote: > I have a models that represents an event. > > I want it to have a field that represents the days of the week that > the event occurs. This is easy if all you need to be able to do is be > able to select one day, but if you want to

Re: AJAX request does not seem to have request.user

2010-06-02 Thread Bill Freeman
On the chance that something has changed in your JavaScript as well, are you sure that you're passing the session cookie? This could be a subtle difference, such as a different version of JQuery, or the like. The server side doesn't know from AJAX. They're all just requests that get a response.

ManyToManyField Unique ID

2010-06-02 Thread Manuel Held
Hi, i have following Models: ## class speiseplan(models.Model): kalenderwoche = models.PositiveSmallIntegerField(blank=True,null=True) start = models.DateField() end = models.DateField(blank=True,null=True) veroeffentlicht =

Re: Path issue (TemplateDoesNotExist)

2010-06-02 Thread Nuno Maltez
Well, if you're trying to render a template : "posts/post_list.html", the post_list.html file should live inside "posts" directory inside of your "templates" directory : templates/posts/post_list.html Don't mix html and python files in the same dir. Nuno On Wed, Jun 2, 2010 at 4:44 AM, M.

Re: Passing JSON data

2010-06-02 Thread Simone Dalla
2010/6/2 ravi krishna > Hi, > I am a newbie with Python n Django programming. Can somebody tell me some > easy methods for passing the Json data to the html page as arguments. I have > the Json converted data stored in a variable. Now need to print those data > in html.

I want to know about one error. Now I have this kind of errors using the tags

2010-06-02 Thread kani
IntegrityError: column name is not unique -- 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

Eclipse django server restart

2010-06-02 Thread Apoorva
Everytime I make any changes in the code, I need to restart the django development server. Is there any way out to auto reload the server everytime any changes are made to the code? How to do this in Eclipse??? -- You received this message because you are subscribed to the Google Groups "Django

How to distribute static/media files with reusable applications?

2010-06-02 Thread Almad
Hi, is there any "standard"/convention on how to distribute media files (css, js, images, ...) with reusable applications? How is it then integrated into project? Thanks, Almad -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Help on ForeignKey across databases

2010-06-02 Thread xordoquy
Thanks a lof for your answer. I was not sure because of http://djangoadvent.com/1.2/multiple-database-support/ and esp. this part: The allow_relation method exists to provide a sanity check. Django doesn't want to let you assign cross-database relations if it's going to fail. Therefore when

Passing JSON data

2010-06-02 Thread ravi krishna
Hi, I am a newbie with Python n Django programming. Can somebody tell me some easy methods for passing the Json data to the html page as arguments. I have the Json converted data stored in a variable. Now need to print those data in html. while searching found some methods like using eval() in

Re: Help on ForeignKey across databases

2010-06-02 Thread Russell Keith-Magee
On Wed, Jun 2, 2010 at 4:01 PM, wrote: > Hello, > > I am currently working on a project on which we access two different > databases. > One is a legacy database used by another application, the second being the > django dedicated db. > For some reason, I need to have model

Re: django python pi-charts/graphs

2010-06-02 Thread Euan Goddard
I would recommend using google charts. There are a couple of python implementations for this. I've used GChartWrapper with some success, but found it a little clunky in its implementation. Euan On Jun 2, 7:35 am, rahul jain wrote: > Hi Django, > > I would like to

Re: admin modifications

2010-06-02 Thread Daniel Roseman
On Jun 2, 7:56 am, rahul jain wrote: > Hi Django, > > I am not sure how this could be done, so on the admin display, on one > of the columns I would like to provide select tab. If i select one of > the options, > it should update some other column on the display. > >

Help on ForeignKey across databases

2010-06-02 Thread xordoquy
Hello, I am currently working on a project on which we access two different databases. One is a legacy database used by another application, the second being the django dedicated db. For some reason, I need to have model links (FK) from the django db to legacy one but for consistency reasons,

admin modifications

2010-06-02 Thread rahul jain
Hi Django, I am not sure how this could be done, so on the admin display, on one of the columns I would like to provide select tab. If i select one of the options, it should update some other column on the display. Firstly, whats the clean way for adding select boxes on the admin display, it

Manager.Raw() + Pagination

2010-06-02 Thread huw_at1
Hi all, I'm trying to use Djangos new Raw feature to run a custom SQL and return back a list of objects. This works fine however I then want to paginate to present the results as a list. The RawQuerySet has no length value it seems to be able to paginate. Is there a recognised way of achieving

django python pi-charts/graphs

2010-06-02 Thread rahul jain
Hi Django, I would like to represent my db/model content in the form of pi-charts/graphs. Is there any django python module that already exists ? --RJ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to