utils.text.urlquote returns unicode?

2007-10-11 Thread Thomas Guettler
Hi, I looked at the source of urlquote: utils/text.py: def urlquote(url, safe='/'): """ A version of Python's urllib.quote() function that can operate on unicode strings. The url is first UTF-8 encoded before quoting. The returned string can safely be used as part of an argument

Re: Integrate xmpppy with django

2007-10-11 Thread Jarek Zgoda
This is the simplest (and for me - obvious) way of doing such things. I see 2 possiblities: either write it as a "long-running", traditional daemon (if you do not have your own XMPP server) or as Jabber/XMPP server component. The former is simpler, the later gives you more flexibility and seems mo

Re: Validation of dynamically generated forms

2007-10-11 Thread pinco
Great! Thank you very much Frank. On 10 Ott, 22:03, FrankW <[EMAIL PROTECTED]> wrote: > I would swear that I posted a response to this earlier today, but it > doesn't seem to show up in the group. The problem you're having is > because of the 'cart_item_' that you are adding in. It is not being

Watch TV stations from around the World

2007-10-11 Thread jrou
Even watch the War in Iraq live and uncensored from your PC or Laptop for FREE after a small onetime installment fee. 1,000's more stations. http://jblog.ipodpsp.hop.clickbank.net --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Format date according to locale

2007-10-11 Thread Michal Konvalinka
Hi, I couldn't find anything about formatting a date according to locale. I have four languages in my settings.py, I use language switcher and everything works fine. I have a date, for example date_of_birth = models.DateField(null=True, blank=True) in my model and I don't know how to format it ac

Stockphoto and zipfiles

2007-10-11 Thread thomas_c
Hi everybody! I have installed the application "Stockphoto" on my website. i can add gallery and photos. I have read that we can upload zipfiles directly for a gallery. And I don't know how can i make it! If you have any idea, i'm interested Thanks Thomas --~--~-~--~~---

recepci n a IslamInDepth.com en espa ol

2007-10-11 Thread malah
http://www.islamindepth.com/contents/details/125 --~--~-~--~~~---~--~~ 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 this grou

Re: NameError when following tutorial in djangobook.com/en/beta/chapter03/

2007-10-11 Thread drdukk
Turned out I was missing an import statement for my code in urls.py (and it's in the tutorial but I missed it) Cheers --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, sen

Re: NameError when following tutorial in djangobook.com/en/beta/chapter03/

2007-10-11 Thread drdukk
Turned out I was missing an import statement for my code in urls.py (and it's in the tutorial but I missed it) Cheers --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, sen

Re: NameError when following tutorial in djangobook.com/en/beta/chapter03/

2007-10-11 Thread drdukk
Turned out I was missing an import statement for my code in urls.py (and it's in the tutorial but I missed it) Cheers --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, sen

Re: Validation of dynamically generated forms

2007-10-11 Thread pinco
Frank, your snippet works great. I just removed the int conversion on bf_data, since I want to have f.is_valid() = false if the user submits something different than an integer. Without you I would never be able to solve the problem. Thanks a lot. On 11 Ott, 09:51, pinco <[EMAIL PROTECTED]> wr

Re: Users vs Sites

2007-10-11 Thread Chris Hoeppner
There *can* be other solutions, but most would be cumbersome and ugly, like adding a "group" column to each table (the simple way), or using a polymorphic relationship (the cleaner, leaner, and harder way). You'll find yourself coding an authorization system on top of django's. And when it's done

Add Column to ManyToMany Generated Table

2007-10-11 Thread TopRamen
Gentlemen, I'm new to the Django seen and am currently working on my first application in it. In part of my model, I have a ManyToMany relationship between the Purchase class and the Product class. The ManyToMany relationship is called products and is in the Purchase class. I'd like to add some ad

Re: How to delete a table?

2007-10-11 Thread TopRamen
Greg, if you do not mind losing any sample data you may have in your tables, you could do a 'python manage.py reset . This will execute the output of 'python manage.py sqlreset in your database. Basically, it will delete your tables, and re-run a syncdb, which will re-build your database's tables

Re: NameError when following tutorial in djangobook.com/en/beta/chapter03/

2007-10-11 Thread Jeremy Dunck
On 10/10/07, drdukk <[EMAIL PROTECTED]> wrote: > > I'm new to python and django and I'm trying to follow the tutorial on > djangobook.com, but when i get to the step (chapter 3) where the first > piece of code should be executed (current_time) i get a NameError > telling me "name 'current_datetime

Re: Users vs Sites

2007-10-11 Thread MarcoX
Good morning Chris. Thank you for the reply. I'm developing a CMS (Content management system). I have 4 sites for 1 customer. For this 4 sites the users are the same, but the inner users (journalist) that write the stories for the CMS can write only for 1 site. Then I need to only bind a group of

Using Django's builtin documentation

2007-10-11 Thread Rufman
Django uses docutils and restructured text for the documentation of the admin. How can i get my own documentation of my views and models (restructured text) to show on the documentation page in the django admin (dashboard -> documentation)? Just out of interest: Does anyone know how the core of t

Re: TypeError in Django Admi with edit_inline

2007-10-11 Thread mrsynock
Finally, I use primary_key instead of Unique. this is not exactly the same but does what I want. And that's work --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send emai

Re: Format date according to locale

2007-10-11 Thread Jarek Zgoda
Take a look at babel (http://babel.edgewall.org/). Not all formats are implemented, byt chances are, that you'd get something more if standard date filter is not enough. On 11 Paź, 10:19, "Michal Konvalinka" <[EMAIL PROTECTED]> wrote: > Hi, > I couldn't find anything about formatting a date accor

Label and input Filed overlap

2007-10-11 Thread Nader
Hallo, I have used the Admin interface in my model. In presentation of Admin page some of the labels have been not present completely. I give an example: This the definition of a attribute in a model transferMechanism = models.CharField(primary_key=True, maxlength=100) But in presentation page

Re: How to delete a table?

2007-10-11 Thread Nader
You can drop your table in sqlite session without deleting the other tables. You can do that in sqlite by the next command: sqlite>drop table Orders; On Oct 11, 11:15 am, TopRamen <[EMAIL PROTECTED]> wrote: > Greg, if you do not mind losing any sample data you may have in your > tables, you cou

TransactionManagementError behind mod_python only

2007-10-11 Thread olivier
Hi group, my setup : win xp, python 2.5, apache 2.2.4, postgres 8.2, mod_python 3.3.1, psycopg2 2.0.5 I have some views decorated by @transaction.commit_manually. I do transaction.commit() or transaction.rollback() before response, as I should. Everything is running fine when I run the develop

Re: Add Column to ManyToMany Generated Table

2007-10-11 Thread Russell Keith-Magee
On 10/11/07, TopRamen <[EMAIL PROTECTED]> wrote: > > Gentlemen, I'm new to the Django seen and am currently working on my > first application in it. In part of my model, I have a ManyToMany > relationship between the Purchase class and the Product class. The > ManyToMany relationship is called pro

manage.py test can't find the fixtures

2007-10-11 Thread Simone Cittadini
I have this directories structure site/app_one/models.py site/app_one/tests.py site/app_one/fixtures/test.json if I 'manage.py loaddata test' it works if I 'manage.py test' it doesn't find fixtures the test class starts with : import unittest from models import * class TestSmooth(unit

Re: Label and input Filed overlap

2007-10-11 Thread Phil Davis
On 11/10/2007, Nader <[EMAIL PROTECTED]> wrote: > I have used the Admin interface in my model. In presentation of Admin > page some of the labels have been not present completely. I give an > example: [...] > transferMechanism ( here comes the widget). > I can't display the widget here but the wid

Re: Format date according to locale

2007-10-11 Thread Michal Konvalinka
I suppose that django should do this. In documentation are mentioned some constants, which are present in django/conf/locale/en/LC_MESSAGES/django.po : DATE_FORMAT, DATETIME_FORMAT and others. How can I use it in python and template code? On 11/10/2007, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > >

Re: manage.py test can't find the fixtures

2007-10-11 Thread Russell Keith-Magee
On 10/11/07, Simone Cittadini <[EMAIL PROTECTED]> wrote: > > if I 'manage.py test' it doesn't find fixtures ... > class TestSmooth(unittest.TestCase): This is the problem here - your test needs to extend django.test.TestCase to identify and load fixtures. Yours, Russ Magee %-) --~--~-~-

Re: Label and input Filed overlap

2007-10-11 Thread Nader
I suppose that I can copy the system 'forms.css' file to local directory (my own project directory) and change the parameter with which the distance will be adjusted. Could you tell me which parameter do I have to change? Cheers, Nader On Oct 11, 1:37 pm, "Phil Davis" <[EMAIL PROTECTED]> wrote:

Multilanguage - I know what I want, should I do it this way?

2007-10-11 Thread simono
Hi, I'm currently working on a simple CMS that needs to be multilanguage. I've read through all the posts on the list and came up with this simple solution. My use scenario is like this: * translations are per model (not per field) * language selection is per request (saved in a cookie or so) I

Re: Multilanguage - I know what I want, should I do it this way?

2007-10-11 Thread Horst Gutmann
Well, IMO you would have some ForeignKey back to a language neutral model where you can also store those fields you want to share in all languages. Then you could use the unique_together attribute for the Meta class of your language-dependent model. Something like: class Article(models.Model):

linking to external resources

2007-10-11 Thread bayo opadeyi
Hi, I am new to django and am rewriting a site i did with php. In the php app, i could link to some external .pdf or .chm files like this file_name, where the path and filename were drawn from a mysql database, and the file will just open. while trying to reproduce this functionality in django, i'v

Re: utils.text.urlquote returns unicode?

2007-10-11 Thread Malcolm Tredinnick
On Thu, 2007-10-11 at 09:32 +0200, Thomas Guettler wrote: > Hi, > > I looked at the source of urlquote: > > utils/text.py: > > def urlquote(url, safe='/'): > """ > A version of Python's urllib.quote() function that can operate on unicode > strings. The url is first UTF-8 encoded bef

