please see

2008-05-16 Thread @lirez@
please click here www.1alireza.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 from this group, send email

Re: Get just one object id at the time in view assignment issue.

2008-05-16 Thread Jorge Romo
I feel I'm getting close to an answer... I hope you guys can help me out... I get this TypeError: Records() takes exactly 3 non-keyword arguments (2 given) def Records (request, UserName, Name): gamer = Artist.objects.get(UserName=UserName) record = Record.objects.get(Name=Name)

Re: In qryset refactor did output of following change?

2008-05-16 Thread ydjango
adding to it. earlier I could do unassigned_contacts.count() now I get error "Cannot add count col with multiple cols in 'select'" On May 16, 8:15 pm, ydjango <[EMAIL PROTECTED]> wrote: > In qryset refactor branch would the output of following changed? > > unassigned_contacts =

ability to show intermediate results before final response

2008-05-16 Thread RaviKondamuru
Hi, How do i make my django app to show intermediate results/ steps before showing the final response. My script inherently takes a lot of time. I was wondering if there is a way to engage the user by showing partial intermediate results before showing the final response. thanks, Ravi.

In qryset refactor did output of following change?

2008-05-16 Thread ydjango
In qryset refactor branch would the output of following changed? unassigned_contacts = Contacts.values('id','last_name', 'first_name').filter(group__exact=my_group).exclude(pk__in=assignedparts) where assignedpart=[] and then loaded before the the above statement

Re: how to avoid uploading .py source files to shared hosting server

2008-05-16 Thread ydjango
Hahahaha, thats good friday night humor. I look forward to reading your upcoming book. Hopefully it has the same humor. On point 7) what about a navy seal who want to retire and start a software business, how do I design a selection system to avoid those. I do not want future competitor snooping

Re: dúvida

2008-05-16 Thread HILAL AY
* ı 'm to kid someone, kid, joke. * 17 Mayıs 2008 Cumartesi 05:47 tarihinde HILAL AY <[EMAIL PROTECTED]> yazmış: > siz neden aranızda ispanyolca konuşuyorsunuz bakalım ha? > > 2008/4/30 Andrews Medina <[EMAIL PROTECTED]>: > > >> On Wed, Apr 30, 2008 at 8:01 AM, pauloleandro <[EMAIL PROTECTED]>

Re: dúvida

2008-05-16 Thread HILAL AY
siz neden aranızda ispanyolca konuşuyorsunuz bakalım ha? 2008/4/30 Andrews Medina <[EMAIL PROTECTED]>: > > On Wed, Apr 30, 2008 at 8:01 AM, pauloleandro <[EMAIL PROTECTED]> > wrote: > > > > Bom dia, queria saber se o Django só aceita a linguagem Python, se é > > um framework desenvolido

How to use a string in filter()

2008-05-16 Thread M.Ganesh
Hi All, I am back with another query I have this (generic) view function --8>< def object_list(request, object, filter_string = None): if filter_string: object_list = object.objects.filter(filter_string) else:

django-tagging: How to generate a TagField input form in a template?

2008-05-16 Thread [EMAIL PROTECTED]
This question is related to the django-tagging application. I've added a TagField to my model, and it is working properly from the admin interface. However, I'd like to create a simple tag input field in my templates so users can add tags for a particular model. I don't want to create a form

Re: how to avoid uploading .py source files to shared hosting server

2008-05-16 Thread Steven Armstrong
James Bennett wrote on 05/16/08 20:11: > On Fri, May 16, 2008 at 11:52 AM, ydjango <[EMAIL PROTECTED]> wrote: >> I do not want to make it easy for some one who breaks in , either a >> outsider or may be an rougue hosting provider employee or contractor, >> to easily get access to all the

Re: Reference to the url of the current page in a template

2008-05-16 Thread M.Ganesh
Scott Moonen wrote: > Ganesh, > > First ensure that your TEMPLATE_CONTEXT_PROCESSORS contains: > > TEMPLATE_CONTEXT_PROCESSORS = ( > . . . > 'django.core.context_processors.request', > . . . > ) > > Then you can use the variable {{ request.path }} in your templates, > assuming that the

