Re: Django mod_python under apache

2010-11-12 Thread Graham Dumpleton
For mod_python the result of using print will only show in Apache error log when you do an explicit flush of stdout. If using mod_wsgi, it autoflushes on newline so you don't have this problem. Graham On Nov 13, 7:29 am, vivek_12315 wrote: > I have configured Django with mod_python under apache

Re: Django mod_python under apache

2010-11-12 Thread Kenneth Gonsalves
On Fri, 2010-11-12 at 12:29 -0800, vivek_12315 wrote: > I have configured Django with mod_python under apache web server. > > do not do this - mod_python is dead and is now officially deprecated by django. Use mod_wsgi instead. -- regards Kenneth Gonsalves Senior Associate NRC-FOSS at AU-KBC -

Re: Downloading files

2010-11-12 Thread fei
It took me a while how to do this. Figured it by reading several sites returned by Google. Actually it's quite simple and easy. Here is my sample code (using django server): # assume you have an Attachment class and each row in the class # has a FileField called 'stored_file'. def attachment(reque

Re: Create User from an User extension

2010-11-12 Thread Steve Holden
On 11/12/2010 1:31 PM, Karim Gorjux wrote: > Hi all, I successfully extended the User as described in the > authorization documentation. Now I would like to use and edit the User > and my class Persona not like two entity but just one. > > When I want to create a Persona, I have also to create a U

questions about creating fields dynamically

2010-11-12 Thread Julio Cesar
Hi all, I had read some posts about create dinamically fields in this group and also read http://code.djangoproject.com/wiki/DynamicModels but I don't sure how to proceed in my case, so any help will be apreciated. I have a list of variables and I need to save theirs values every some seconds, the

Create User from an User extension

2010-11-12 Thread Karim Gorjux
Hi all, I successfully extended the User as described in the authorization documentation. Now I would like to use and edit the User and my class Persona not like two entity but just one. When I want to create a Persona, I have also to create a User first. Now the steps are too long, how I can crea

Re: Django mod_python under apache

2010-11-12 Thread Shawn Milochik
The recommended way to do this is to actually use Python's logging module. If you're using trunk or 1.3 beta then you can configure it right in settings.py. If you really want to view print statements, use the development server (in your development environment) and you'll see them. Also, dependi

Django mod_python under apache

2010-11-12 Thread vivek_12315
I have configured Django with mod_python under apache web server. I would like to know, where can i see the print statements output for debugging which i put in python files in django views. I dont think print statement appears in Apache logs ... -- You received this message because you are sub

Re: TemplateDoesNotExist

2010-11-12 Thread Shawn Milochik
Sure: djangogigs.com is a good resource. Shawn -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegro

Re: TemplateDoesNotExist

2010-11-12 Thread Lindsay Hunt
Ok, thanks. Do you have any resources for people who I could hire on a short-term basis to provide Django support? On Fri, Nov 12, 2010 at 3:16 PM, Shawn Milochik wrote: > On Fri, Nov 12, 2010 at 3:12 PM, Lindsay Hunt wrote: > > I'm really a novice with using Django. Can you help me understan

Re: TemplateDoesNotExist

2010-11-12 Thread Shawn Milochik
On Fri, Nov 12, 2010 at 3:12 PM, Lindsay Hunt wrote: > I'm really a novice with using Django.  Can you help me understand where I > can find the settings.py ? You really need to at least do the tutorial. If you have questions this basic, then if someone answers them you'll probably get stuck imm

Re: TemplateDoesNotExist

2010-11-12 Thread Lindsay Hunt
I'm really a novice with using Django. Can you help me understand where I can find the settings.py ? On Fri, Nov 12, 2010 at 3:05 PM, Fred Chevitarese wrote: > Look at settings.py and see where in which directory are configured your > templates. > Then, you can see at the error what file he is s

Re: TemplateDoesNotExist

2010-11-12 Thread Fred Chevitarese
Look at settings.py and see where in which directory are configured your templates. Then, you can see at the error what file he is searching for... "TemplateNotFound" /home/fred/teste.hlml Something like this :P Hope it helps ;) http://chevitarese.wordpress.com Fred Chevitarese - GNU/Linux 201

Re: TemplateDoesNotExist

2010-11-12 Thread lch...@gmail.com
I think the problem is that Django is looking for a template that has not been created. I need to make sure the template exists, but don't know how to do this. On Nov 12, 2:33 pm, Daniel Roseman wrote: > On Nov 12, 7:23 pm, "lch...@gmail.com" wrote: > > > > > I'm trying to update a website that

Re: TemplateDoesNotExist

