Re: Full-text search: what to use

2009-07-28 Thread Russell Keith-Magee
On Tue, Jul 28, 2009 at 1:58 PM, Torsten Bronger wrote: > > Hallöchen! > > Russell Keith-Magee writes: > >> [...] >> >> As one data point - I use Sphinx fairly extensively at work. During >> development, I looked at Lucene as well, in the form of Solr (which is >> a nice wrapper around Lucene). >

Re: easy way of display an user bar?

2009-07-28 Thread David Christiansen
If you're using the standard context processors, then just make sure to use RequestContext and you'll have a user variable in your template context. The only downside is that this will _only_ work when you're using RequestContext, so your template should probably do something like {% if user %}{{

Re: Generate to PDF file with Reportlab

2009-07-28 Thread Brenton Cleeland
It seems that the issue you're having is most likely with ReportLab, not Django. What version of ReportLab are you using? It has supported unicode since version 2, they are currently at 2.3. Have you tried to create the PDF outside of the Django environment? Also you might want to double check t

Re: Editing model based forms.

2009-07-28 Thread Eugene Mirotin
AKK, the previous response from Daniel Roseman completely answers your question - the user field is HIDDEN on the form and AUTOMATICALLY filled in the form handling action. You should read the Django 'topics', I think. On Jul 27, 10:52 pm, AKK wrote: > Thanks, that will work for time. > > I want

Model formset saving with form.save(commit=False)

2009-07-28 Thread Paul
Hello, I understand that Django won't let you save incomplete fields in a single form created from a Model unless you do this: tmpform = form.save(commit=False) tmpform.foo = form.cleaned_data['foo'] tmpform.save() So I want to do this kind of thing with forms in a formset - I am tr

iPhone authentication in Django?

2009-07-28 Thread R C
Hi, I'm working on an iPhone app that will access a Django-powered website and pull in feeds. Some of those feeds will require authentication. My site uses django-registration + django-facebookconnect to allow users to log in. Does anyone know how to handle an iPhone user logging in? Any thoug

Re: Chained Views - as in Catalyst (perl)

2009-07-28 Thread Masklinn
On 28 Jul 2009, at 02:07 , Joshua Partogi wrote: > Nice! This is really RESTful. > No. There's nothing RESTful about URLs. In fact, at the end of the day, URLs are pretty much irrelevant to the "RESTfulness" of a service or system. --~--~-~--~~~---~--~~ You rec

Re: Chained Views - as in Catalyst (perl)

2009-07-28 Thread Masklinn
On 28 Jul 2009, at 02:07 , Joshua Partogi wrote: > Nice! This is really RESTful. Great job man. > Oh, and if anything having "list", "delete" or "edit" in URLs is absolutely unRESTful. It is, on the other hand, RPC with URLs that look nice. --~--~-~--~~~---~--~

creating first appl using django

2009-07-28 Thread rekha
Hi, im new to django. may anyone tell how to develop an web application using django? --~--~-~--~~~---~--~~ 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@googlegrou

Re: Chained Views - as in Catalyst (perl)

2009-07-28 Thread Alexandru Nedelcu
On Tue, 2009-07-28 at 09:56 +0200, Masklinn wrote: > No. There's nothing RESTful about URLs. In fact, at the end of the > day, URLs are pretty much irrelevant to the "RESTfulness" of a service > or system. Somebody needs a coffee :) URLs are very relevant to RESTfull services over the web, a

Re: creating first appl using django

2009-07-28 Thread Alexandru Nedelcu
On Tue, 2009-07-28 at 01:31 -0700, rekha wrote: > Hi, > im new to django. may anyone tell how to develop an web application > using django? Installation: http://docs.djangoproject.com/en/dev/intro/install/#intro-install Good and free book on Django: http://www.djangobook.com/en/2.0/ --~--~---

django-registration and django-profiles: common form

2009-07-28 Thread Alex
hello! I'm trying to make registration based on django-registration and django-profiles. What I want is to have initial form for not only with just login- password-email fields but also to add some custom fields from userProfile model. Can anybody help? How can I add additional fields? --~--~-

Re: creating first appl using django

