Re: "Complex" Views/Generic Views

2007-04-30 Thread Bryan Veloso
> In fact, that whole thread possibly has some relevance to your problem. > Note that the solution in the particular post I've highlighted works on > Python 2.3 and up, but if you are using 2.4 or later, Ned Batchelder's > post is of more than trivial relevance. So, (with my very limited python k

Re: "Complex" Views/Generic Views

2007-04-30 Thread Malcolm Tredinnick
On Tue, 2007-05-01 at 06:29 +, Bryan Veloso wrote: > > What you *can* do, if you're willing to be a bit adventurous, is pull > > out the content you want from the different models you want, and dump > > the results into one big list (a list doesn't care what types of > > objects it contains).

Right place to put content-length handler

2007-04-30 Thread meledictas
Hi I need to do something with file upload request body that has size greater than limit. I would like to handler it quick as possible (base HTTP handler) with simplicity in mind (middleware) Any idea is welcomed chatchai --~--~-~--~~~---~--~~ You received

Re: "Complex" Views/Generic Views

2007-04-30 Thread Bryan Veloso
> What you *can* do, if you're willing to be a bit adventurous, is pull > out the content you want from the different models you want, and dump > the results into one big list (a list doesn't care what types of > objects it contains). Then you can take advantage of Python's > list-sorting faciliti

Re: "Complex" Views/Generic Views

2007-04-30 Thread James Bennett
On 4/30/07, Bryan Veloso <[EMAIL PROTECTED]> wrote: > I have a blog, and I have 3 post types, regular posts (Entry), > videocasts and tutorials. Now, I want to be able to have all of these > grouped in chronological order and then spit out to the user as such. > (Hopefully that makes sense). I'm g

Re: Email error ...

2007-04-30 Thread Malcolm Tredinnick
On Mon, 2007-04-30 at 18:02 +, dbee wrote: > So basically I'm sending off an email like this ... > > send_mail(email_title, email_text, new_data.get('email'), > '[EMAIL PROTECTED]') > > It seems to think that the myaddress email is a list, and it breaks it > up and sends letter at a time. >

django settings problem

2007-04-30 Thread whidbey
I dint' use the host's django. I make my own django folder in my home path ,It's last trunk 0.96 ~/dango/django_src and in my .bash_profile I export my django before the default sys path but I can't change any thing,any fact. when I use python import django django.__path__ It still print >>>

Re: form.as_ul() help text not wrapped?

2007-04-30 Thread Malcolm Tredinnick
On Mon, 2007-04-30 at 17:23 +0100, Christian Markwart Hoeppner wrote: > Hi there! > > Just a check. When printing a form with the as_ul() method, isn't the > help_text property of each field wrapped by any tag? Even if it's just a > span with or without some class, it would provide a useful hook

Re: Generic View pass multiple objects

2007-04-30 Thread Malcolm Tredinnick
On Mon, 2007-04-30 at 18:02 +0200, Nicolas Steinmetz wrote: > gsmith wrote: > > > > > Hello, > > I have a template file that when shown is going to be populated by > > data from two different tables. I want to use the generic view > > 'list_detail.object_list'. However, as far as I know I can

Re: How to render newforms dynamically created fields?

2007-04-30 Thread Malcolm Tredinnick
On Tue, 2007-05-01 at 10:49 +1000, Malcolm Tredinnick wrote: > On Mon, 2007-04-30 at 08:47 +0200, Mario Graziosi wrote: > > I have a form with several checkboxes created dynamically, where each > > field has a name similar to "mycheck_xxx". From within the template I > > don't know how many chec

Re: How to render newforms dynamically created fields?

2007-04-30 Thread Malcolm Tredinnick
On Mon, 2007-04-30 at 08:47 +0200, Mario Graziosi wrote: > I have a form with several checkboxes created dynamically, where each > field has a name similar to "mycheck_xxx". From within the template I > don't know how many checks the form holds, since these are built > dynamically. How can I re

Using components from the Admin page elsewhere

2007-04-30 Thread Trilok
I am creating a new second admin page with features different from the existing one and it would save me a lot of time if I could use components from the django Admin interface. I don't want to modify the existing admin interface. Is there a way to access components like the calendar? Thanks! Tril

Re: Using Django outside of Django

2007-04-30 Thread Joseph Heck
Setting your python path in the environment and importing away works very well for me. I used django components frequently outside of the web interface, often driven by cron, to do background tasks. django-admin.py shell is handy, but I get as much from just setting up my environment and invoking

