Re: Howto create related objects in one shot?

2009-03-23 Thread Yaniv Haber
On Mar 23, 1:41 am, Malcolm Tredinnick wrote: > On Sun, 2009-03-22 at 05:39 -0700, nivhab wrote: > > Hi, > > > I have the following model: > > >    class product(models.Model): > >       productId    = models.AutoField(primary_key=True) > >       name                 = models.CharField(max_length

Re: Howto create related objects in one shot?

2009-03-23 Thread Malcolm Tredinnick
On Mon, 2009-03-23 at 00:18 -0700, Yaniv Haber wrote: > On Mar 23, 1:41 am, Malcolm Tredinnick > wrote: > > On Sun, 2009-03-22 at 05:39 -0700, nivhab wrote: > > > Hi, > > > > > I have the following model: > > > > >class product(models.Model): > > > productId= models.AutoField(primar

Re: Error 32: The process cannot access the file because it is being used by another process

2009-03-23 Thread Alexandre
I don't know how I can solve this issue. This is the Traceback Environment: Request Method: POST Request URL: http://localhost:8080/admin/incidencies/incidencia/5/ Django Version: 1.0.2 final Python Version: 2.6.1 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes',

Re: [Newbie] Problem with startproject

2009-03-23 Thread Muslu Yüksektepe
i think you didnt setup full django. try again. or try this. python import django django.VERSION (this is must) and you will see django's version number if u did really full setup. 2009/3/21 André Santos > > Try this: > python -c "import django" > If it returns one error, than django wasnt

exclude=field only for non superuser staff

2009-03-23 Thread Alessandro Ronchi
I need to set a field as escluded in admin.py only for non-superuser staff people. is it possible? how can I do that? -- Alessandro Ronchi Skype: aronchi http://www.alessandroronchi.net SOASI Soc.Coop. - www.soasi.com Sviluppo Software e Sistemi Open Source Sede: Via Poggiali 2/bis, 47100 Forlì

Re: exclude=field only for non superuser staff

2009-03-23 Thread Malcolm Tredinnick
On Mon, 2009-03-23 at 09:44 +0100, Alessandro Ronchi wrote: > I need to set a field as escluded in admin.py only for non-superuser > staff people. > is it possible? > how can I do that? You can override the ModelAdmin.get_form() method and return a different form in those cases, I guess. It's pas

Re: cannot import name ugettext

2009-03-23 Thread dbbarua
Hi Karen, I got some code from the rapidsms sf.net site... it's called rapidsms-1.0-final-svn-unknow It works with Django-1.0 and gives me the site ...but some fields are not enabled in the website...is that related to django or the rapidsms code? Regards Deepak On Mar 23,

ModelForm - field sort order

2009-03-23 Thread PNM
I have a sorting problem with a completely basic ModelForm instance (the class has only Meta with model and fields) -- the object's __iter__ seems to be following object.fields (as defined in the model), rather than Meta.fields (as the documentation leads me to expect). Is it me, or is there somet

RE: OWNING code

2009-03-23 Thread mn
Hello, new on here and not a tech guy, wanted to know if a company or programmer who uses Django can claim they own the code? Also if I have my developer build my website using Django, do I own it or simply license the code? Please advise, thank you --~--~-~--~~~---~

Design patterns for create/update view

2009-03-23 Thread Lyubomir Petrov
Just wondering are there any docs/examples of design pattern with django for creating a "create/update" view. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Design patterns for create/update view

2009-03-23 Thread Eric Abrahamsen
On Mar 23, 2009, at 6:06 PM, Lyubomir Petrov wrote: > > Just wondering are there any docs/examples of design pattern with > django for creating a "create/update" view. These views are written for you! See the CRUD section of the Generic Views page: http://docs.djangoproject.com/en/dev/ref/ge

Hooking up Django signal to urls.py

2009-03-23 Thread Addy Yeow
Hi guys, I like to track my visitors URL request in my application. To achieve this, I am trying to trigger my signal's receiver function called log_start when a browser request matches a URL pattern in my_app/urls.py. === my_proj/my_app/models.py === from django.core.signals import * from my_pr

Re: OWNING code

2009-03-23 Thread Russell Keith-Magee
On Mon, Mar 23, 2009 at 2:52 PM, mn wrote: > > Hello, > new on here and not a tech guy, wanted to know if a company or > programmer who uses Django can claim they own the code? Firstly, IANAL, etc. There are at least three blocks of code under discussion here. Firstly, there is the code that c

Re: ModelForm - field sort order

2009-03-23 Thread Russell Keith-Magee
On Mon, Mar 23, 2009 at 6:55 PM, PNM wrote: > > I have a sorting problem with a completely basic ModelForm instance > (the class has only Meta with model and fields) -- the object's > __iter__ seems to be following object.fields (as defined in the > model), rather than Meta.fields (as the documen

Re: Hooking up Django signal to urls.py

2009-03-23 Thread Russell Keith-Magee
On Mon, Mar 23, 2009 at 7:17 PM, Addy Yeow wrote: > Hi guys, > > I like to track my visitors URL request in my application. ... > Any idea? Or I should not use signal for this purpose? You could probably get something like this to work, but I have to ask - Is there any reason that you're not jus

Re: Design patterns for create/update view

2009-03-23 Thread Liubomir.Petrov
Yep, i'm already using generic views, but its a big pain (a lot of code) for a single view that embeds create & update in one place. I wanned to ask here, because maybe my approach (the single create/ update view) is not right ? On Mar 23, 12:13 pm, Eric Abrahamsen wrote: > On Mar 23, 2009, at 6

Re: ModelForm - field sort order

2009-03-23 Thread PNM
Thanks - that's it. Sanity confirmed. Those "new in Django xx" comments are invaluable (when they're there!) for tired eyes looking at two superficially identical documents. On Mar 23, 11:40 am, Russell Keith-Magee wrote: > On Mon, Mar 23, 2009 at 6:55 PM, PNM wrote: > > > I have a sorting pr

Re: Hooking up Django signal to urls.py

2009-03-23 Thread Addy Yeow
Apache would have solved the problem for simple request but there are other data that I wanted to store when the request is made, e.g. attribute data, etc. On Mon, Mar 23, 2009 at 6:44 PM, Russell Keith-Magee wrote: > > On Mon, Mar 23, 2009 at 7:17 PM, Addy Yeow wrote: > > Hi guys, > > > > I li

Re: cannot import name ugettext

2009-03-23 Thread James Bennett
On Mon, Mar 23, 2009 at 4:43 AM, dbbarua wrote: > It works with Django-1.0 and gives me the site ...but some fields are > not enabled in the website...is that related to django or the rapidsms > code? I'd very strongly suggest that you contact the developers of the application you're using,

Re: django. postgre and errors (integrity errors not raised as expected in unit tests)

2009-03-23 Thread LD
Thanks for response, savepoint api looks nice and in fact it did the thing for some tests. But for some other I still got the same error - looks strange since tests are trying to do simmilar logic. I thought that problem was in some logic in test setUp, but again in both test cases there is setU

Portable Python 1.1 released

2009-03-23 Thread Perica Zivkovic
Dear people, Portable Python 1.1 is released and includes Django 1.0.2 and two free Python IDE's - PyScripter and SPE. Included in this release: - This release contains three different packages for three different Python versions – Python 2.5.4, Python 2.6.1 and Python 3.0

"Disabled" option with choiceField ?

2009-03-23 Thread Pierre
Hi, I turning crazy with something which seems relatively easy but isn't (for me). I want to create a dropdown (aka ) in a form. To do this, I use a forms.ChoiceField (label="Categories",required=True, choices=catz) I'd like to have some choices in this drop down to be "disabled" to create a kin

admin site: display forms from different models on one page

2009-03-23 Thread PaulePanter
Dear Django group, in part 2 of the tutorial some ways are shown how to format the admin site. This is really nice, how fast this can be set up. Does the admin site bring also a way to display it the following way, without having to write it by myself? I could not find it neither in its document

"Disabled" option with choiceField ?

2009-03-23 Thread Pierre
Hi, Does anybody have succeeded in having choicField option "disabled" from a modelForm ? Regards, Pierre --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to d

Re: django. postgre and errors (integrity errors not raised as expected in unit tests)

2009-03-23 Thread LD
OK. solved. The problem was that I did something like this: class MyModel(models.Model): field = #this field is marked as unique and then in tests: sid = transaction.savepoint() ml1 = MyModel(field = 'a') ml1.save() m2 = MyModel(field = 'b') self.assertRaises(IntegrityError, m2.save)

Per app middleware?

2009-03-23 Thread Gabriel Rossetti
Hello everyone, I have a project that has two apps that use the same models (I moved it out of the apps, up to the project's root). I was wondering if it is possible to have global middleware (that they both need) and per app middleware (sspecific to each app). I don't want one app's middlewar

Re: Django Serialization of BooleanField inconsistent?

2009-03-23 Thread Karen Tracey
On Mon, Mar 23, 2009 at 2:58 AM, chefsmart wrote: > I am working on an application that interacts with a Django app > through Django's xml serialization (using django-rest-interface). > > All was going ok, when today I got stuck because while Django used to > serialize BooleanFields as name="is_

Re: OWNING code

2009-03-23 Thread Tim Chase
> new on here and not a tech guy, wanted to know if a company or > programmer who uses Django can claim they own the code? Just out of curiosity, what are your reasons for wanting to OWN the code? Do you want to change it? Do you want to distribute it on your own terms? Do you want to asser

Re: How to get the root path ?

2009-03-23 Thread Bro
I use {% url myproject.core.views.member_create %} But in the production server, it give :( http://www.mysite.fr/var/www/mysite/mysite/user/create/ instead of : http://www.mysite.fr/user/create/ On 18 mar, 14:24, Briel wrote: > Hi. > Instead of generating all of your urls as a base url + someth

Re: Django Serialization of BooleanField inconsistent?

2009-03-23 Thread chefsmart
I have not changed my database. I've always been using MySQL. In the meantime I did some more research and discovered that when I use HTTP GET on a model (I'm talking django-rest-interface) the xml returned has 1 or 0 for Boolean values, which is what I want. However, when I do an HTTP PUT to up

Re: "Disabled" option with choiceField ?

2009-03-23 Thread Karen Tracey
On Mon, Mar 23, 2009 at 6:46 AM, Pierre wrote: > > Hi, > > I turning crazy with something which seems relatively easy but isn't > (for me). > I want to create a dropdown (aka ) in > a form. To do this, I use a forms.ChoiceField > (label="Categories",required=True, choices=catz) > > I'd like to ha

Re: Design patterns for create/update view

2009-03-23 Thread Eric Abrahamsen
On Mar 23, 2009, at 6:48 PM, Liubomir.Petrov wrote: > > Yep, i'm already using generic views, but its a big pain (a lot of > code) for a single view that embeds create & update in one place. > I wanned to ask here, because maybe my approach (the single create/ > update view) is not right ? I'm

Re: Django Serialization of BooleanField inconsistent?

2009-03-23 Thread Karen Tracey
On Mon, Mar 23, 2009 at 9:47 AM, chefsmart wrote: > > I have not changed my database. I've always been using MySQL. > > In the meantime I did some more research and discovered that when I > use HTTP GET on a model (I'm talking django-rest-interface) the xml > returned has 1 or 0 for Boolean value

Re: Absolute URL

2009-03-23 Thread Bro
Hi, django.template.defaultags exist ? On 20 mar, 16:36, Rajesh D wrote: > On Mar 20, 6:16 am, Alfonso wrote: > > > > > Hi, > > > Insanely simple answer here I think but I'm trying to sort someurl > > errors in a mapping app.  Virtual earth requires an absoluteurlto > > the KML file django is

Re: Absolute URL

2009-03-23 Thread Rajesh D
On Mar 23, 10:20 am, Bro wrote: > Hi, > > django.template.defaultags exist ? Sorry about that. I should've typed: django.template.defaulttags --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group

Re: "Disabled" option with choiceField ?

2009-03-23 Thread Pierre
Hi Karen, Thanks for your point (it explains why I couldn't see anything about that in "current" django documentation.). So I need to wait for 1.1 or to make something different... Thanks for your reply Karen, Regards, Pierre On Mar 23, 2:52 pm, Karen Tracey wrote: > On Mon, Mar 23, 2009 at 6

Re: Beginner URL question.

2009-03-23 Thread Bro
Hi, I use the same answer but I have another problem in the production server (in local, it works perfectly) On 23 fév, 23:57, "Joe Goldthwaite" wrote: > >You could try using a tag to explicitly state what the > >base for relative URLs should be. > > Thanks Ned. That sounds like it will work.

Re: Beginner URL question.

2009-03-23 Thread Bro
I use {% url myproject.core.views.member_create %} But in the production server, it give :( http://www.mysite.fr/var/www/mysite/mysite/user/create/ instead of : http://www.mysite.fr/user/create/ --~--~-~--~~~---~--~~ You received this message because you are subscr

Re: Django Serialization of BooleanField inconsistent?

2009-03-23 Thread chefsmart
> So values that are > ultimately coming from the database (as when you do a get) are returned from > MySQL as 1/0 while values that originate from Python code are true bools and > get reported as True/False. Yes, you've explained it well. My code in the ReST client expects 1/0 so True/False is

Re: Django-Tagging not working with Oracle

2009-03-23 Thread Brandon Taylor
Downgrading to cx_Oracle-4.4.1 solved the problem. Now I can use the tagging.fields TagField() as expected and everything shows up correctly in the admin. b On Mar 20, 4:15 pm, Brandon Taylor wrote: > Hmm. I might downgrade my cs_Oracle and see if that makes a > difference. I double-checked my

Problem with Sum() function

2009-03-23 Thread eli
How to pass to the Sum() function (ORM) more than one field? My problem: class Model1(models.Model): name = models.CharField(u'Name', max_length=255) class Model2(models.Model): fk1 = models.ForeignKey(Model1, related_name='fk_1') fk2 = models.ForeignKey(Model1, related_name='fk_2')

Re: Dynamic app_label

2009-03-23 Thread Dan Mallinger
I put together a solution this morning, but I noticed something odd that I've run into before and I was wondering if someone could give me some insight. I've noticed that some of the time, when a module is loaded, it's named 'app.foo' and sometimes it's named as 'project.app.foo'. Why is it that

clean data

2009-03-23 Thread Bobby Roberts
Hi all. I'm needing to learn how to tap into the clean data for forms. I'm looking at http://docs.djangoproject.com/en/dev/ref/forms/validation/ trying to figure things out. By my understanding, raw data needs to be cleaned before insertion into the database. I have a few questions: 1. wh

Re: Creating bound form and sending it to the page without validation

2009-03-23 Thread Marek Wawrzyczek
I'd like to make a page, where the user will be able to edit a data of his account and add photos. There will be 2 buttons: add photo, and submit form. Add photo button will cause adding a photo to the server, so the form will be submited, and then in the response generated by django (so that the f

Re: OWNING code

2009-03-23 Thread creecode
Hello mn, I'm not a lawyer and I don't play one on T.V. Others have already answered about licenses and such. I'm wondering if your first question is about the custom code that the programmer produces for you to make your website function? Generally I think you'll find that you own the custom

Django Admin site customization

2009-03-23 Thread Robocop
I have a couple of questions i would think have some pretty straightforward answers, answers i've been unable to dig up in the docs. All i want to do in my admin interface is be able to specify the name of a field via admin.py (i.e. have the name of a field on the backend come from admin.py, not

Using Template Tags Within Markdown

2009-03-23 Thread Daniel Watkins
Hello all, I'm currently trying to render some text in Markdown format, that contains templatetags. For example: [This]({% cms_link 22 %}) is a link. If I render this: {{ that_text|markdown }} the '{% cms_link 22 %}' remains verbatim in the output. As I see it, there are two potenti

Templating language Include path dilemma

2009-03-23 Thread Colm Dougan
Hi, I'm part of an erlang project called erlydtl which is a port of the Django templating language. We currently have a small dilemma about the "right way" to do something and we thought it best to mirror what Django does. The question is whether the definition of the document root should chang

Need help figuring out how to make request.GET.getlist to work plz

2009-03-23 Thread Blake M. Sisco
ok i am having an issue getting getlist() to work properly. it displays the correct number of rows in the template but there is not any data in those rows. firebug shows the following: *Request Headers* Host: wartrac.lormfg.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.

need a multiselect list box for a static list of options

2009-03-23 Thread Adam Fraser
Hello, This should be a pretty simple question. I have a list of options: STAIN_CHOICES = ( (1, 'DNA - DAPI'), (2, 'DNA - Hoechst'), (3, 'DNA - other'), (4, 'Actin - Phalloidin'), (5, 'Tubulin'), ) I would like users to be able to select more than one of these things at a t

Re: clean data

2009-03-23 Thread Briel
Hi I'll try to help answer your 3 Qs > 1.  what does cleaning actually do... prevent sql query injections? > Anything else? Cleaning data is not in place as a security measure, but rather to help you validate the data. That means that you can check the data and find out if it fill your requireme

Re: Using Template Tags Within Markdown

2009-03-23 Thread Alex Gaynor
On Mon, Mar 23, 2009 at 12:56 PM, Daniel Watkins < dan...@daniel-watkins.co.uk> wrote: > > Hello all, > > I'm currently trying to render some text in Markdown format, that > contains templatetags. For example: > >[This]({% cms_link 22 %}) is a link. > > If I render this: > >{{ that_text|m

Re: need a multiselect list box for a static list of options

2009-03-23 Thread Briel
Hi. I haven't played much around with this kind of thing, but I would suggest that you take a look at the form widgets. One of them is called, SelectMultiple, which I bet is the one you are after, but I'm not sure if it will work with choices. You can find something about it at http://docs.django

Savepoint error with fastcgi

2009-03-23 Thread Peter Sheats
I am trying to setup my local box to run my site with fastcgi. I want to do this to mirror the way we have the site set up on our live servers so I can work on implementing something like http://soyrex.com/blog/django-nginx-and-memcached/. I can run my site fine using django's test server, no er

Split Database Model for Replication: RW/RO

2009-03-23 Thread seblb
Hi - is it possible to configure Django so that the admin section pulls details for a read/write db account/server and the main sites access the db via read only details? This would enable a single point of edit (master database) and multi- point reads (slave databases) for a DB replication setup

Re: need a multiselect list box for a static list of options

2009-03-23 Thread Adam Fraser
I don't see anything called SelectMultiple on the page you linked. That was the page I've been scouring for a while now looking for a way to do this. The ModelMultipleChoiceField looks promising, but apparently it's associated with a ManyToManyField model, and that doesn't really fit what I'm goi

Can I limit the choices in a ContentType field in admin?

2009-03-23 Thread Adam Stein
Trying to create a generic FK using ContentType. In admin, the menu lists all the models. Since I only ever need to select 1 of 2 different models, anyway to limit the choice? Setting the choices attribute as Django complains must be a "ContentType" instance ContentType.objects.get()

Re: clean data

2009-03-23 Thread Bobby Roberts
> Cleaning data is not in place as a security measure, but rather to > help you validate the data. That means that you can check the data > and find out if it fill your requirements. If you have a text field > and > want users to type in a serial number, you probably need some > custom validation

Re: OWNING code

2009-03-23 Thread Mario
mn, Django Web Framework is an open source; however, the customized code developed for Django strictly belongs to the developer/organization. Let's put this in perspective. For example, a Java Programmers relies on Java to run their code. Although Java was developed by Sun Microsystems, the progr

More DJango Tagging Oracle Issues

2009-03-23 Thread Brandon Taylor
Hi Everyone, Is anyone having issues with Django Tagging (svn) not updating tags on an existing model? I'm running cx_Oracle-4.4.1 - thanks to (Ian Kelly) and Django Trunk. I can add tags when a model instance is created, but update/delete is not working. TIA, Brandon --~--~-~--~~--

Re: Problem with Sum() function

2009-03-23 Thread eli
anybody? On 23 Mar, 16:17, eli wrote: > How to pass to the Sum() function (ORM) more than one field? > > My problem: > > class Model1(models.Model): >     name = models.CharField(u'Name', max_length=255) > > class Model2(models.Model): >     fk1 = models.ForeignKey(Model1, related_name='fk_1') >

Re: Problem with Sum() function

2009-03-23 Thread Alex Gaynor
On Mon, Mar 23, 2009 at 4:02 PM, eli wrote: > > anybody? > > On 23 Mar, 16:17, eli wrote: > > How to pass to the Sum() function (ORM) more than one field? > > > > My problem: > > > > class Model1(models.Model): > > name = models.CharField(u'Name', max_length=255) > > > > class Model2(models.

Re: clean data

2009-03-23 Thread Briel
I'm not sure how django has built it sql injection protection, but I would guess that when you fx do model.save() or form.save() that the functions actually making the sql to the db makes sure that there are no injections by making place holders for data ect. XSS is something I do know how work,

Re: Need help figuring out how to make request.GET.getlist to work plz --SOLVED

2009-03-23 Thread bsisco
figured it out on the IRC channeli basically just needed to modify my view as follows to make it work def results(request): select = request.GET.getlist('select') results = Warranty.objects.filter(id__in=select) return render_to_response('admin/report_list.html', {'results':results, 'se

django-registration - outputting errors

2009-03-23 Thread neri...@gmail.com
Hello, I just started my first django project and I'm not sure how to print the errors from non_field_errors(). Here is the snippet from registration.forms.py: def clean(self): """ Verifiy that the values entered into the two password fields match. Note that an error

Re: need a multiselect list box for a static list of options

2009-03-23 Thread Brian Neal
On Mar 23, 1:49 pm, Adam Fraser wrote: > Hello, > > This should be a pretty simple question.  I have a list of options: > > STAIN_CHOICES = ( >     (1, 'DNA - DAPI'), >     (2, 'DNA - Hoechst'), >     (3, 'DNA - other'), >     (4, 'Actin - Phalloidin'), >     (5, 'Tubulin'), > ) > > I would like

mod_python and Dev server compatible coding

2009-03-23 Thread Ross
I'm a bit confused by finding a process that works for both the dev server and mod_python. Mod_python uses a 'trigger' word to know to pass serving of that stuff by Django. So URL's with /mysite/ leading them get handled by Django. But it seems that the urls.py then gets the URL without the lea

Re: need a multiselect list box for a static list of options

2009-03-23 Thread Adam Fraser
I found the SelectMultiple widget here: http://docs.djangoproject.com/en/dev/ref/forms/widgets/ But I still don't know how to hook that up to a model like CommaSeparatedIntegerField. help? On Mar 23, 3:25 pm, Adam Fraser wrote: > I don't see anything called SelectMultiple on the page you link

aggregation with foreign key fields and the admin interface

2009-03-23 Thread Andrew D. Ball
I've got what appears to be a common (but not often answered) question about the admin interface: I want to use foreign key fields for aggregation (in the object-oriented sense). This is easily done with model definitions like the following: class USAddress(models.Model): street_line_1 = mo

Re: need a multiselect list box for a static list of options

2009-03-23 Thread Brian Neal
On Mar 23, 3:36 pm, Adam Fraser wrote: > I found the SelectMultiple widget here: > > http://docs.djangoproject.com/en/dev/ref/forms/widgets/ > > But I still don't know how to hook that up to a model like > CommaSeparatedIntegerField. > > help? > Did you try something like this? This is off the t

Re: django-registration - outputting errors

2009-03-23 Thread jeffhg58
The way I have implemented this is to have to the validation occur at password2. Instead of having the check in clean, I would have the validation in clean_password2. Hope that helps. - Original Message - From: neri...@gmail.com To: "Django users" Sent: Monday, March 23, 2009 3

Having trouble authenticating/validating

2009-03-23 Thread Adam Yee
I'm using Django's builtin AuthenticationForm Here's my login view: http://dpaste.com/18110/ Form submittal (not empty or empty fields) takes me back to the login page with 'Did not login'. My debugging print statement isn't showing up in the terminal, so is_valid is somehow returning false. I

seeking elegant solution to ordered list of installed applications

2009-03-23 Thread Michael Repucci
Hi All, I've got a Django project composed of several apps. The site's main page creates links from the list of installed apps like so: #taken from the project's urlconf apps = [app.split('.')[1] for app in settings.INSTALLED_APPS if app.startswith(#project name#)] info_dict = {'template': 'index

html greater than less than encoding problem

2009-03-23 Thread gl330k
Hi all, I'm a django newbie. I have a mysql database backend and when I try to output html from the database I'm getting all the html as ampersand + l + t + ; So then when I view the page I'm basically seeing all the html tags. mysql server - 5.1.30 Thoughts? What am I doing wrong? thanks

Re: html greater than less than encoding problem

2009-03-23 Thread Briel
Hi. It sounds like you have run into the auto escape filter. It basically converts html tags into something viewable but not html. This is a protective matter, to protect your site from cross site scripting attacks, that can take down your site and worse. If you want to display some html from you

Re: RichTextField widget for django

2009-03-23 Thread Scot Hacker
On Mar 20, 2009, at 7:27 AM, Greg Fuller wrote: > http://code.google.com/p/django-fckconnector/ > http://code.google.com/p/django-tinymce/ See also: http://www.wymeditor.org/ https://trac.wymeditor.org/trac/wiki/Contrib/IntegrateInDjango ./s --~--~-~--~~~---~--~

Re: More DJango Tagging Oracle Issues

2009-03-23 Thread Ian Kelly
On Mar 23, 1:52 pm, Brandon Taylor wrote: > Hi Everyone, > > Is anyone having issues with Django Tagging (svn) not updating tags on > an existing model? I'm running cx_Oracle-4.4.1 - thanks to (Ian Kelly) > and Django Trunk. Hmm. I tried running the same model you posted before with Python 2.6

Re: Django book mostly done?

2009-03-23 Thread Scot Hacker
On Mar 17, 2009, at 10:51 AM, Alex Gaynor wrote: > Adrian just put the last batch of chapters online, so I believe all > the content is now up. Having skimmed most of it I can say it looks > really good and I'm sure it basically all works, that said it isn't > a final addition so there ma

Re: Django book mostly done?

2009-03-23 Thread Alex Gaynor
On Mon, Mar 23, 2009 at 5:31 PM, Scot Hacker wrote: > > > On Mar 17, 2009, at 10:51 AM, Alex Gaynor wrote: > > > Adrian just put the last batch of chapters online, so I believe all > > the content is now up. Having skimmed most of it I can say it looks > > really good and I'm sure it basically a

Re: Django book mostly done?

2009-03-23 Thread Graham Dumpleton
On Mar 18, 6:20 pm, Gour wrote: > > "Alex" == Alex Gaynor writes: > > Alex> Adrian just put the last batch of chapters online, so I believe > Alex> all the content is now up.  Having skimmed most of it I can say it > Alex> looks really good and I'm sure it basically all works, that said >

Re: Django book mostly done?

2009-03-23 Thread Alex Gaynor
On Mon, Mar 23, 2009 at 6:08 PM, Graham Dumpleton < graham.dumple...@gmail.com> wrote: > > > > On Mar 18, 6:20 pm, Gour wrote: > > > "Alex" == Alex Gaynor writes: > > > > Alex> Adrian just put the last batch of chapters online, so I believe > > Alex> all the content is now up. Having skimme

django-registration - 504 error

2009-03-23 Thread neri...@gmail.com
Hey, does anyone know why I'm getting a "Exception Type: SMTPRecipientsRefused" error using django-registration? Exception Type: SMTPRecipientsRefused Exception Value: {u'neri...@gmail.com': (504, ': Sender address rejected: need fully-qualified address')} Exception Location: /home

Re: i18n escape-able quote marks

2009-03-23 Thread John Handelaar
2009/3/23 Malcolm Tredinnick : > To solve your particular problem here, though, it might be possible to > write your own version of the url template tag. Writing custom template > tags is easy enough (and documented). Writing a templtae tag that more > or less wraps another template tag is probabl

Re: More DJango Tagging Oracle Issues

2009-03-23 Thread Brandon Taylor
Hi Ian, I'm not that familiar with Oracle, so I have no idea if the problems I'm experiencing are related in some way to permissions, etc, but I have been reassured by my Oracle person that my user has full permissions on my schema. That being said, the TagField() will show up in admin when spec

Re: Split Database Model for Replication: RW/RO

2009-03-23 Thread Russell Keith-Magee
On Tue, Mar 24, 2009 at 4:05 AM, seblb wrote: > > Hi - is it possible to configure Django so that the admin section > pulls details for a read/write db account/server and the main sites > access the db via read only details? > > This would enable a single point of edit (master database) and multi

Re: Problem with Sum() function

2009-03-23 Thread Russell Keith-Magee
On Tue, Mar 24, 2009 at 12:17 AM, eli wrote: > > How to pass to the Sum() function (ORM) more than one field? > > My problem: > > class Model1(models.Model): >    name = models.CharField(u'Name', max_length=255) > > class Model2(models.Model): >    fk1 = models.ForeignKey(Model1, related_name='fk

inconsistency between remove() and clear()?

2009-03-23 Thread Margie
It seems to me there is an inconsistency between clear() and remove (). After a remove() I find that the related object set no longer contains the specified object (as expected), and the specified object also no longer points to the related set (this also is what I'd expect). However, in the cas

Re: Per app middleware?

2009-03-23 Thread Malcolm Tredinnick
On Mon, 2009-03-23 at 14:20 +0100, Gabriel Rossetti wrote: > Hello everyone, > > I have a project that has two apps that use the same models (I moved it > out of the apps, up to the project's root). I was wondering if it is > possible to have global middleware (that they both need) and per app

Re: Dynamic app_label

2009-03-23 Thread Malcolm Tredinnick
On Mon, 2009-03-23 at 11:44 -0400, Dan Mallinger wrote: > I put together a solution this morning, but I noticed something odd > that I've run into before and I was wondering if someone could give me > some insight. I've noticed that some of the time, when a module is > loaded, it's named 'app.foo

Re: Creating bound form and sending it to the page without validation

2009-03-23 Thread Malcolm Tredinnick
On Mon, 2009-03-23 at 17:46 +0100, Marek Wawrzyczek wrote: > I'd like to make a page, where the user will be able to edit a data of > his account and add photos. There will be 2 buttons: add photo, and > submit form. Add photo button will cause adding a photo to the server, > so the form will be s

Re: html greater than less than encoding problem

2009-03-23 Thread gl330k
Thank you that was it :) On Mar 23, 5:01 pm, Briel wrote: > Hi. > > It sounds like you have run into the auto escape filter. It basically > converts html tags into something viewable but not html. This is > a protective matter, to protect your site from cross site scripting > attacks, that can t

Re: Templating language Include path dilemma

2009-03-23 Thread Malcolm Tredinnick
On Mon, 2009-03-23 at 17:21 +, Colm Dougan wrote: [...] > The question is whether the definition of the document root should > change when evaluating includes. > > For example, if I have template1 which includes path1/template2 then > should include statements within template2 be wrt. to the

Re: OWNING code

2009-03-23 Thread Malcolm Tredinnick
On Mon, 2009-03-23 at 19:34 +0900, Russell Keith-Magee wrote: > On Mon, Mar 23, 2009 at 2:52 PM, mn wrote: > > > > Hello, > > new on here and not a tech guy, wanted to know if a company or > > programmer who uses Django can claim they own the code? > > Firstly, IANAL, etc. > > There are at leas

DjangoBook forms

2009-03-23 Thread AKK
Hi, I'm working through chapter 7 of the djangobook online. and i've got the following: def search(request): if 'criteria' in request.GET: message = 'You searched for: %r' % request.GET['criteria'] else: message = 'You submitted an empty form.' return HttpResponse(mes

Re: clean data

2009-03-23 Thread Malcolm Tredinnick
On Mon, 2009-03-23 at 12:31 -0700, Bobby Roberts wrote: [...] > I thought I read that there was a way to chk data for sql query > injections / cross site scripting etc before insertion The whole thing about SQL injections is that there is no way to 100% reliably "check for them". So you don't

Re: DjangoBook forms

2009-03-23 Thread Alex Gaynor
On Mon, Mar 23, 2009 at 8:53 PM, AKK wrote: > > Hi, > > I'm working through chapter 7 of the djangobook online. and i've got > the following: > > def search(request): >if 'criteria' in request.GET: >message = 'You searched for: %r' % request.GET['criteria'] >else: >message

Re: Savepoint error with fastcgi

2009-03-23 Thread Malcolm Tredinnick
On Mon, 2009-03-23 at 12:11 -0700, Peter Sheats wrote: [...] > The error I was getting before was just a "connection already closed > error" until I changed the following in wsgi.py line 235-248: Well, that's really the more important issue, then. Why is the connection already closed when Django

Re: mod_python and Dev server compatible coding

2009-03-23 Thread Malcolm Tredinnick
On Mon, 2009-03-23 at 13:34 -0700, Ross wrote: > I'm a bit confused by finding a process that works for both the dev > server and mod_python. > > Mod_python uses a 'trigger' word to know to pass serving of that stuff > by Django. So URL's with /mysite/ leading them get handled by > Django. But

Re: Django book mostly done?

2009-03-23 Thread Malcolm Tredinnick
On Mon, 2009-03-23 at 15:08 -0700, Graham Dumpleton wrote: [...] > More of a concern is that mod_python is still regarded as the most > robust production setup. I can't see that mod_wsgi is even mentioned > at all. Here's a wild thought from out of left field: have you thought of contacting the a

Re: Split Database Model for Replication: RW/RO

2009-03-23 Thread Malcolm Tredinnick
On Mon, 2009-03-23 at 12:05 -0700, seblb wrote: > Hi - is it possible to configure Django so that the admin section > pulls details for a read/write db account/server and the main sites > access the db via read only details? This particular situation is easy. You run two different versions of the

  1   2   >