2009-07-28 Thread aXqd
On Tue, Jul 28, 2009 at 4:31 PM, rekha wrote: > Hi, > im new to django. may anyone tell how to develop an web application > using django? I'm also new here. You can check out http://docs.djangoproject.com/en/dev/, and start to read the Overview/Installation/Tutorials. -- Regards. -Tian --~--~-

Re: iPhone authentication in Django?

2009-07-28 Thread Alexandru Nedelcu
On Tue, 2009-07-28 at 00:54 -0700, R C wrote: > Does anyone know how to handle an iPhone user logging in? Any > thoughts or directions? As long as you can make HTTP requests, and your library can handle cookies or http auth, then you're fine. http://developer.apple.com/documentation/Cocoa/Conce

Re: Chained Views - as in Catalyst (perl)

2009-07-28 Thread Masklinn
On 28 Jul 2009, at 10:44 , Alexandru Nedelcu wrote: > On Tue, 2009-07-28 at 09:56 +0200, Masklinn wrote: >> No. There's nothing RESTful about URLs. In fact, at the end of the >> day, URLs are pretty much irrelevant to the "RESTfulness" of a >> service >> or system. > > Somebody needs a coffee :)

Re: Chained Views - as in Catalyst (perl)

2009-07-28 Thread Alexandru Nedelcu
On Tue, 2009-07-28 at 11:09 +0200, Masklinn wrote: > No it doesn't, the only URL there is to discover in a REST service is > the endpoint (the service's root). Any other URL is extracted from the > content types (which are to be fully documented). There is nothing to > discover. >From ... h

How to access blob type data in django

2009-07-28 Thread 邓超
Hi all, I'm trying to setup a picture library website using django. What I want to do is store the picture into the database directly and access the db to show them in the html file when user view in the web. I have read some documents and tutorial about the django but what I have learned is just

Django select multiple date from calendar

2009-07-28 Thread kimo
Hi, Im new in using Django, and i want to know if there is some way to have a multiple date selection from a calendar, i have multiple days : for example a day is : [ 28 july 2009 8:30 - 28 july 17h00 ] Is there any way to do this with Django Forms Thanks a lot kimo --~--~-~--~

Re: Chained Views - as in Catalyst (perl)