Better FileField

2007-10-11 Thread Thomas Guettler
Hi, I like django, but not models.FileField. * I don't want to store the files in MEDIA_ROOT, since the access needs to go through django for authentication. * The containing directory should be given by the model of the FileField. Example: class MyFriend(models.Model): picture=model

Re: Multilanguage - I know what I want, should I do it this way?

2007-10-11 Thread Alex Koshelev
Look at this: http://code.google.com/p/django-multilingual/ --~--~-~--~~~---~--~~ 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 fro

Re: Better FileField

2007-10-11 Thread Malcolm Tredinnick
On Thu, 2007-10-11 at 15:04 +0200, Thomas Guettler wrote: > Hi, > > I like django, but not models.FileField. > > * I don't want to store the files in MEDIA_ROOT, since >the access needs to go through django for authentication. > > * The containing directory should be given by the model of t

Re: Newforms Field Limit Question

2007-10-11 Thread Joseph Kocherhans
On 10/10/07, machineghost <[EMAIL PROTECTED]> wrote: > > I recently attempted to implement a very large form using the newforms > library, and I discovered that if a form contains more than 45 fields > it generates a "too many values to unpack" error when you try to > render it in a template. Doe

Re: Linking dropdowns using newforms

2007-10-11 Thread Emmchen
Thanks guys! I'll look into JS then and hopefully I'll be able to solve my problem. Thanks for the hints. /emma --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send ema