2010-11-12 Thread lch...@gmail.com
My site is already built www.measuring-success.com I'm trying to add some new pages to the site (www.measuring- success.com/follow/ (for example) I created a HTML file with the code I need and uploaded it to the directory where the other flat files are stored. It matches the same path as the othe

Re: TemplateDoesNotExist

2010-11-12 Thread Daniel Roseman
On Nov 12, 7:23 pm, "lch...@gmail.com" wrote: > I'm trying to update a website that I didn't create that uses Django, > but am running into some issues. > > 1. I use the Django Admin site to create a new flat page > 2. I create a new file named "yourname.html" > 3. I FTP the file to my server > >

TemplateDoesNotExist

2010-11-12 Thread lch...@gmail.com
I'm trying to update a website that I didn't create that uses Django, but am running into some issues. 1. I use the Django Admin site to create a new flat page 2. I create a new file named "yourname.html" 3. I FTP the file to my server When I try to test it, I get a 500 Internal Site Error. My l

How to Order ManyToManField Inline Reverse Relastionships in the Django Admin

2010-11-12 Thread jough
I'm using Django 1.2's new ManyToMany admin.TabularInline to display related objects in the admin app, and it works great except I can't figure out what to set the "ordering" property to so it can sort by one of the cross-referenced field names. For instance: class Foo(models.Model):

Re: Converting plain string to dictionary

2010-11-12 Thread Johannes Nel
pyparsing is an incredibly (perhaps over in this case) powerful tool for parsing stuff into what ever your heart desires. On Fri, Nov 12, 2010 at 4:22 PM, Javier Guerra Giraldez wrote: > On Fri, Nov 12, 2010 at 3:40 AM, Pradnya wrote: >> Please let me know if there is any other way to convert t

Re: Django 1.3 alpha 1 released

2010-11-12 Thread hcarvalhoalves
On 12 nov, 00:06, Russell Keith-Magee wrote: > On Fri, Nov 12, 2010 at 9:09 AM, hcarvalhoalves > > > > > > wrote: > > To be fair, I only had one small pet peeve with the current views API > > after trying the alpha: the use of self.args / self.kwargs. > > > There's added value on being able to

Re: Show DEBUG page to specific user group?

2010-11-12 Thread Josh
I didnt look at the blog post but you could try something like this in your settings: def debug_for_superuser(request): if request.user.is_superuser: return True else: return False DEBUG = debug_for_superuser I haven't actually tried this but I use something like that to

Re: Converting plain string to dictionary

2010-11-12 Thread Javier Guerra Giraldez
On Fri, Nov 12, 2010 at 3:40 AM, Pradnya wrote: > Please let me know if there is any other way to convert the plane > text / string into json if you have data in a non-standard format, you'll have to whip up your own parser -- Javier -- You received this message because you are subscribed to

Re: Django cache view

2010-11-12 Thread Tom Evans
On Fri, Nov 12, 2010 at 2:22 PM, Mathieu Leduc-Hamel wrote: > Hi all, > > I'm working on a e-commerce website and to make it work better we've > implemented a couple of caching strategy. But i was wondering, in our > system, we are using the cache middleware and the decorator to mark > some views

Re: Can Admin Widgets be used in non-admin templates?

2010-11-12 Thread mathphreak
If you want them to access everything on certain admin pages, then you can change user permissions around to give them access to only a few pages. If what you want can be picked out of (add, change, view), then the permissions model works for that too. If you need something more fine-grained, or

Re: Django cache view

2010-11-12 Thread Daniel Roseman
On Nov 12, 2:22 pm, Mathieu Leduc-Hamel wrote: > Hi all, > > I'm working on a e-commerce website and to make it work better we've > implemented a couple of caching strategy. But i was wondering, in our > system, we are using the cache middleware and the decorator to mark > some views as cacheable.

Re: Creating A Model For Existing DB Table

2010-11-12 Thread octopusgrabbus
Thanks. That was one of the problems. On Nov 11, 10:47 am, Michael wrote: > no missing parenthesis ? > > class ept_inv(models.Model): >     part_num = models.CharField(max_length=20) >     ept_type = models.SmallIntegerField() >     inv_id = models.IntegerField() >     load_date = models.DateFiel

Django cache view

2010-11-12 Thread Mathieu Leduc-Hamel
Hi all, I'm working on a e-commerce website and to make it work better we've implemented a couple of caching strategy. But i was wondering, in our system, we are using the cache middleware and the decorator to mark some views as cacheable. But, loading multiple times the same view, it seems there

Re: how to set color for field in forms