Re: Django and Linux distros

2008-05-16 Thread Steven Armstrong
JonSidnell wrote on 05/16/08 12:24: > Hi everyone > > I'm suddenly struck by the notion that I would like to be dev'ing > Django on Linux of some flavour rather than Windows. > > It's been a wee while since I stuck my toes in the Linux waters, so I > was wondering if anyone here has any

Re: Django and Linux distros

2008-05-16 Thread JonSidnell
Thanks for the feedback everyone! The deed is done and I've got myself set up with Ubuntu Desktop, MySQL all working with Django, and gedit customised a la http://grigio.org/pimp_my_gedit_was_textmate_linux to act a bit more like Textmate. I'm liking it so far :) Cheers Jon On May 16, 11:24 

Re: Sorting a dict by value for template rendering

2008-05-16 Thread Peter Rowell
Variations on this come up all the time. Note that arrays can be sorted. So, create an array of tuples containing the key and the value. Then you can sort the array anyway you please. In the view: # create the array of tuples ordered_dict = [(key, val) for key,val in my_original_dict.items()]

Re: displaying/editing multiple records at once

2008-05-16 Thread Jonathan Buchanan
ken wrote: > One thing I've wanted for a long time is a way to enter and view > financial information for stocks I follow. However, this typically > involves working with a table (in the graphical sense) of data, > wherein each piece of data in the table is modeled as a single SQL > record.

displaying/editing multiple records at once

2008-05-16 Thread ken
One thing I've wanted for a long time is a way to enter and view financial information for stocks I follow. However, this typically involves working with a table (in the graphical sense) of data, wherein each piece of data in the table is modeled as a single SQL record. Frameworks such as Django

Re: Filtering by group

2008-05-16 Thread Alex
Alright, I think it works now with this: queryset = Quote.objects.select_related(slug) Much simpler than what I was trying... On May 16, 3:55 pm, Alex <[EMAIL PROTECTED]> wrote: > I'm not sure if this is any closer, but maybe it is: > > queryset = Quote.objects.filter(source in >

Re: Filtering by group

2008-05-16 Thread Alex
I'm not sure if this is any closer, but maybe it is: queryset = Quote.objects.filter(source in series.tvepisode_set.select_related()), There's something wrong with the "source in" part, though... On May 16, 3:39 pm, Alex <[EMAIL PROTECTED]> wrote: > I'm playing around with a TV quotes database

Re: Problem with abstract model class

2008-05-16 Thread Legioneer
It looks that this is not the case. The problem seems to be more general. When I add abstract=True to ANY model I receive the same error. Example: class OrderItem(models.Model): num = models.IntegerField(default=1) timestamp = models.DateTimeField(auto_now=True) class Meta:

Sorting a dict by value for template rendering

2008-05-16 Thread bfrederi
I have a dict that looks similar to this: {'com': 'communication', 'tel': 'telephone', 'cel': 'cellphone', 'fax': 'fax machine',} And I want to sort it by value, and render it in a template. I was able to do it, but in a very hacked way. Can anyone show me a better way to do it than my solution.

Filtering by group

2008-05-16 Thread Alex
I'm playing around with a TV quotes database and I'm trying to get all quotes from one TV series. My problem is that the quotes are directly tied to an episode of a TV series, not the series itself. How can I easily get a queryset that represents all quotes from that series? Here's a snippet

Re: How to add an object with relations to other objects

2008-05-16 Thread Richard Dahl
For the first question, the db-api doc should provide this and more information, as I am not sure I completely understand, but here goes (assuming the following models): class B(models.Model): attribute = char()... class A(models.Model): attribute = char()... bs = m2m(B) in your

Re: Specifying schema name w/ syncdb

2008-05-16 Thread Jeff Gentry
> I'm using PostgreSQL - one question I had was that when I run syncdb, > the tables that are created are under the default 'public' schema. > Is there a way to specify syncdb to create these tables under another > schema name? Er, sorry about that. If I created the schema first, syncdb stuck