Using Django outside of Django

2007-04-30 Thread Mike H
Hi all, I'm sure this has been discussed elsewhere, but common terms like "using" "django" "models" and "scripts" make it hard to find! ;) I've written a nice multi-user mp3 jukebox for our office, it lets users add tracks to their playlist and then interleaves the playlists so that everyone

Re: How to render newforms dynamically created fields?

2007-04-30 Thread Phil Davis
On 30/04/07, Mario Graziosi <[EMAIL PROTECTED]> wrote: > > I have a form with several checkboxes created dynamically, where each > field has a name similar to "mycheck_xxx". From within the template I > don't know how many checks the form holds, since these are built > dynamically. How can I rende

Re: DateField returns 'str' object has no attribute 'strftime'

2007-04-30 Thread Phil Davis
On 30/04/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > [...] > Same problem: > AttributeError at /telecom/conference/detail/9/ > 'tuple' object has no attribute 'strftime' > > This happens on update of newform. What am I doing wrong? > > view code: > - [...] > conf.co

Re: How to render newforms dynamically created fields?

2007-04-30 Thread JeffH
Two thoughts on this: First: you could define an appropriate label for the dynamic formfields as you create them in your FormList class (not shown here) such as the name of the thing that would be deleted, and then use the as_p shortcut to render the whole form rather than trying to loop: with a

Re: How to render newforms dynamically created fields?

2007-04-30 Thread Brandon Low
How about just changing the widget on the deleteable objects to a checkbox widget that displays the fieldname and the checkbox input? --Brandon On 2007-04-30 (Mon) at 18:21:21 +0200, Mario Graziosi wrote: > > I'm not quite sure it's a database design problem. > > What I'm trying to do is to di

Having problems adding data to user's profile

2007-04-30 Thread MattW
Dear All, I'm working on an MCQ-based site. I'm trying to record the questions that people have done (in the database), using the profile, but I'm having problems updating the data Model.py: class UserProfile(models.Model): user = models.ForeignKey(User, unique=True, edit_inline=True)

"Complex" Views/Generic Views

2007-04-30 Thread Bryan Veloso
Just want to thank everybody for their help so far. :) The responses here are a lot faster than I had expected. Anyway, here's my next question. I have a blog, and I have 3 post types, regular posts (Entry), videocasts and tutorials. Now, I want to be able to have all of these grouped in chronolo

Re: How to do this in Django?

2007-04-30 Thread Julio Nobrega
You can specify what frame should a page be loaded by putting its name on the "target" link attribute. What you'll have on your left frame are links to the right one. Most browsers won't reload the page when an anchor is clicked for a page already being displayed. So the browser will understa

Re: How to do this in Django?

2007-04-30 Thread James Bennett
On 4/30/07, Pythoni <[EMAIL PROTECTED]> wrote: > Julio,Thank you for your reply. > But can you provide some more details, please? > How can be a focus set in frames with anchors? > Thanks for reply. You might want to start with something like this to find tutorials on how to use frames in HTML: h

Re: How to do this in Django?

2007-04-30 Thread Pythoni
Julio,Thank you for your reply. But can you provide some more details, please? How can be a focus set in frames with anchors? Thanks for reply. L. On Apr 30, 8:45 pm, "Julio Nobrega" <[EMAIL PROTECTED]> wrote: > I don't know how Google Groups implemented, but wouldn't two frames > with anchors

form.as_ul() help text not wrapped?

2007-04-30 Thread Christian Markwart Hoeppner
Hi there! Just a check. When printing a form with the as_ul() method, isn't the help_text property of each field wrapped by any tag? Even if it's just a span with or without some class, it would provide a useful hook for the ones feeling more designer than coder. And also for the lazy coders like

Re: Import Errors - Development vs. Production

2007-04-30 Thread Bryan Veloso
Thanks James, that helped a lot. I also ran into the --pythonpath toggle for manage.py which also did the job. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: How to do this in Django?

2007-04-30 Thread Julio Nobrega
I don't know how Google Groups implemented, but wouldn't two frames with anchors work? You don't "need" Django for this, it's just HTML. On 4/30/07, Pythoni <[EMAIL PROTECTED]> wrote: > > Is it possible to use in Django views two "windows" related together? > I mean something similar to Google

How to do this in Django?