2010-11-12 Thread tinyData
u must specify form field attributes in the widget argument such as : username = CharField(max_length=20,widget=TextInput(attr={"background-color:red"any another attributes u wanna set this } check this document out http://docs.djangoproject.com/en/dev/ref/forms/widgets/ On Fri, Nov 12, 2010

missing ampersands in pdfs

2010-11-12 Thread paulh
I am using django with the geraldo reports engine and have recently encountered problems. Of course this may be a geraldo problem and I have made a similar post on that group. I am hoping, however, that this might just ring a bell with someone. Many text fields in the database contain ampersands an

Re: how to set color for field in forms

2010-11-12 Thread Tom Evans
On Fri, Nov 12, 2010 at 12:50 PM, hemi19 wrote: > > Hi All, > > iam registration form in my website and iam able to get all the values i > needed from DB using forms.My problem is how can i change color and size of > textbox. The below is my code > > {% for field in form %} > >    {{ field.label_

how to set color for field in forms

2010-11-12 Thread hemi19
Hi All, iam registration form in my website and iam able to get all the values i needed from DB using forms.My problem is how can i change color and size of textbox. The below is my code {% for field in form %} {{ field.label_tag }}{{ field }} {% if field.help_text %}{{ field.help_text

Re: Downloading files

2010-11-12 Thread Daniel Roseman
On Nov 12, 6:29 am, vikash rai wrote: > Hi, > > I am new to django . > From html page I want to download a file from a location in my local > system . I am using django server and not the apache/lightpd. > By the following code I am able to get the dialouge box on clicking the > link on web page .

Re: Dynamic user-filtered search

2010-11-12 Thread Ed
Cool. I'll to some work on this and check back to make sure it's not insecure. On Nov 12, 7:27 am, Masklinn wrote: > On 2010-11-12, at 13:20 , Ed wrote: > > > > > It seems simple from a SQL point of view, but I'm wondering what the > > best implementation would be from to go from a django form t

Re: Dynamic user-filtered search

2010-11-12 Thread Masklinn
On 2010-11-12, at 13:20 , Ed wrote: > > It seems simple from a SQL point of view, but I'm wondering what the > best implementation would be from to go from a django form to MySQL. > The above is an example. In practice, I would want to dynamically > populate the filter criteria/fields. Any sugges

Re: Django 1.3 alpha 1 released

2010-11-12 Thread Łukasz Rekucki
On 12 November 2010 03:12, Russell Keith-Magee wrote: > 2010/11/12 Łukasz Rekucki : >> On 12 November 2010 01:45, Ian Lewis wrote: >>> 2010/11/12 Łukasz Rekucki On 12 November 2010 01:16, hcarvalhoalves wrote: > What about having an official 1.3 feedback thread at django-dev

Dynamic user-filtered search

2010-11-12 Thread Ed
I'm brainstorming a search function for the user that is similar to iTunes Smart Playlists. I can currently display all of the release years for all of the films in the database. A user can pick a year and see all of the films released in that year. Or I can show all of the genres of movie. A user

Re: Show DEBUG page to specific user group?

2010-11-12 Thread Ramiro Morales
On Fri, Nov 12, 2010 at 7:49 AM, Django-learner wrote: > I turned off the DEBUG in settings on production server, but still > want to show the DEBUG page to specific user groups. How can we make > this happen? Eric Holscher posted something along these lines to his blog a while back: http://eri

Input welcome for comments app idea

2010-11-12 Thread Kevin Renskers
Hi, My new Django website is as good as finished, I only have to work on the comments section. I know about the comments app that ships with Django, but I don't really like it that much. I see three options for comments on my website: 1) Use something like django-threadedcomments 2) Use Disqus or

Show DEBUG page to specific user group?

2010-11-12 Thread Django-learner
I turned off the DEBUG in settings on production server, but still want to show the DEBUG page to specific user groups. How can we make this happen? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us..

Re: Postgres LATIN1 to UTF-8

2010-11-12 Thread Tim Sawyer
On 08/11/10 07:03, Christophe Pettus wrote: On Nov 7, 2010, at 2:17 PM, Tim Sawyer wrote: Does anyone have a recommended method for converting a Postgres database from LATIN1 to UTF-8? Probably the most efficient way is to use pg_dump with the --encoding option: Dump the database in UTF8, a

Converting plain string to dictionary

2010-11-12 Thread Pradnya
Hello, I have a string as s = "{a : b, c : 2}" I want to convert this string to json object. There are no quotes inside the string that means it's not like "{'a' : 'b', 'c' : 2}", so when I tried to convert this string to json using eval() it's throwing exception. Please let me know if there is