Re: Image upload not working in newforms admin?

2008-05-16 Thread Brandon Taylor
I finally got it to work, but I can't explain why. I followed this tutorial: http://paul.annesley.cc/articles/2007/11/19/django-and-python-imaging-library-pil-on-leopard One minute it wasn't working, the next it was. I've done this installation on a few computers, Win XP and Mac OS X 10.4.10/11

How to add an object with relations to other objects

2008-05-16 Thread jabbercat
Hello, it's my frist time I'm using this Group. My Problems: I have a class A and a class B with a one(A)-to-many(B) relationship between them. My first question: Is there an efficient way to get in a template all instances of B, which are related to an instance of A, when i only knew an

Re: accessing dictionary elements in opening tag of django template for loop

2008-05-16 Thread John
Thanks, John. Your second suggestion (that I find a way to modify the Document class) put me on the right track. I eventually found this article: http://blog.arbingersys.com/2008/04/google-app-engine-better-many-to-many.html which worked for my problem. On May 14, 7:17 pm, "John Lenton"

Bind MultiValueField?

2008-05-16 Thread brightnesslevels
Hello, I'm playing with MultiValueField which I want to be a part of a bound form. However, I can't push any value in it. When I use CharField instead, everything is okay and the value is displayed in charfield. However, when I replace charfield with my MultiValueField, nothing is rendered and

Updated to latest trunk root page (/) stopped working

2008-05-16 Thread Josh
So I ran an svn up on my Django install because I'm running into some issues that QuerysetRefactor should have fixed, and after doing so the root page of my site stopped working. Everything else appears to be working fine, just not /. In my browser it gives me a 502 Proxy Error (which is odd,

Caching: Memcached vs locmem

2008-05-16 Thread Brian
Can someone run down the differences between using Memcached vs locmem? The docs indicate Memcached is "the best" solution, but seems considerably harder to setup. Just curious what the trade-offs are. Thanks. --~--~-~--~~~---~--~~ You received this message

Re: Image upload not working in newforms admin?

2008-05-16 Thread mw
I'm having nothing but tons of trouble right now with the image field upload. I don't know what the problem is for sure, yet, but yeah I think that I'm willing to say that the ImageField isn't as easy to get working as it should be :-/ I think my problem may be OS X related and having to do

إلغاء اشتراك

2008-05-16 Thread mutib utibi
نرجو إلغاء الاشتراك بالرسائل شكراً _ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ --~--~-~--~~~---~--~~ You

Re: Uploading files to subdirectories

2008-05-16 Thread Mike Hjorleifsson
what happens in your example if sally has a holiday.rtf ? On May 16, 3:00 am, James McGill <[EMAIL PROTECTED]> wrote: > Hi All, > I'm new to Django and I'm not sure how best to achieve the following: > > Users may upload files - each uploaded file is tied to a user in the > database using a

Re: Add column to generated ManyToMany table and access from admin

2008-05-16 Thread Peter Bailey
Thanks Richard, I'll give it a go. Cheers On May 16, 2:44 pm, "Richard Dahl" <[EMAIL PROTECTED]> wrote: > I do not think that admin currently supports this, but I could be wrong. but > here are two ways to accomplish it. > > class Item(models.Model): >name =

Re: Add column to generated ManyToMany table and access from admin

2008-05-16 Thread Richard Dahl
I do not think that admin currently supports this, but I could be wrong. but here are two ways to accomplish it. class Item(models.Model): name = models.CharField(max_length=30) class ItemOrder(models.Model): item = models.FK(Item) order = models.int() def __unicode__(self):

Specifying schema name w/ syncdb

2008-05-16 Thread Jeff Gentry
Hi there ... I'm using PostgreSQL - one question I had was that when I run syncdb, the tables that are created are under the default 'public' schema. Is there a way to specify syncdb to create these tables under another schema name? --~--~-~--~~~---~--~~ You

Re: symmetrical associations

2008-05-16 Thread James Tauber
On May 14, 2008, at 5:53 PM, Russell Keith-Magee wrote: > Hi James, > > It sounds like you might be looking for ticket #6095 [1]. This lets > you define an intermediate model to use for m2m relations. This allows > you to put attributes on the arc, query over the arc attributes, and > be