2009-07-28 Thread Masklinn
On 28 Jul 2009, at 11:47 , Alexandru Nedelcu wrote: > On Tue, 2009-07-28 at 11:09 +0200, Masklinn wrote: >> No it doesn't, the only URL there is to discover in a REST service is >> the endpoint (the service's root). Any other URL is extracted from >> the >> content types (which are to be fully d

MS Word Characters

2009-07-28 Thread cootetom
Hello, I'm having some trouble with strange characters that come from MS Word. User's are copying text from MS Word, pasting it into a textarea on the site. I then save that text into MySQL (table charset is set to utf-8). Then later I retrieve that data to create a RTF document then an email it

Re: MS Word Characters

2009-07-28 Thread Jani Tiainen
cootetom kirjoitti: > Hello, > > I'm having some trouble with strange characters that come from MS > Word. User's are copying text from MS Word, pasting it into a textarea > on the site. I then save that text into MySQL (table charset is set to > utf-8). Then later I retrieve that data to create

Re: MS Word Characters

2009-07-28 Thread Vasil Vangelovski
Are you emailing just the rtf document you generate or sending the contents in the email body as well? The problem might be that the content encoding of the rtf or email message is not set properly. cootetom wrote: > Hello, > > I'm having some trouble with strange characters that come from MS

Re: Chained Views - as in Catalyst (perl)

2009-07-28 Thread Alexandru Nedelcu
On Tue, 2009-07-28 at 12:22 +0200, Masklinn wrote: > You might want to read what you just quoted, because it completely and > absolutely supports what I said. No it doesn't support your argument. You're just arguing semantics. > The important part here is the following: "set of standardized me

permalink don't works

2009-07-28 Thread gentlestone
Hello, I've got this exception Reverse for 'view' with arguments '('13',)' and keyword arguments '{}' not found. This is my code: from django.db.models import permalink # def get_absolute_url(self): # retu

Re: MS Word Characters

2009-07-28 Thread cootetom
I can either download the RTF or email it. If I download it then an example of an odd character would look like this “ after opening the document. If I email it then django will throw an error: "UnicodeEncodeError: 'ascii' codec can't encode character u'\u2013' in position 27: ordinal not in ra

Re: permalink don't works

2009-07-28 Thread Daniel Roseman
On Jul 28, 12:18 pm, gentlestone wrote: > Hello, > > I've got this exception > > Reverse for 'view' with arguments '('13',)' and keyword arguments '{}' > not found. > > This is my code: > > from django.db.models import per

Re: Chained Views - as in Catalyst (perl)

2009-07-28 Thread Masklinn
On 28 Jul 2009, at 14:01 , Alexandru Nedelcu wrote: > On Tue, 2009-07-28 at 12:22 +0200, Masklinn wrote: >> You might want to read what you just quoted, because it completely >> and >> absolutely supports what I said. > > No it doesn't support your argument. You're just arguing semantics. > No.

Re: best way to format serialized data?

2009-07-28 Thread Alex Robbins
I'm not sure if this answers your question, but... I have had better luck using the jQuery.load [1] function. It takes an html response and just jams it into the dom. That way I can do all of the templating and formatting on the server side. The idea of writing "" and the like never seemed very ma

Re: Fatal Python error: Inconsistent interned string state.

2009-07-28 Thread Alex Robbins
You mentioned that it just happens sometimes, and I see from your traceback it happened in the autoreload.py file. Do you still see the errors if you call runserver --noreload ? Alex On Jul 27, 3:57 pm, Ken Schwencke wrote: > I'm working with GeoDjango and PostGIS, and I'm getting "Fatal Python

Django test case execution problem

2009-07-28 Thread vijay kumar
Hi, I am running testcase from django when I run them from models.py it run. But when I put the same in test.py in the same directory where models is define it not even getting called. My structure django application is mysite Settings.py Urls.py Polls

Re: I just need some feedback and advice about my project layout and design.

2009-07-28 Thread Alex Robbins
Sorry, I don't know anything about url namespaces, but this might help: If all you are doing is looking up an object and displaying it, I would use the built-in generic views[1]. Just provide a queryset and an object id or slug and slug field. Less code to debug and maintain. There is also a list

Re: permalink don't works

2009-07-28 Thread gentlestone
Thank for the quick answer. It is nice to know the forum is alive and helpful :-) But I'm sorry, I've tried this lookup too. So the code # def get_absolute_url(self): # return "/resys/katalog/kategoria/" + str(self.id) def get_absolute_url(self): return ('view', (), { 'obj

Re: Django test case execution problem

2009-07-28 Thread Karen Tracey
On Tue, Jul 28, 2009 at 9:11 AM, vijay kumar wrote: > > Hi, > > I am running testcase from django when I run them from models.py it > run. > > But when I put the same in test.py in the same directory where > models is define it not even getting called. > Name the file tests.py, not test.py.

Re: MS Word Characters

2009-07-28 Thread cootetom
So is there a way of getting that hex back into suitable text? On Jul 28, 12:06 pm, Jani Tiainen wrote: > cootetom kirjoitti: > > > Hello, > > > I'm having some trouble with strange characters that come from MS > > Word. User's are copying text from MS Word, pasting it into a textarea > > on t

Re: Chained Views - as in Catalyst (perl)

2009-07-28 Thread Russell Keith-Magee
On Tue, Jul 28, 2009 at 9:05 PM, Masklinn wrote: > >> I'm also a bit disappointed by your tone. Again, chill, drink some >> coffee, relax a little ;) > Pot, kettle, etc… Ok - both of you settle down. A casual observer can tell that this "debate" is going nowhere in particular. In the interests o

Re: permalink don't works

2009-07-28 Thread Dj Gilcrease
On Tue, Jul 28, 2009 at 7:26 AM, gentlestone wrote: > Thank for the quick answer. It is nice to know the forum is alive and > helpful :-) > But I'm sorry, I've tried this lookup too. So the code > > #     def get_absolute_url(self): > #         return "/resys/katalog/kategoria/" + str(self.id) >  

Re: Django test case execution problem

2009-07-28 Thread vijay kumar
Hello Karen, Thanks for the correcting my mistake. On Jul 28, 6:27 pm, Karen Tracey wrote: > On Tue, Jul 28, 2009 at 9:11 AM, vijay kumar wrote: > > > Hi, > > >   I am running testcase from django when I run them from models.py it > > run. > > >   But when I put the same in test.py

Re: ImageFile bug? (Re: ImageField questions)