2007-04-30 Thread Pythoni
Is it possible to use in Django views two "windows" related together? I mean something similar to Google groups . If you choose Tree view, in Google groups, you have one "window'" of authors and the other with their replies. Now that you click on any author his reply will move to the top of the

Re: Mac OS X + Django; how do I invoke the fcgi?

2007-04-30 Thread Mark Phillips
Thanks. I have to run out but will check into this as soon as I return to the office. On Apr 30, 2007, at 11:16 AM, Joseph Heck wrote: > Gotcha - > > Assuming that you were able to start the service as in the > instructions at the end of that page (i.e. > django-fcgi.py --settings=myproject.

Re: Mac OS X + Django; how do I invoke the fcgi?

2007-04-30 Thread Joseph Heck
Gotcha - Assuming that you were able to start the service as in the instructions at the end of that page (i.e. django-fcgi.py --settings=myproject.settings --host 127.0.0.1 --port 8882 --daemon) and that you didn't see any errors with that, the problem is likely in the connection between the Apac

Re: Mac OS X + Django; how do I invoke the fcgi?

2007-04-30 Thread Mark Phillips
Thank you, Joe, for the reply. I wasn't sure if there was anyone on the list who is familiar with osx server. I followed the instructions at and the "updated" instructions linked from that page. I am trying to use Apache 1.3. I have Apache 2 on th

Re: Recommended Editor/IDE

2007-04-30 Thread Todd O'Bryan
Does anybody have a sense of how hard it would be to add code completion support for Django to Pydev? I think the problem is that there are some many instance variables and functions that are computed on the fly, rather than being declared in the classes' init functions. Todd On Mon, 2007-04-30

Re: Email error ...

2007-04-30 Thread Jeremy Dunck
On 4/30/07, dbee <[EMAIL PROTECTED]> wrote: ... > I've tried ['[EMAIL PROTECTED]']. No luck though. I'm out of > ideas. I've looked at the python docs and I can only find a > sendmail(), not a send_mail() :-( Are you sure you didn't try this: ('[EMAIL PROTECTED]') as opposed to this? ['[EMA

Email error ...

2007-04-30 Thread dbee
So basically I'm sending off an email like this ... send_mail(email_title, email_text, new_data.get('email'), '[EMAIL PROTECTED]') It seems to think that the myaddress email is a list, and it breaks it up and sends letter at a time. So that any reply is addressed to [EMAIL PROTECTED], [EMAIL PR

Re: Recommended Editor/IDE

2007-04-30 Thread G.J. Souverein
2007/4/30, Sat <[EMAIL PROTECTED]>: > > > Hi, > > Is there a recommended editor or IDE for windows that is django savvy? > Ideally, I am looking for one that handles bundles/snippets for django > as well as syntax highlighting and code completion for django and > python. > > Thanks in advance for y

Cool Nature Collections >> 972 Slides

2007-04-30 Thread Kooooool forwords
[image: Next slide] [image: Smoky Mountains National Park, Tennessee * 1600 x 1200 * (663KB)]

Re: Mac OS X + Django; how do I invoke the fcgi?

2007-04-30 Thread Joseph Heck
Hi Mark, Your question doesn't leave enough detail to really fill in an answer. Which instructions did you use (the URL), and where is it failing? If you've got Django set up with FCGI, you're probably routing the requests through either the built-in Apache server or something like Lighttpd or NGi

And after many questions in this place...

2007-04-30 Thread Grupo Django
I'm happy to announce that I've released my first site based in django, I'm very happy, and I want to say thank you to all the people who made it possible, the django developers, and all the users of this forum. The site is: http://www.universoheroes.com (The server needs more RAM at this moment,

Re: DateField returns 'str' object has no attribute 'strftime'

2007-04-30 Thread [EMAIL PROTECTED]
Same problem: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/ site-packages/django/core/handlers/base.py" in get_response 77. response = callback(request, *callback_args, **callback_kwargs) File "/Users/dahl/Code/telecom/confmngr/vie

Re: Recommended Editor/IDE

2007-04-30 Thread raminf
I've been using a mix of Eclipse with PyDev to do Django work. It works well except for Django code completion (none of the IDEs seem to support it well enough to be useful). I've also had pretty good luck with Komodo, but with Eclipse you can also do front-end javascript development with Aptana i

Re: ./manage loaddata (fixtures) problem with postgresql

2007-04-30 Thread Michel Thadeu Sabchuk
Yep! I got the last checkout and it's working now :) sorry about that... Thanks Vinay! Best regards Michel Thadeu Sabchuk --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this grou

Re: DateField returns 'str' object has no attribute 'strftime'

2007-04-30 Thread [EMAIL PROTECTED]
Would you mind posting your code snippet here. I have the same issue. I thought the widget dealt with the creation of the datetime.date obj? best regards, David On Apr 20, 4:56 am, Henrik Lied <[EMAIL PROTECTED]> wrote: > Hi Malcolm, > > I just figured it out - with some help in the IRC-channel

Re: How to render newforms dynamically created fields?

2007-04-30 Thread Mario Graziosi
I'm not quite sure it's a database design problem. What I'm trying to do is to display a list of database-based items (e.g. questions) with a "delete" check-box tied to each item. On post, if the checkbox is checked, I'll delete the corresponding database item. Thus, the check-box is not tied

Re: Generic View pass multiple objects

2007-04-30 Thread gsmith
yep that worked...thanks! On Apr 30, 11:02 am, Nicolas Steinmetz <[EMAIL PROTECTED]> wrote: > gsmith wrote: > > > Hello, > > I have a template file that when shown is going to be populated by > > data from two different tables. I want to use the generic view > > 'list_detail.object_list'. Howev

Re: Generic View pass multiple objects

2007-04-30 Thread Nicolas Steinmetz
gsmith wrote: > > Hello, > I have a template file that when shown is going to be populated by > data from two different tables. I want to use the generic view > 'list_detail.object_list'. However, as far as I know I can only pass > one queryset to the object_list view. Is there a way that I c

Generic View pass multiple objects

2007-04-30 Thread gsmith
Hello, I have a template file that when shown is going to be populated by data from two different tables. I want to use the generic view 'list_detail.object_list'. However, as far as I know I can only pass one queryset to the object_list view. Is there a way that I can pass two QuerySet's? For

Help with a Rota system

2007-04-30 Thread mrben
I've been trying to get my head around the best way to implement a rota system. Essentially what I plan to do is: a) Have a list of jobs, with their descriptions b) Have a pool of people who can perform each job, either by linking a user profile to the job, or listing users in a field in the job

Mac OS X + Django; how do I invoke the fcgi?

2007-04-30 Thread Mark Phillips
Hello from a newbie on this list. I assume I am asking a time worn question but having scoured the web site and sifted through the archives, I haven't found the answers the holes in my understanding of how this works. I spent three hours yesterday setting up Django on Mac OS X 10.4.9 usin

Web Sitemize Bekleriz

2007-04-30 Thread Uğur AYDIN
Merhaba, Yepyeni bir slayt paylaşım sitesi açılmıştır. Web sitemize ücretsiz bir şekilde üye olarak slayt indirebilir ve yayınlanması için bizlere slayt gönderebilirsiniz. Lütfen sitemize bir göz atınız. www.slaytube.com Adresimiz: www.slaytube.com Saygılar www.SlayTube.Com

Re: Newforms and CSS classes

2007-04-30 Thread Honza Král
On 4/30/07, Christian Joergensen <[EMAIL PROTECTED]> wrote: > Hi Hi, > > Is it possible to have css classes attached to newforms widgets? I would > like to be able to distinguish between fx. checkboxes, radio buttons, > submit buttons, text fields (which are all 's). well, you can pass args={'cla

Web Sitemize Bekleriz

2007-04-30 Thread Uğur AYDIN
Merhaba, Yepyeni bir slayt paylaşım sitesi açılmıştır. Web sitemize ücretsiz bir şekilde üye olarak slayt indirebilir ve yayınlanması için bizlere slayt gönderebilirsiniz. Lütfen sitemize bir göz atınız. www.slaytube.com Adresimiz: www.slaytube.com Saygılar www.SlayTube.Com

Re: Recommended Editor/IDE

2007-04-30 Thread Jason McVetta
Another vote for Eclipse + PyDev + Subclipse. Not mentioned by the others: it's easy to run the Django development server inside the PyDev debugger. On 4/29/07, Sat <[EMAIL PROTECTED]> wrote: > > > Hi, > > Is there a recommended editor or IDE for windows that is django savvy? > Ideally, I am loo

Newforms and CSS classes

2007-04-30 Thread Christian Joergensen
Hi Is it possible to have css classes attached to newforms widgets? I would like to be able to distinguish between fx. checkboxes, radio buttons, submit buttons, text fields (which are all 's). In the oldforms module when having a required charfield, there would be a class="vTextField required" t

Re: Recommended Editor/IDE

2007-04-30 Thread [EMAIL PROTECTED]
I use Gvim on Windows. You can find indentation and syntax highlighting files on vim.org as well as SnippetEmu, a Textmate-like snippet system for Vim. I don't use SnippetEmu, so I can't comment on it, but I don't think it has Django snippets out of the box, so you'll have to write them yourself

The New 2006 Paypal Oprah Approve

2007-04-30 Thread watermalon1
Are you ready for the new and improved way to make instant money right into your paypal account. Oprah has proved that with $7 dollars, a free paypal account and 30 minutes of your time, you can make between $50,000 and $80,000. Paypal has even verified this Program is 100% legal. So if you can ma

Re: context sensitive menus

2007-04-30 Thread 5264277-ew5264277
Hi, In a regule view/template. Thanks, Andrew = From Web Mail Andrew Holt, Managing Director, 4A Solutions Office : +44(0)1257 268351 Mobile: +44(0)7841 340 608 email: [EMAIL PROTECTED] veritas vos liberabit -- The tr

Re: context sensitive menus

2007-04-30 Thread Jeff
Are you doing this in Django admin or in a regular view/template? Jeff On Apr 30, 8:41 am, "5264277-ew5264277" <[EMAIL PROTECTED]> wrote: > Hi, > > I am fairly new to Django, so this may be an easy question. > > I have an app where I have a team member table. One of the attributes is the > team

context sensitive menus

2007-04-30 Thread 5264277-ew5264277
Hi, I am fairly new to Django, so this may be an easy question. I have an app where I have a team member table. One of the attributes is the team that they are a member of. What I want to do is have a drop down menu that lists the team, and another which only lists the members of that team. A

edited_inline

2007-04-30 Thread [EMAIL PROTECTED]
When object A is created inline in object B admin interface, is their any pretty java-script way to do this, when you do not know, how many objects A you can get? If number of object A can vary from 2 to 20, admin form can look quite ugly with 20 blank forms. --~--~-~--~~

Re: Recommended Editor/IDE

2007-04-30 Thread Filipe Correia
This is a recurring topic, I think you'll find valuable information on this thread: http://groups.google.com/group/django-users/browse_frm/thread/9bb9f42090ed316e If you're developing on windows, I advise you to try pyscripter: http://pyscripter.googlepages.com/ Haven't yet tried it myself, but p

Re: How to render newforms dynamically created fields?

2007-04-30 Thread [EMAIL PROTECTED]
And yes, exactly this example was in tutorial, wasn't 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-users@googlegroups.com To unsubscribe from

Re: How to render newforms dynamically created fields?

2007-04-30 Thread [EMAIL PROTECTED]
I'm quite sure you've messed up the database design. You should have two classes: one wich is associated with the form(question, for example), one with the checkboxes(for example, answers), connected to question via ForeignKey. Each question will have answer_set attribute, containing all the answ

Re: Recommended Editor/IDE

2007-04-30 Thread Jarek Zgoda
James Bennett napisał(a): >> Is there a recommended editor or IDE for windows that is django savvy? >> Ideally, I am looking for one that handles bundles/snippets for django >> as well as syntax highlighting and code completion for django and >> python. > > I believe ActiveState's Komodo IDE can

Re: Recommended Editor/IDE

2007-04-30 Thread Sidi Mohamed ELAATIFI
Hi, Now I'm using Eclipse(PyDev,Aptana,Subeclipse) it's very productive. But if you are looking for bundles/snippets you can use Scribes on Gnome (but there is no django template language support) You can try with vim there is a support for django template language On 4/30/07, Sat <[EMAIL PROTE

saving images

2007-04-30 Thread [EMAIL PROTECTED]
Hello everyone, I am currently working on quite large-scale django-database. What client needs is a huge database of articles, and each article will be accompanied by 10-15 images, inside the article's body. Images and articles should be uploaded via admin interface. Right now I've solved the pro

How to render newforms dynamically created fields?

2007-04-30 Thread Mario Graziosi
I have a form with several checkboxes created dynamically, where each field has a name similar to "mycheck_xxx". From within the template I don't know how many checks the form holds, since these are built dynamically. How can I render them using the Django template system? For example, this is