Add column to generated ManyToMany table and access from admin

2008-05-16 Thread Peter Bailey
I am pretty new to Django, and am building a web generating app. I am hoping to get a lot of functionality out of the admin. So far that is working great. I do have 2 classes in my models that have a many to many relationship. The code is generated nicely and everything works correctly. The

Re: how to avoid uploading .py source files to shared hosting server

2008-05-16 Thread James Bennett
On Fri, May 16, 2008 at 11:52 AM, ydjango <[EMAIL PROTECTED]> wrote: > I do not want to make it easy for some one who breaks in , either a > outsider or may be an rougue hosting provider employee or contractor, > to easily get access to all the information - data and code. Again: if this is your

Image upload not working in newforms admin?

2008-05-16 Thread Brandon Taylor
Hi everyone, I can't get the newforms admin to upload images. I have PIL and JPEG support installed. My selftest on PIL reports that JPEG is supported, along with PNG, but when I try to upload, I get: Upload a valid image. The file you uploaded was either not an image or a corrupted. I can

Re: MySQL Boolean vs. PostgresQL Boolean

2008-05-16 Thread Szaijan
Thanks Karen. Actually, the behavior here is worst case, from my perspective, in that Ture/False values will update an instance, but will not be saved and no exception is thrown. When I try to update the model with a True/False value, it simply fails to update without giving any indication of

Re: how to avoid uploading .py source files to shared hosting server

2008-05-16 Thread jonknee
On May 16, 12:52 pm, ydjango <[EMAIL PROTECTED]> wrote: > I do not want to make it easy for some one who breaks in , either a > outsider or may be an rougue hosting provider employee or contractor, > to easily get access to all the information - data and code. > Your best bet is to ensure that

Re: Reference to the url of the current page in a template

2008-05-16 Thread Scott Moonen
Ganesh, First ensure that your TEMPLATE_CONTEXT_PROCESSORS contains: TEMPLATE_CONTEXT_PROCESSORS = ( . . . 'django.core.context_processors.request', . . . ) Then you can use the variable {{ request.path }} in your templates, assuming that the URLs are all on the same host. If not,

Re: Reference to the url of the current page in a template

2008-05-16 Thread Alex Koshelev
If you have `django.core.context_processors.request` context processor enabled and you use RequestContext so the `{{request.path}}` will return current path. Or you can simple pass `request.path` variable to the template context manually. On May 16, 8:58 pm, "M.Ganesh" <[EMAIL PROTECTED]> wrote:

Reference to the url of the current page in a template

2008-05-16 Thread M.Ganesh
Hi, I don't know how to clearly explain what I want to know. Let me try once again... I have a small controlpanel page which I include in all my other pages. This control panel page has got a link to 'login' page. Users are allowed to view the pages without login, but they have to login if

Re: Keeping track of which user did what

2008-05-16 Thread Richard Dahl
This can be done with the threadlocals middleware: http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser On 5/16/08, Chris Farley <[EMAIL PROTECTED]> wrote: > > > Django has that nice "auto_add=True" property you can set on a model's > field. I have two fields in my models called

Re: how to avoid uploading .py source files to shared hosting server

2008-05-16 Thread ydjango
I do not want to make it easy for some one who breaks in , either a outsider or may be an rougue hosting provider employee or contractor, to easily get access to all the information - data and code. I would have thought by this time easy solutions for this issue would have been found. I know I

Get just one object id at the time in view assignment issue.