2009-07-28 Thread Jacob Kaplan-Moss
On Sun, Jul 26, 2009 at 11:10 PM, Rusty Greer wrote: > i applied the patch you mentioned before (to my 1.0.2 release): Yeah, the fix is predicated on some file storage refactoring that's too intensive to reach the 1.0.X series. You'll need to upgrade to 1.1 to get the fix. Jacob --~--~-

Lazy translation needs help in model.save()?

2009-07-28 Thread Joshua Russo
I'm raising an error in one of my model save forms and it's not converting the translation string to unicode. If I first pass it into the unicode() function it works though. The following is the pertinent portions of my model class. class Matriz(modelUtils.MyModelAudit): ULTIMOANO_MISSING_ERRO

Re: MS Word Characters

2009-07-28 Thread cootetom
I know why it's failing when I send it as an email. The django EmailMessage class will try to encode any text based attachment down to ascii. So any attachment containing characters out side of ascii can't be sent using django's EmailMessage class. This doesn't really solve my problem, sort of ma

cannot resolve keyword into field under Apache+mod_python

2009-07-28 Thread blumenkraft
Hi, I have sophisticated model: class UserEditions(SophisticatedModel): user = models.ForeignKey(User) editions = models.ManyToManyField(Edition) and simple function: def simple_function(user): return UserEdition.objects.get(user = user).editions.all() Everything works fine when I c

Strange upload problem

2009-07-28 Thread bax...@gretschpages.com
Strange in that it used to work and now doesn't. Unfortunately I only use it about twice a year, so I'm not sure when it stopped. Basically, I'm trying to upload a csv and save the fields to the database: class SpecialEvent(models.Model): ... results_csv = models.FileField(upload_to='files

Howto not delete record after X days?

2009-07-28 Thread Keith Pettit
I need to be able to limit the ability to delete a record after it's been in the system for X days. Any ideas on how to approach that? Basically I have a ticket system in Django, all works well with add/edit/update/delete type functions. But for our need I want our users to be able to entree a t

Re: Howto not delete record after X days?

2009-07-28 Thread Dan Radez
How about pass in a context variable? render the template with something like conext = { ...snip 'editable': form.entered <= date -3, ... snip ... } then in your template do {% if editable %} HTML Delete button {% endif %} On 07/28/2009 11:16 AM, Keith Pettit wrote: > I need to be a

Re: Strange upload problem

2009-07-28 Thread Baxter
Oops. Looks like a file path problem. Not sure why it used to work. --~--~-~--~~~---~--~~ 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 unsubscr

Re: Full-text search: what to use

2009-07-28 Thread alex finn
Thanks for your replies, it is useful. Has anyone used whoosh in production so far? Any ideas about it's performance? Alex. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group

Re: Howto not delete record after X days?

2009-07-28 Thread Tom Evans
On Tue, 2009-07-28 at 10:16 -0500, Keith Pettit wrote: > I need to be able to limit the ability to delete a record after it's > been in the system for X days. Any ideas on how to approach that? > > Basically I have a ticket system in Django, all works well with > add/edit/update/delete type func

Re: ImageFile bug? (Re: ImageField questions)

2009-07-28 Thread Rusty Greer
Thanks for all the help On Jul 28, 2009, at 7:52 AM, Jacob Kaplan-Moss wrote: > > On Sun, Jul 26, 2009 at 11:10 PM, Rusty Greer wrote: >> i applied the patch you mentioned before (to my 1.0.2 release): > > Yeah, the fix is predicated on some file storage refactoring that's > too intensive t

Re: cannot resolve keyword into field under Apache+mod_python

2009-07-28 Thread Karen Tracey
On Tue, Jul 28, 2009 at 11:07 AM, blumenkraft wrote: > > Hi, > > I have sophisticated model: > > class UserEditions(SophisticatedModel): >user = models.ForeignKey(User) >editions = models.ManyToManyField(Edition) > > and simple function: > > def simple_function(user): > return UserEditio

Re: Lazy translation needs help in model.save()?