Re: dict objects are unhashable

2007-10-11 Thread kevinski
You were right the problem was in the urls. Thank you so much for your help! --~--~-~--~~~---~--~~ 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 T

generic views

2007-10-11 Thread Gigs_
hi all im learning django with djangobook.com im stuck in chapter 9 at Lists of objects. i just cant get any list of objects in my template. what should i put in template to make this work? thanks! --~--~-~--~~~---~--~~ You received this message because you are

The signal is not working... I don't know what's wrong

2007-10-11 Thread Young Gyu Park
> > def delete_comment_by_entry(sender, instance, signal, *args, **kwargs): > entry = instance.id > try: > FreeComment.objects.filter > (object_id__exact=instance._get_pk_val()).delete() > except (FreeComment.DoesNotExist, AssertionError): > logger.info('free comment pos

Re: Better FileField

2007-10-11 Thread Marty Alchin
As Malcolm mentioned, I put a lot of time into a patch to solve a great many problems with FileField, even more than the ones you mentioned. It's not in trunk yet, and I don't know when it will be, but I'll answer your questions to give you an overview of how things will likely work. Keep in mind

Re: Multilanguage - I know what I want, should I do it this way?

2007-10-11 Thread simono
> Look at this:http://code.google.com/p/django-multilingual/ I dont want to use that, because it is basically unmantained - what it does is very nice and if I were sure this works with django 1.0 and such I would use it. Also I dont want to re-write D-M because it does a lot of things I dont need

Re: How to allow a ForeignKey field to be null

2007-10-11 Thread Greg
Jeremy, I tried and it still doesn't work. Below are part of my models.py and views.py files: models.py class Delivery(models.Model): name = models.CharField(maxlength=100) url = models.CharField(maxlength=100) class Orders(models.Model): s_name = models.CharField("Na

Re: TinyMCE in admin

2007-10-11 Thread Kenneth Gonsalves
On 11-Oct-07, at 10:51 AM, Jeremy Dunck wrote: >> . I still can't get django find the files textareas.js and >> tiny_mce.js. it's returning 404. Please help. Thank you >> > > What's your admin URL and what URL is being requested for the > textarea.js? > This is generally a matter of putting th

Re: The signal is not working... I don't know what's wrong

2007-10-11 Thread Alex Koshelev
1. Related objects are deleted automatically 2. post_delete signal sends when object already is deleted. so it has no primary key(id=None) On 11 окт, 17:33, "Young Gyu Park" <[EMAIL PROTECTED]> wrote: > > def delete_comment_by_entry(sender, instance, signal, *args, **kwargs): > > entry = inst

Re: How to allow a ForeignKey field to be null

2007-10-11 Thread Alex Koshelev
You must recreate your database tables for this application. See docs for "manage.py reset" --~--~-~--~~~---~--~~ 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@goo

Re: generic views

2007-10-11 Thread Alex Koshelev
the list you want to use in template must be in template context. use "extra_context" value On 11 окт, 17:31, Gigs_ <[EMAIL PROTECTED]> wrote: > hi all > > im learning django with djangobook.com > im stuck in chapter 9 at Lists of objects. > i just cant get any list of objects in my template. > >

Re: linking to external resources

2007-10-11 Thread Alex Koshelev
> open in the browser and just shows me lots of (IMHO) garbage it just binary data of your chm file. how do you serve static data? through apache or other? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django use

Re: deseb installation in ubuntu

2007-10-11 Thread Xan
On Oct 9, 9:50 pm, Derek Anderson <[EMAIL PROTECTED]> wrote: > well, is 7.04, site-packages is here: > /usr/lib/python2.5/site-packages/ > > but your problem obviously precedes this. did you muck with you > manage.py file? > > or, when you say "import setting.py", you're not literally typing >

Re: deseb installation in ubuntu

2007-10-11 Thread Xan
On Oct 9, 8:41 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > On 10/9/07, Xan <[EMAIL PROTECTED]> wrote: > > > Where is the error? > > In all seriousness, judging from your last several emails, it's time > for you to sit down and read the official documentation for Python; > most of your probl

Signals error - I can't do a import

2007-10-11 Thread Greg
Hello, I have a very strange error. When a Style gets deleted I want my signal to get called and the signal function will delete the appropriate photo. I created a new file called sig.py which just contains my 'thesignal' function. The problem arises when I do 'from mysite.plush.models import P

Re: The signal is not working... I don't know what's wrong

2007-10-11 Thread Young Gyu Park
On 10/11/07, Alex Koshelev <[EMAIL PROTECTED]> wrote: > > > 1. Related objects are deleted automatically No it's not working. that's why I am making this signal stubs. 2. post_delete signal sends when object already is deleted. so it has > no primary key(id=None) When I see the error page, I c

Re: Signals error - I can't do a import

2007-10-11 Thread Benjamin Slavin
Sounds like a circular import problem. You might want to try this: 8<= sig.py = def thesignal(sender, instance, signal, *args, **kwargs): from mysite.plush.models import Photo assert False, "It got here" 8<= sig.py = Regards, - Ben --~--~-~--~~

Need help with related objects.

2007-10-11 Thread aabele
Hallo - i'm kind of newbie in django, but actually like it very much. I need to make a search panel in web site where users could search worker by name, city etc, and by working time and day. I would like to make this panel using django db-api, not raw sql. Here are two models. --

Re: Using Django's builtin documentation

2007-10-11 Thread James Bennett
On 10/11/07, Rufman <[EMAIL PROTECTED]> wrote: > Django uses docutils and restructured text for the documentation of > the admin. How can i get my own documentation of my views and models > (restructured text) to show on the documentation page in the django > admin (dashboard -> documentation)? I

Re: deseb installation in ubuntu

2007-10-11 Thread Malcolm Tredinnick
On Thu, 2007-10-11 at 07:21 -0700, Xan wrote: [...] > Perhaps I have to read python doc, but my intention is only follow > deseb/django documentation. If normal user have to read python doc, > then django became not simple, I think Django is a framework for *Python programmers*. You do need to ha

Re: Using Django's builtin documentation

2007-10-11 Thread Jeremy Dunck
On 10/11/07, James Bennett <[EMAIL PROTECTED]> wrote: > > On 10/11/07, Rufman <[EMAIL PROTECTED]> wrote: > > Django uses docutils and restructured text for the documentation of > > the admin. How can i get my own documentation of my views and models > > (restructured text) to show on the documenta

Re: Using Django's builtin documentation

2007-10-11 Thread Jeremy Dunck
On 10/11/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > N.B. There is some doubt that the included patch will be included in > Django due to provenance issues with the copied functools code. There > is a current thread on django-dev regarding this. archive of thread: http://groups.google.com/grou

Switching between databases with same project/model

2007-10-11 Thread [EMAIL PROTECTED]
We are in the process of moving an existing webapp/database to django. One of the features of our existing setup is the ability to have a command line tool post data from a remote client to a production version of our database for all to see or post to a test database for personal/informal consum

Re: Signals error - I can't do a import

2007-10-11 Thread RajeshD
Perhaps try the import this way: // sig.py def thesignal(sender, instance, signal, *args, **kwargs): from mysite.plush.models import Photo assert False, "It got here" // --~--~-~--~~~---~--~~ You received this message bec

How to delete an image off the file system?

2007-10-11 Thread Greg
Hello, I have a function 'thesignal' that deletes the Photo record from a db table. However, after that is done the photo's still appear on the file system. How do i delete these photos? Here is what I have so far: /// models.py class Photo(models.Model): photo = models.Image

development server,wmv

2007-10-11 Thread [EMAIL PROTECTED]
i am at a rudimentary level. i have the development server properly serving image files. when i tried to serve a wmv file, i got the text data back. am i missing a step? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gr

Re: form_for_model should return TextareaWidget

2007-10-11 Thread Malcolm Tredinnick
On Thu, 2007-10-11 at 08:46 +0200, Thomas Guettler wrote: > Am Mittwoch, 10. Oktober 2007 15:09 schrieb Malcolm Tredinnick: > > On Wed, 2007-10-10 at 14:51 +0200, Thomas Guettler wrote: > > > Hi, > > > > > > How can I get a TextareaWidget with form_for_model()? > > > > > > I have a solution, but i

Re: development server,wmv

2007-10-11 Thread aabele
Incorrect header. Try to change mimetype. On Oct 11, 6:46 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > i am at a rudimentary level. i have the development server properly > serving image files. when i tried to serve a wmv file, i got the text > data back. am i missing a step? --~--~-

Re: How to delete an image off the file system?

2007-10-11 Thread Joshua Simpson
On Oct 11, 8:34 am, Greg <[EMAIL PROTECTED]> wrote: > Hello, > I have a function 'thesignal' that deletes the Photo record from a db > table. However, after that is done the photo's still appear on the > file system. How do i delete these photos? Here is what I have so > far: > You'll have to

Re: generic views

2007-10-11 Thread Gigs_
so i cant get list from models? from Author.objects.all() On Oct 11, 4:03 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote: > the list you want to use in template must be in template context. use > "extra_context" value > > On 11 окт, 17:31, Gigs_ <[EMAIL PROTECTED]> wrote: > > > hi all > > > im learn

Re: generic views

2007-10-11 Thread Gigs_
so if this is my template for that list my template my books app {% for name in "what goes here" %} {{ name }} {% endfor %} On Oct 11, 7:47 pm, Gigs_ <[EMAIL PROTECTED]> wrote: > so i cant get list from models? > from Author.objects.all() > > On Oct 11, 4:03 pm, Alex Koshelev <[EMAIL PRO

Re: generic views

2007-10-11 Thread Gigs_
and here is urls from myapp from django.conf.urls.defaults import * from django.views.generic import list_detail, date_based, create_update from books.models import Publisher, Author, Book author_list_info = { 'queryset':Author.objects.all(), "template_object_name" : "author", "extra

Re: development server,wmv

2007-10-11 Thread [EMAIL PROTECTED]
hm avi launches the media player, wmv comes back text On Oct 11, 12:30 pm, aabele <[EMAIL PROTECTED]> wrote: > Incorrect header. Try to change mimetype. > > On Oct 11, 6:46 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > > > i am at a rudimentary level. i have the development server pr

Re: generic views

2007-10-11 Thread Gigs_
yes i know. this is just for learning. thanks On Oct 11, 8:06 pm, "Marty Alchin" <[EMAIL PROTECTED]> wrote: > You'd replace "what goes here" with what you put in > "template_object_name": "author" (only without the quotes). Of course, > it'd be a little more readable if you use the plural "autho

Re: deseb installation in ubuntu

2007-10-11 Thread Xan
On Oct 11, 5:13 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Thu, 2007-10-11 at 07:21 -0700, Xan wrote: > > [...] > > > Perhaps I have to read python doc, but my intention is only follow > > deseb/django documentation. If normal user have to read python doc, > > then django became not

Re: generic views

2007-10-11 Thread Marty Alchin
You'd replace "what goes here" with what you put in "template_object_name": "author" (only without the quotes). Of course, it'd be a little more readable if you use the plural "authors", since you're getting a list of more than one author. -Gul --~--~-~--~~~---~--~---

Re: generic views

2007-10-11 Thread jake elliott
Marty Alchin wrote: > You'd replace "what goes here" with what you put in > "template_object_name": "author" (only without the quotes). Of course, > it'd be a little more readable if you use the plural "authors", since > you're getting a list of more than one author. actually you'll use "author_l

Re: deseb installation in ubuntu

2007-10-11 Thread Derek Anderson
your previous bug was a standard import issue unrelated to deseb. however this looks like it may be a real one. let me look into it. derek Xan wrote: > > > On Oct 11, 5:13 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: >> On Thu, 2007-10-11 at 07:21 -0700, Xan wrote: >> >> [...] >> >>

Re: Label and input Filed overlap

2007-10-11 Thread Phil Davis
On 11/10/2007, Nader <[EMAIL PROTECTED]> wrote: > > I suppose that I can copy the system 'forms.css' file to local > directory (my own project directory) and change the parameter with > which the distance will be adjusted. > Could you tell me which parameter do I have to change? Just look for "wi

IProblem with registration Form!

2007-10-11 Thread Prateek Parekh
Hello Everyone, I was working on a code created by someone else using the django framework. It is a registration form posted at: http://apps.cob.sjsu.edu/svce/svnif/registration/ And, it recently went online. However, i started receiving complaints from students that it doesn't work. After some de

Re: generic views

2007-10-11 Thread Gigs_
yes i figure out that after marty replay On Oct 11, 10:01 pm, jake elliott <[EMAIL PROTECTED]> wrote: > Marty Alchin wrote: > > You'd replace "what goes here" with what you put in > > "template_object_name": "author" (only without the quotes). Of course, > > it'd be a little more readable if you

Re: IProblem with registration Form!

2007-10-11 Thread Prateek Parekh
Apologies. I forgot to include the relevant views.py code if len(request.POST.get('team', '')) > 0: # there must be a team name to bother with this... t = Team(name=request.POST['team']) t.save() for i in range(int(request.POST['

Contractual Django Developer Position

2007-10-11 Thread Adam Jenkins
The Institute of Design of Chicago, IL is seeking an experienced Django developer to create an in-house contact and mailing web application. The application manages the contacts for the different conferences and events at the Institute of Design. The ideal candidate has experience with at least on

pagination documentation unclear

2007-10-11 Thread johnny
I was going over documentation on pagination and it mentions you can do it in two ways as follows: URL... ?page=x or (r'^objects/page(?P[0-9]+)/$', 'object_list', dict(info_dict)) My question is, you would use "URL... ?page=x" for regular views? "(r'^objects/page(?P[0-9]+)/$', 'object_list', d

Re: IProblem with registration Form!

2007-10-11 Thread Prateek Parekh
I was able to solve the problem. The code was truncating the field in Graduation year if it contained spaces. A little validation would fix the error. On Oct 11, 3:25 pm, Prateek Parekh <[EMAIL PROTECTED]> wrote: > Apologies. I forgot to include the relevant views.py code > > if len(request.P

Accessing many-to-many relations in save()

2007-10-11 Thread Adam Endicott
I've got an app where I'd like to set some properties in an object's save method based on ManyToMany relationships. I now realize that this doesn't work (at least through the Django admin), because the AddManipulator saves the object, and then saves the m2m relations afterwards. Basically this is

Re: What's going on with Row Level Permissions?

2007-10-11 Thread arv43
Does anyone know how and if Generic Authorization and RLP are going to fit together? It says on the RLP page to look at Generic Authorization to know how they do, but I am not sure how they do. Maybe am missing something. Are they both going to be rolled into the trunk sometime? or is it one vs th

Re: What's going on with Row Level Permissions?

2007-10-11 Thread Joseph Kocherhans
On 10/11/07, arv43 <[EMAIL PROTECTED]> wrote: > > Does anyone know how and if Generic Authorization and RLP are going to > fit together? It says on the RLP page to look at Generic Authorization > to know how they do, but I am not sure how they do. Maybe am missing > something. > Are they both goin

Stuck on generic relations

2007-10-11 Thread Doug B
I have a page that needs to display basic user information plus the last logged activity date for the user, and I need to be able to sort by that value. (there are two of these relations,I'm just mentioning one here) My SQL-fu is very, very weak and I just can't seem to get it. There is a table

Re: pagination documentation unclear

2007-10-11 Thread Steve Potter
On Oct 11, 5:43 pm, johnny <[EMAIL PROTECTED]> wrote: > I was going over documentation on pagination and it mentions you can > do it in two ways as follows: > > URL... ?page=x > or > (r'^objects/page(?P[0-9]+)/$', 'object_list', dict(info_dict)) > > My question is, you would use > > "URL... ?page=

Re: generic views

2007-10-11 Thread Marty Alchin
On 10/11/07, jake elliott <[EMAIL PROTECTED]> wrote: > > Marty Alchin wrote: > > You'd replace "what goes here" with what you put in > > "template_object_name": "author" (only without the quotes). Of course, > > it'd be a little more readable if you use the plural "authors", since > > you're getti

Object not callable

2007-10-11 Thread Cat
Hello Can anyone tell me why when I get to the line - form = InstanceForm(request.POST) in the following view (stepping through the code), I get a Type Error SurveyForm object is not callable. My understanding is that it should be as it subclasses Form def addEditSurvey(request, id = None):

Re: Object not callable

2007-10-11 Thread Jeremy Dunck
On 10/11/07, Cat <[EMAIL PROTECTED]> wrote: > Can anyone tell me why when I get to the line - form = > InstanceForm(request.POST) in the following view (stepping through the > code), I get a Type Error SurveyForm object is not callable. My > understanding is that it should be as it subclasses Form

Re: Object not callable

2007-10-11 Thread Cat
Hi Jeremy This is the definition Thanks Cat class SurveyForm(forms.Form): survey_name = forms.CharField(required = True) associated_company = forms.ModelChoiceField(queryset = Company.objects.all(), required = True) operator = forms.ModelChoiceField(queryset = Operator

Re: Stuck on generic relations

2007-10-11 Thread Doug B
Anwering my own question... it helps to specify an actual join condition. This worked: extra['last_event_when'] = "SELECT event_loggedevent.when FROM event_loggedevent,event_eventrelation WHERE (event_eventrelation.event_id = event_loggedevent.id) AND (event_eventrelation.content_type_id = %s) AN

new fastcgi for iis

2007-10-11 Thread Robert
Dunno who's seen this, but fyi: MS IIS now has official FastCGI support. I look forward to seeing how this'll work with Django installs under IIS. http://www.iis.net/php --rbt --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goo

template loading and generic views

2007-10-11 Thread Leo Shklovskii
I've got a question about the templates that the generic views load. I have a app (named 'foo' in this example) that has its templates in a templates folder to work with django.template.loaders.app_directories.load_template_source. so: foo/templates/bar.html foo/templates/bar_list.html Howeve

Re: Integrate xmpppy with django

2007-10-11 Thread est
Thank you all, I will try a daemon :) On Oct 11, 3:34 pm, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > This is the simplest (and for me - obvious) way of doing such things. > I see 2 possiblities: either write it as a "long-running", traditional > daemon (if you do not have your own XMPP server) or a

How to only show records that are less than 20 days old?

2007-10-11 Thread Greg
Hello, I have a model called Style that contains a DateField. It stores the date when the record was created. I want my template to only show Style records that were created less than 20 days ago. I think that this needs to be done within the view, but not sure if there is a filter that I can u

Re: Newforms Field Limit Question

2007-10-11 Thread machineghost
You are absolutely right Joseph, it was a bug in my code :-( I had: forms.ChoiceField(choices=["Yes", "No"]) instead of: forms.ChoiceField(choices=[("Yes", 1), ("No", 0)]) Thanks for the help. Jeremy --~--~-~--~~~---~--~~ You received this message because you a

Re: How to only show records that are less than 20 days old?

2007-10-11 Thread James Bennett
On 10/11/07, Greg <[EMAIL PROTECTED]> wrote: > I have a model called Style that contains a DateField. It stores the > date when the record was created. I want my template to only show > Style records that were created less than 20 days ago. I think that > this needs to be done within the view,

SEE INDIAN SEXY VIEDO AND PICS

2007-10-11 Thread suri
SEE INDIAN SEXY VIEDO AND PICS http://chromoo.blogspot.com/ --~--~-~--~~~---~--~~ 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

Newforms problem, my mistake or bug

2007-10-11 Thread Nikola Stjelja
In my quest to learn Django, I've encountered yet another problem. I tried to automaticly generate a form using the newforms model. It didn't work.Django outputted en error, that the model object didn't have the attributre EmailField. The I tried copy pasting the example form the django documentati

Re: Newforms problem, my mistake or bug

2007-10-11 Thread Alex Koshelev
It's your bug. You've written "from django.newforms import *" but use "forms.Form". Where did you import "form" module? Read the docs and think. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group.

  1   2   >