2008-05-16 Thread Jorge Romo
Hello guys! I have another little (i'm sure it is) problem (i have like 3 days trying to resolve it by myself but i just gave up lol), i'm using django-tagging so I can tag some records, the problem here is that i don't know how to take one object, take its id and then keep the cycle. this is

Problem with : Updating multiple objects at once

2008-05-16 Thread mwebs
Hello, I want to do something like this: UPDATE news SET sequence = sequence-1 WHERE sequence > 5 With the database-api I tried the following: News.objects.filter(sequence__gt = msequence).update(sequence = sequence-1) But thats not possible, beacause the assignment parameter sequence-1

Re: how to avoid uploading .py source files to shared hosting server

2008-05-16 Thread jonknee
On May 16, 6:02 am, ydjango <[EMAIL PROTECTED]> wrote: > I have propriety commercial code and some formula/ algo > implementations which I do not want to expose. > Hence I do not want to upload .py source files Expose to whom? Your files (even on shared hosting) are still just your files. If

Re: Getting 'instance' in ModelForms

2008-05-16 Thread Nathaniel Whiteinge
On May 16, 6:27 am, Greg Taylor <[EMAIL PROTECTED]> wrote: > class Form_SKU(ModelForm): > """ > The form for updating SKUs. > """ > selected = self.instance.colors ``self`` isn't in scope here, try the code below (and it wouldn't hurt to read-up on Python OOP). class

Re: custom SQL problem

2008-05-16 Thread enri57ar
I'm stupid, thanks. >>> cursor.fetchone() (1L,) >>> cursor.fetchall() ((3L,),) On May 16, 12:01 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Fri, May 16, 2008 at 10:45 AM, enri57ar <[EMAIL PROTECTED]> wrote: > > > I can't execute custom SQL.  'Cursor' object has no attribute > >

Re: Getting 'instance' in ModelForms

2008-05-16 Thread Greg Taylor
To elaborate, I can't do a self.instance, as it errors saying "self is not defined". For example: color_field = forms.ModelMultipleChoiceField(queryset=self.instance.colors) I need to find the difference of two lists on a model to form the queryset in my application.

Re: custom SQL problem

2008-05-16 Thread Tim Chase
> I can't execute custom SQL. 'Cursor' object has no attribute > 'fechone', and 'fechall' Try "fetchone" and "fetchall" (with the letter "t") However, for your use-case, you may prefer to simply use the .values() method of a recordset: Labels.objects.values("id") as described at

Re: custom SQL problem

2008-05-16 Thread Karen Tracey
On Fri, May 16, 2008 at 10:45 AM, enri57ar <[EMAIL PROTECTED]> wrote: > > I can't execute custom SQL. 'Cursor' object has no attribute > 'fechone', and 'fechall' > I have a model named 'Labels' with db_name = 'labels'. > You're missing a 't' in fetchone() and fetchall(). Karen > > > mysql>

custom SQL problem

2008-05-16 Thread enri57ar
I can't execute custom SQL. 'Cursor' object has no attribute 'fechone', and 'fechall' I have a model named 'Labels' with db_name = 'labels'. mysql> SELECT id FROM labels; ++ | id | ++ | 1 | | 3 | ++ 2 rows in set (0.00 sec) >>>

Re: partially edit an object

2008-05-16 Thread Robin Becker
koenb wrote: sted a snippet on > djangosnippets with my DisplayModelForm [1]. > Basically, it allows you to reuse your form definitions, but turn them > into a "display_only" mode. You can do all fields or just a few. > .. I've passed this to my colleague who will no doubt digest in due time;

Re: how to avoid uploading .py source files to shared hosting server