2009-07-28 Thread Joshua Russo
On Jul 28, 2:00 pm, Joshua Russo wrote: > I'm raising an error in one of my model save forms and it's not converting > the translation string to unicode. If I first pass it into the unicode() > function it works though. The following is the pertinent portions of my > model class. > class Matriz(m

IDE for Django and Ext JS

2009-07-28 Thread Amir Habibi
Hi All, What development environment do you suggest for Django and Ext JS based large projects? Is Netbeans the best choice out there? Thanks Amir --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" gro

Re: Question on the ticket #11563

2009-07-28 Thread Daybreaker
I've solved this problem. The solution: JUST FOLLOW THE DOCUMENTATION. ...I have used Django from 0.96, so my convention was different from the recent Django docs. I used to put admin.site.register() and ModelAdmin classes in models.py (and I moved those classes to admin.py and manually imported

Re: IDE for Django and Ext JS

2009-07-28 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I personally use Eclipse w/ PyDEV and web dev tools. I absolutely love it. I tried netbeans a while ago, and didn't see an advantage to switch to it. That being said, IDEs are really a matter of personal preference, I know of a lot of people that jus

Error - got an unexpected keyword argument 'instance' on initialising form

2009-07-28 Thread phoebebright
I thought I was faithfully coping the tutorial, so don't understand why I get this error. Here is the code in the view: @login_required def edit_todo(request, todo_id): task = Task.objects.get(id=todo_id) if request.method == 'POST': form = TaskForm(request.POST) ...

Re: MS Word Characters

2009-07-28 Thread phoebebright
Be very interested in the answer too! On Jul 28, 4:02 pm, cootetom wrote: > I know why it's failing when I send it as an email. The django > EmailMessage class will try to encode any text based attachment down > to ascii. So any attachment containing characters out side of ascii > can't be sent

Re: Error - got an unexpected keyword argument 'instance' on initialising form

2009-07-28 Thread Alex Gaynor
On Tue, Jul 28, 2009 at 2:02 PM, phoebebright wrote: > > I thought I was faithfully coping the tutorial, so don't understand > why I get this error. > > Here is the code in the view: > > @login_required > def edit_todo(request, todo_id): > >    task = Task.objects.get(id=todo_id) > >    if request

Re: Django select multiple date from calendar

2009-07-28 Thread phoebebright
Don't have the whole answer, but google parsedatetime python library which has some good utilities to extract dates from text. You can then build the required queryset. On Jul 28, 10:49 am, kimo wrote: > Hi, > > Im new in using Django, and i want to know if there is some way to > have a multipl

Re: Error - got an unexpected keyword argument 'instance' on initialising form

2009-07-28 Thread phoebebright
That would be it! Thanks for your prompt help - onwards On Jul 28, 7:06 pm, Alex Gaynor wrote: > On Tue, Jul 28, 2009 at 2:02 PM, phoebebright wrote: > > > I thought I was faithfully coping the tutorial, so don't understand > > why I get this error. > > > Here is the code in the view: > > >

Re: IDE for Django and Ext JS

2009-07-28 Thread Jonas Obrist
Maybe a good question would be is there any IDE that supports the django template language? Because I use eclipse (pydev+webtools) but I really dislike it that it complains about my HTML files being invalid because of the django tags. Also a highlighting mode might reduce the amount of errors

Global variables

2009-07-28 Thread Dirso
Hi, I created a template with a base file for all template files named 'base.html' (for the brazilian website) then I used 'extends base.html' in a base_in.html used as base file for the english version of the website (I'll work with the django multi language feature later, for now I'll use the te

Re: IDE for Django and Ext JS

2009-07-28 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I don't know of an extension for Eclipse. I really hope somebody will develop one soon. As far as Netbeans django template handling, I've heard they have a beta version. Haven't tried it yet though. Luke S. Jonas Obrist wrote: > Maybe a good questio

Re: Question on the ticket #11563

2009-07-28 Thread Karen Tracey
2009/7/28 Daybreaker > > I've solved this problem. > > The solution: JUST FOLLOW THE DOCUMENTATION. > > ...I have used Django from 0.96, so my convention was different from > the recent Django docs. > I used to put admin.site.register() and ModelAdmin classes in > models.py (and I moved those cla

Tagging extension app? When a tag is more than a tag

2009-07-28 Thread Steve
Hi, I'm using django-tagging as part of a pinax based project and I'm looking to see if an idea I've had has already been codifed by someone before I go off and write it. In my app Users can tag application objects and query for those objects via the tags; so far just basic tagging. I'd also like

user profiles and the admin

2009-07-28 Thread Chris Curvey
I'm having a bit of a brain cramp here...I'm trying to add some extra fields to my user profiles, but I can't seem to get the fields to show up in the admin interface. I've added the admin.py directory to my application root, but the fields obstinately will not show up in the admin interface. The

Re: Value error......

2009-07-28 Thread Daniel Roseman
On Jul 28, 7:27 pm, ashish tiwari wrote: > I see the value error when I run the > > http://127.0.0.1:8000/People/Info/5 > > it shows me the error which is in the figure……attached with this folder….. > > here is the codes….of  “urls.py,views.py,models.py…….. > > > ## > > #vi

Re: IDE for Django and Ext JS

2009-07-28 Thread Jamie
On the mac, there's textmate (an editor, not an IDE), which has a language plugin architecture, and a couple of django-specific plugins that do syntax highlighting, one for django apps, one for django templates. On Jul 28, 2:20 pm, Jonas Obrist wrote: > Maybe a good question would be is there an

Re: MS Word Characters

2009-07-28 Thread cootetom
Have been working on this today and think I have narrowed it down to two separate problems. Firstly I have characters encoded by MS Word saved into the database in there encoded form. Retrieving these back from the database is fine but when I try to use them by generating an RTF or a PDF document

Re: Use an arbitrary changelist

2009-07-28 Thread TiNo
On Wed, Jul 22, 2009 at 17:57, Alex Gaynor wrote: > > On Wed, Jul 22, 2009 at 7:08 AM, TiNo wrote: > > Hi, > > I would like a second changelist for an app. Besides the changelist that > > shows all members, I would like to show a changlist that show all members > > interested in some category. I

Possible to add to a queryset?

2009-07-28 Thread Margie
Is it possible to add to a queryset? Say I have a Book model and qset is an existing queryset of books. If I want to create a new queryset that contains everything in qset, plus books that have ids 1, 2, and 3, do I do this: Book.objects.filter(Q(id__in=[obj.id for obj in qset]) | Q(id__in= [1,

Re: Possible to add to a queryset?

2009-07-28 Thread Alex Gaynor
You ca use the | operator o querysets themselves. So qser | model.objects.filter(id__i=[1,2,3]) Alex On Jul 28, 2009 3:49 PM, "Margie" wrote: Is it possible to add to a queryset? Say I have a Book model and qset is an existing queryset of books. If I want to create a new queryset that contai

Re: Trying to reference a foreignKey in a modelAdmin class

2009-07-28 Thread irishsteve
Karen, Luke, thank-you both for replying. Luke, there isn't an error message as such, it's just that the Entry model disappears from the admin. If I try to go directly to an entry page URL I get a 404. As soon as I go back to using list_filter = ('competition', 'division') it's ok. I've tried ('C

Re: cannot resolve keyword into field under Apache+mod_python

2009-07-28 Thread blumenkraft
I beg your pardon, my code actually is: def simple_function(user): return UserEditions.objects.get(user = user).editions.all() Here I have string 'UserEditions' in the code. I think my problem is the same (reproduced under Apache only, same error message, many2many field) as fixed ticket http:

custom template tags and template loaders

2009-07-28 Thread chefsmart
Is 'django.template.loaders.app_directories.load_template_source' required in the TEMPLATE_LOADERS setting for custom template tags to work? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To pos

Re: Possible to add to a queryset?

2009-07-28 Thread Margie
Ah, right. I knew there had to be a way. Thanks Alex! Margie On Jul 28, 12:54 pm, Alex Gaynor wrote: > You ca use the | operator o querysets themselves. So qser | > model.objects.filter(id__i=[1,2,3]) > > Alex > > On Jul 28, 2009 3:49 PM, "Margie" wrote: > > Is it possible to add to a queryset

Re: IDE for Django and Ext JS

2009-07-28 Thread Javier Guerra
On Tue, Jul 28, 2009 at 1:20 PM, Jonas Obrist wrote: > Maybe a good question would be is there any IDE that supports the django > template language? any KDE editor would, since all of them use the Kate KPart, which has a Django template highlither. i usually start with just Kate for the python c

Re: user profiles and the admin

2009-07-28 Thread Asinox
im new , but i think that u need this part: class UserProfileAdmin(UserAdmin): inlines = [UserProfileInline] list_display = ('user', 'sex','phone') regards, On Jul 28, 3:01 pm, Chris Curvey wrote: > I'm having a bit of a brain cramp here...I'm trying to add some extra > fields to my

ModelForm and saving with excluded Fields

2009-07-28 Thread Streamweaver
I have been struggling with this for a few weeks without resolution and hope someone can help me. I have a model that I edit via a form but the field returned for editing vary depending on the user permissions and group. When I bind a form to POST data some fields may or may not be included in t

Re: ModelForm and saving with excluded Fields

2009-07-28 Thread Streamweaver
To be clear. Essentially I just want to merge the object instance and POST data with the POST data overwriting the instance where it's supplied. Right now if I don't supply a field in my POST data it just submits null values. Thanks again and sorry for any repetition or frustration. On Jul 28,

Unsupported operand type(s) for *: 'Decimal' and 'Decimal'

2009-07-28 Thread Dave MacFarlane
Hello, I'm experiencing an unusual problem with django where it's sometimes throwing a TypeError exception with the exception value "unsupported operand type(s) for *: 'Decimal' and 'Decimal'" when multiplying a DecimalField by a Decimal. This seems to happen for about 20% of requests to

Re: ModelForm and saving with excluded Fields

2009-07-28 Thread Paul
>From the djangoproject website: http://docs.djangoproject.com/en/dev/topics/forms/modelforms/ If you specify fields or exclude when creating a form with ModelForm, then the fields that are not in the resulting form will not be set by the form's save() method. Django will prevent any attempt to

Re: ModelForm and saving with excluded Fields

2009-07-28 Thread Joshua Russo
On Tue, Jul 28, 2009 at 8:58 PM, Streamweaver wrote: > > To be clear. Essentially I just want to merge the object instance and > POST data with the POST data overwriting the instance where it's > supplied. Right now if I don't supply a field in my POST data it just > submits null values. > > Tha

Re: Model formset saving with form.save(commit=False)

2009-07-28 Thread Paul
After fiddling around I think I found the syntax that seems to work for my purposes: if formset.is_valid(): for form in formset.forms: tmpform = form.save(commit=False) for field in form: if not field.form.is_bound: data = field.form.initial.get(field.name,

Re: @login_required() dont work

2009-07-28 Thread Superman
Still doesn't work :( I have the same problem. I use python 2.5 and my code is... from django.contrib.auth.decorators import login_required @login_required def vote(request, poll_id): p = get_object_or_404(Poll, pk=poll_id) try: ... --~--~-~--~~~---~--~~

Re: IDE for Django and Ext JS

2009-07-28 Thread Sam Lai
There's also the free Komodo Edit (and the more featureful Komodo IDE) from ActiveState, which supports python and the django template language among other things, and is cross-platform too. 2009/7/29 Jamie : > > On the mac, there's textmate (an editor, not an IDE), which has a > language plugin

Re: IDE for Django and Ext JS

2009-07-28 Thread bedros
I use komodo edit for all my code development; my favorite feature is open remote file (using ssh) I can edit a file on a remote server with ssh access. very nice, I don't have to sync my local machine with remote server anymore. Regards, -Bedros On Jul 28, 4:35 pm, Sam Lai wrote: > There's a

Re: cannot resolve keyword into field under Apache+mod_python

2009-07-28 Thread Karen Tracey
On Tue, Jul 28, 2009 at 4:21 PM, blumenkraft wrote: > > I beg your pardon, my code actually is: > > def simple_function(user): > return UserEditions.objects.get(user = user).editions.all() > > Here I have string 'UserEditions' in the code. I think my problem is > the same (reproduced under Apach

Re: Unsupported operand type(s) for *: 'Decimal' and 'Decimal'

2009-07-28 Thread Karen Tracey
On Tue, Jul 28, 2009 at 4:14 PM, Dave MacFarlane < dave.macfarl...@ecometrica.ca> wrote: > > Hello, > > I'm experiencing an unusual problem with django where it's sometimes > throwing a TypeError exception with the exception value "unsupported > operand type(s) for *: 'Decimal' and 'Decimal'" when

Re: Question on the ticket #11563

2009-07-28 Thread Daybreaker
I meant, the phenomenon that mod_wsgi behaves differently with my old conventions. Sorry for my short English.;; On 7월29일, 오전3시42분, Karen Tracey wrote: > 2009/7/28 Daybreaker > > > > > I've solved this problem. > > > The solution: JUST FOLLOW THE DOCUMENTATION. > > > ...I have used Django from

Re: IDE for Django and Ext JS

2009-07-28 Thread Ovnicraft
2009/7/28 bedros <2bed...@gmail.com> > > I use komodo edit for all my code development; my favorite feature is > open remote file (using ssh) I can edit a file on a remote server with > ssh access. very nice, I don't have to sync my local machine with > remote server anymore. > > > Regards, > > -B

Re: best way to format serialized data?

2009-07-28 Thread DaleB
Thanks for you answer Alex. I'll definitely give your suggestions a go. As i said, i am pretty new to ajax but i surely see your point. So far i found a solution along the lines of this example: http://www.nerdydork.com/django-djson-er-json.html I iterated over my data, put the reformatted data

Re: Question on the ticket #11563

2009-07-28 Thread Karen Tracey
2009/7/28 Daybreaker > > I meant, the phenomenon that mod_wsgi behaves differently with my old > conventions. > No, that's not a bug. Do you have DEBUG set to True when you run under dev server and False under mod_wsgi? There's validation code that is run only when DEBUG is True that could exp

Re: IDE for Django and Ext JS

2009-07-28 Thread Austin Gabel
WingIDE is awesome. It handles HTML pretty well too. On Tue, Jul 28, 2009 at 8:09 PM, Ovnicraft wrote: > > > 2009/7/28 bedros <2bed...@gmail.com> > > >> I use komodo edit for all my code development; my favorite feature is >> open remote file (using ssh) I can edit a file on a remote server w

No such Table Error

2009-07-28 Thread marcoshernandez
Im having this error in my application (both admin models and my app models) I'm almost certain that has to be something with Apache- mod_wsgi not finding the files... but I just can't find the origin of the error... complete traceback next: Environment: Request Method: GET Request URL: http://1

Re: No such Table Error

2009-07-28 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Did you run manage.py syncdb in your project folder? And are the apps in your settings.py? Luke Seelenbinder marcoshernandez wrote: > Im having this error in my application (both admin models and my app > models) I'm almost certain that has to be s

Re: No such Table Error

2009-07-28 Thread marcoshernandez
Yup. Everything's fine with the django development server, the error raises in Apache (Sorry about the double reply but i thought it'll be better if the community keeps track of the information, in sake of the shared knowledge ;) ) On Jul 28, 10:56 pm, Luke Seelenbinder wrote: > -BEGIN PGP S

"For object in object_list: related_list="...

2009-07-28 Thread bweiss
I've got this to work in python shell mode, but am having trouble translating it into a django view, and am hoping someone can point out where I'm stuffing up. For background, I'm working with a database with two models: "Employees" and "Projects", joined by a ForeignKey field on the Project mode

Re: Using the @login_required() decorator with #hash url's

2009-07-28 Thread Jumpfroggy
> The only way I know around this involves leaning on JavaScript to > get the URL, split off the #hash bit from it, and sneak it in as > a hidden element on the login form. Yeah, I ended up doing this on the /login page. Basically: $(function() { $('#url-hash').attr('va

ANN: Security updates released

2009-07-28 Thread James Bennett
Tonight the Django team has issued two releases related to a security issue reported to us. These releases are Django 1.0.3 and Django 0.96.4. Full information is available on the Django project weblog: http://www.djangoproject.com/weblog/2009/jul/28/security/ These releases are strongly recomm

ANN: Django 1.1 released!

2009-07-28 Thread James Bennett
Tonight we're extremely proud to announce the release of Django 1.1, the latest major milestone in Django's development. To learn about the new release: * Blog post: http://www.djangoproject.com/weblog/2009/jul/29/1-point-1/ * Release notes: http://docs.djangoproject.com/en/dev/releases/1.1/ * D

Re: ANN: Django 1.1 released!

2009-07-28 Thread Joshua Partogi
Already using the RC1 from last week and my 1.0 application didn't break without any code changes. Congratulations to all the team that made this possible! On Wed, Jul 29, 2009 at 4:23 PM, James Bennett wrote: > > Tonight we're extremely proud to announce the release of Django 1.1, > the latest

  1   2   >