2008-05-16 Thread Julien
I would see at least two things to keep your files secure on a shared hosting service: make sure permissions are set correctly (e.g. don't give any right to "others" to your home directory), and use a complex password for your account (using numbers, a mix or lowercased and uppercased characters,

Re: Problem with abstract model class

2008-05-16 Thread Julien
Hi, I think it should be %(class)s, not %s(class)s(take out the first 's') Julien On May 16, 11:33 pm, Legioneer <[EMAIL PROTECTED]> wrote: > Hi All, > > Got a problem when trying to define an abstract class. Below there is > an examle: > > class PaymentData(models.Model): > owner =

Re: how to avoid uploading .py source files to shared hosting server

2008-05-16 Thread James Bennett
On Fri, May 16, 2008 at 9:15 AM, ydjango <[EMAIL PROTECTED]> wrote: > Yes, that was another thing on my mind, how to encrypt password in > settings.py You don't. I think either you misunderstand how shared hosting works, or you have an extremely bad host. -- "Bureaucrat Conrad, you are

Re: how to avoid uploading .py source files to shared hosting server

2008-05-16 Thread ydjango
Yes, that was another thing on my mind, how to encrypt password in settings.py On May 16, 3:20 am, "James Bennett" <[EMAIL PROTECTED]> wrote: > On Fri, May 16, 2008 at 5:02 AM, ydjango <[EMAIL PROTECTED]> wrote: > > I have propriety commercial code and some formula/ algo > > implementations

Re: Django and Linux distros

2008-05-16 Thread Javier Rivera
> What works for you? Ubuntu + Eric4 as ide + Mysql. Javier. --~--~-~--~~~---~--~~ 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

Problem with abstract model class

2008-05-16 Thread Legioneer
Hi All, Got a problem when trying to define an abstract class. Below there is an examle: class PaymentData(models.Model): owner = models.ForeignKey(Customer, related_name="%s(class)s_related" ) class Meta: abstract = True When running 'python manage.py validate' receive an

Re: partially edit an object

2008-05-16 Thread koenb
Robin, I don't know if this is a 'right' way, but I posted a snippet on djangosnippets with my DisplayModelForm [1]. Basically, it allows you to reuse your form definitions, but turn them into a "display_only" mode. You can do all fields or just a few. I use it to display objects to users, with

Re: Django and Linux distros

2008-05-16 Thread Matic Žgur
I'm using Ubuntu, vim, sqlite3, svn and Django development server. Matic Žgur On Fri, May 16, 2008 at 2:59 PM, Almir Karic <[EMAIL PROTECTED]> wrote: > > On Fri, May 16, 2008 at 12:24 PM, JonSidnell <[EMAIL PROTECTED]> wrote: >> What works for you? > > debian & vim, tho i'm considering

Re: Django and Linux distros

2008-05-16 Thread Valts Mazurs
Ubuntu for desktop. FreeBSD and OpenBSD for production server. Regards, Valts. On Fri, May 16, 2008 at 3:59 PM, Almir Karic <[EMAIL PROTECTED]> wrote: > > On Fri, May 16, 2008 at 12:24 PM, JonSidnell <[EMAIL PROTECTED]> wrote: > > What works for you? > > debian & vim, tho i'm considering

Re: Django and Linux distros

2008-05-16 Thread Almir Karic
On Fri, May 16, 2008 at 12:24 PM, JonSidnell <[EMAIL PROTECTED]> wrote: > What works for you? debian & vim, tho i'm considering switching to openbsd as my primary OS. -- For far too long, power has been concentrated in the hands of "root" and his "wheel" oligarchy. We have instituted a

Re: This field is required. NO!

2008-05-16 Thread Kenneth Gonsalves
On 16-May-08, at 5:48 PM, Andre Meyer wrote: > still need to figure out why ;-) by default, django treats all fields as not null and not blank. Usually, the 'null' part is enforced at the database level and the 'blank' part at django level. So for fields like CharFields, saying null is

Getting 'instance' in ModelForms

2008-05-16 Thread Greg Taylor
Is there a way to get the value of the 'instance' keyword argument from within a Form sub-classed by ModelForm? For example: class CS_SKU(models.Model): colors = models.ManyToManyField(Color, blank=True, null=True) color_field = forms.ModelMultipleChoiceField(queryset=colors) class

Re: Django and Linux distros

2008-05-16 Thread Kevin Monceaux
Jon, On Fri, 16 May 2008, JonSidnell wrote: > I'm suddenly struck by the notion that I would like to be dev'ing > Django on Linux of some flavour rather than Windows. Congratulations!!! > It's been a wee while since I stuck my toes in the Linux waters, so I > was wondering if anyone here has

Re: This field is required. NO!

2008-05-16 Thread Andre Meyer
oh dear, this seems to be a well-known thing. thanks so much for this, it works! still need to figure out why ;-) thanks to you all André On Fri, May 16, 2008 at 1:10 PM, Ben Ford <[EMAIL PROTECTED]> wrote: > > Andre, > > You also need blank=True here: > pn =

Keeping track of which user did what

2008-05-16 Thread Chris Farley
Django has that nice "auto_add=True" property you can set on a model's field. I have two fields in my models called "created_at" and "updated_at" that keeps track of each model instance's creation/ modification date. It's incredibly easy. I also want to keep track of which user created/updated

Re: This field is required. NO!

2008-05-16 Thread Ben Ford
Andre, You also need blank=True here: pn = models.CharField('Publication number', max_length=20, null=True) That will fix you :-) Ben Andre Meyer wrote: > hi all > > now, this is driving me crazy. this problem persists even after > switching from 0.96.1 to the newforms-admin branch. > >

Re: This field is required. NO!

2008-05-16 Thread Jarek Zgoda
Andre Meyer pisze: > now, this is driving me crazy. this problem persists even after > switching from 0.96.1 to the newforms-admin branch. > > after declaring a model class with an attribute that may be null (pn) > the admin site still tells me to fill in that field, because "This field > is

Re: This field is required. NO!

2008-05-16 Thread Kenneth Gonsalves
On 16-May-08, at 5:36 PM, Andre Meyer wrote: > after declaring a model class with an attribute that may be null > (pn) the admin site still tells me to fill in that field, because > "This field is required.", but it isn't. have you set blank=True? -- regards kg

Re: This field is required. NO!

2008-05-16 Thread Scott Moonen
Andre, in addition to saying null=True, try adding blank=True. -- Scott On Fri, May 16, 2008 at 8:06 AM, Andre Meyer <[EMAIL PROTECTED]> wrote: > hi all > > now, this is driving me crazy. this problem persists even after switching > from 0.96.1 to the newforms-admin branch. > > after

Re: This field is required. NO!

2008-05-16 Thread Almir Karic
On Fri, May 16, 2008 at 2:06 PM, Andre Meyer <[EMAIL PROTECTED]> wrote: > pn = models.CharField('Publication number', max_length=20, null=True) missing a 'blank=True' -- For far too long, power has been concentrated in the hands of "root" and his "wheel" oligarchy. We have instituted a

This field is required. NO!

2008-05-16 Thread Andre Meyer
hi all now, this is driving me crazy. this problem persists even after switching from 0.96.1 to the newforms-admin branch. after declaring a model class with an attribute that may be null (pn) the admin site still tells me to fill in that field, because "This field is required.", but it isn't.

Re: Uploading files to subdirectories

2008-05-16 Thread Sergio
Hello James, You can do that following this: http://code.djangoproject.com/wiki/CustomUploadAndFilters It uses signals to customize the upload path. James McGill escribió: > Hi All, > I'm new to Django and I'm not sure how best to achieve the following: > > Users may upload files - each

Re: Printing out HTML that doesn't get converted to

2008-05-16 Thread Gabriel
Alex gmail.com> writes: > > > I'm working on my first Django project and I can't seem to get > information printed out as I would like it. I'm trying to print out > quotes to a page with the newlines turned into HTML tags (similar > to PHP's nl2br function). So far I've been able to do this

Custom model field for sequence-functionality

2008-05-16 Thread mwebs
Hello, what I need is a modelField that provides sequence-functionality for a model. This field should have the following features: - auto_increment when a new instance of the Model is created - a method move_up() // Increments the sequence of the object - a method move_down() // Decreases the

Re: Django and Linux distros

2008-05-16 Thread Jarek Zgoda
JonSidnell pisze: > It's been a wee while since I stuck my toes in the Linux waters, so I > was wondering if anyone here has any recommendations for a dev machine > setup? Due to the django host I've signed with, I'm largely stuck with > MySQL, and don't mind using the manage.py dev server

Re: Django and Linux distros

2008-05-16 Thread Andre Meyer
hi Jon ubuntu certainly works like a charm and you may want to use eclipse with pydev, just like on windows. i use it on both platforms (even on the same machine using a shared partition). cheers André On Fri, May 16, 2008 at 12:24 PM, JonSidnell <[EMAIL PROTECTED]> wrote: > > Hi everyone > >

Re: Django and Linux distros

2008-05-16 Thread Kenneth Gonsalves
On 16-May-08, at 3:54 PM, JonSidnell wrote: > What works for you? try mandriva spring 2008 - perfect for people migrating from the windows world -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/code/ --~--~-~--~~~---~--~~ You

Re: Django and Linux distros

2008-05-16 Thread Gabriel
JonSidnell gmail.com> writes: > > > Hi everyone > > I'm suddenly struck by the notion that I would like to be dev'ing > Django on Linux of some flavour rather than Windows. > > It's been a wee while since I stuck my toes in the Linux waters, so I > was wondering if anyone here has any

Django and Linux distros

2008-05-16 Thread JonSidnell
Hi everyone I'm suddenly struck by the notion that I would like to be dev'ing Django on Linux of some flavour rather than Windows. It's been a wee while since I stuck my toes in the Linux waters, so I was wondering if anyone here has any recommendations for a dev machine setup? Due to the

Re: how to avoid uploading .py source files to shared hosting server

2008-05-16 Thread James Bennett
On Fri, May 16, 2008 at 5:02 AM, ydjango <[EMAIL PROTECTED]> wrote: > I have propriety commercial code and some formula/ algo > implementations which I do not want to expose. > Hence I do not want to upload .py source files If your host's setup would allow other users to view this code, you have

Re: how to avoid uploading .py source files to shared hosting server

2008-05-16 Thread Gabriel
ydjango gmail.com> writes: > I have propriety commercial code and some formula/ algo > implementations which I do not want to expose. > Hence I do not want to upload .py source files > > Is rewriting that business logic in a compiled langauge only way out? > how do I call it from python,

Re: how to avoid uploading .py source files to shared hosting server

2008-05-16 Thread ydjango
I have propriety commercial code and some formula/ algo implementations which I do not want to expose. Hence I do not want to upload .py source files Is rewriting that business logic in a compiled langauge only way out? how do I call it from python, Using web services? Ashish On May 15, 2:51 

hot pictures of indian actress, models and fashion shows

2008-05-16 Thread nagma
hot pictures of indian actress, models and fashion shows http://cutehyderabadbabes.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

Re: Printing out HTML that doesn't get converted to

2008-05-16 Thread Adi J. Sieker
Alex wrote: > I'm working on my first Django project and I can't seem to get > information printed out as I would like it. I'm trying to print out > quotes to a page with the newlines turned into HTML tags (similar > to PHP's nl2br function). So far I've been able to do this using the > __str__

Mysql vs. sqlite filtering of datetimefields with None values

2008-05-16 Thread Hans
I have recently come across a slight difference in the way that datetimefields are handled by mysql and sqlite. Locally, on my desktop I use sqlite for debugging, while the production server runs mysql. Running django-trunk. One of my models includes a datetimefield: last_fetched =

Uploading files to subdirectories

2008-05-16 Thread James McGill
Hi All, I'm new to Django and I'm not sure how best to achieve the following: Users may upload files - each uploaded file is tied to a user in the database using a ForeignKey. In order to prevent pain to the underlying O/S I don't want to put all these files in to a single directory. I could

Re: MySQL Boolean vs. PostgresQL Boolean

2008-05-16 Thread Karen Tracey
On Thu, May 15, 2008 at 7:04 PM, Szaijan <[EMAIL PROTECTED]> wrote: > > I see it in my views. When I return the set and saved values for a > model, I get True or False from my app on the MacBook (Postgres) and 1 > or 0 from the exact same code on my Slicehost site (MySQL.) > > So, if I add

Re: Boolean Values: PostgreSQL vs. MySQL

2008-05-16 Thread Karen Tracey
On Thu, May 15, 2008 at 1:59 PM, Szaijan <[EMAIL PROTECTED]> wrote: > Hi, I developed my first Django app on my Macbook Pro using PostgreSQL > and > have recently moved it to a production site which uses MySQL. > PostgreSQL stores boolean values as True and False, just like Python > and JS, while