Re: Noob question: Which Linux distribution is "best" for Django?

2007-12-11 Thread Aspersieman
Lic. José M. Rodriguez Bacallao wrote: > I will recommend Arch, is simple and powerful. > > On Dec 11, 2007 1:22 PM, Joe <[EMAIL PROTECTED]> wrote: > >> To make things easy, you could download VMware Server - run that on >> your windows box and install the prebuilt appliances. That'd make it >>

Re: Strange error, trying to deploy Django with mod_wsgi

2007-12-11 Thread Graham Dumpleton
On Dec 12, 3:18 pm, Michael Best <[EMAIL PROTECTED]> wrote: > yml wrote: > > Hello Steve, > > > Sometimes ago when I first try to use mod_wsgi I have written a wiki > > page there: > >*http://code.djangoproject.com/wiki/django_apache_and_mod_wsgi > > It is a step by step procedure that I have

Re: Accessing Multiple Databases

2007-12-11 Thread [EMAIL PROTECTED]
There is a Multiple Database Branch which is not under active development...and doesn't have some of the new stuff in the trunk...but I'm using it in one of my projects...works pretty good for the most part. http://code.djangoproject.com/wiki/MultipleDatabaseSupport On Dec 11, 2:48 pm, Derek Ste

Re: Country, State and City data

2007-12-11 Thread Chris Moffitt
We have country and admin area (i.e. state/province) included in Satchmo. You can see the models here - http://www.satchmoproject.com/trac/browser/satchmo/trunk/satchmo/l10n The actual data is an XML file in the fixtures directory. Geonames - http://www.geonames.org/ is a big open source databas

Re: Strange error, trying to deploy Django with mod_wsgi

2007-12-11 Thread Michael Best
yml wrote: > Hello Steve, > > Sometimes ago when I first try to use mod_wsgi I have written a wiki > page there: >* http://code.djangoproject.com/wiki/django_apache_and_mod_wsgi > It is a step by step procedure that I have followed to configure > mod_wsgi. It might help you to get your applic

Re: Database

2007-12-11 Thread James Bennett
On Dec 11, 2007 7:57 PM, Goldy <[EMAIL PROTECTED]> wrote: > My Django database was created using sqlite3 and therefore produced a > file called mydb.py. > I was wondering if this file could be connected to and examined > interactively by sqlite3 as if i had inserted the tables myself? Why wouldn'

not really a django problem, just fishing here--

2007-12-11 Thread Jason Witherspoon
Hey everyone-- I've been trying to run Xapian alongside my Django app for lo, many moons now. Here's the problem I run into: Xapian is compiled to work w/a Python that's been configured for ucs4 support (this is a manner of handling unicode). Won't work w/ucs2, far as I can tell. When I

Re: Import RSS headlines from feeds into django based pages.

2007-12-11 Thread Peter Baumgartner
> I want to add in a django page some rss feeds from another websites, > like headlines from news portals. how can I do that without > javascript, java and inline frames? > http://www.djangosnippets.org/snippets/384/ --~--~-~--~~~---~--~~ You received this message

a better DateTime widget

2007-12-11 Thread James Turk
I was wondering if anyone had experience with building a better DateTimeWidget, I've built my own and am looking to clean it up and make it available to the general public perhaps with some advanced formatting options. Are there any DateTimeWidgets in common use that use selects instead of a text

Re: Views that don't return anything

2007-12-11 Thread James Turk
Any HTTP request is going to send a status code on return. I'd recommend returning a blank page or something just so that the server can return a 200-OK. On Dec 11, 9:04 pm, "Doug Penny" <[EMAIL PROTECTED]> wrote: > I am trying to create a view that processes some data, but doesn't > return anyt

Views that don't return anything

2007-12-11 Thread Doug Penny
I am trying to create a view that processes some data, but doesn't return anything. The data is being submitted from within a client-side, desktop app and should be completely transparent to the user. I currently do not have a return statement in the view and am getting a HTTP 500 status code on

Database

2007-12-11 Thread Goldy
My Django database was created using sqlite3 and therefore produced a file called mydb.py. I was wondering if this file could be connected to and examined interactively by sqlite3 as if i had inserted the tables myself? --~--~-~--~~~---~--~~ You received this messag

Re: about tagging app and tags cloud

2007-12-11 Thread Kellen
There's a bug: http://code.google.com/p/django-tagging/issues/detail?id=54 For which there is a patch, which changes in tagging/utils.py: -thresholds = [math.pow(max_weight - min_weight + 1, float(i) / float(steps)) \ +thresholds = [min_weight + math.pow(max_weight - min_w

Re: Admin

2007-12-11 Thread Goldy
Got it thanks! On Dec 11, 10:58 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > On Dec 11, 5:38 pm, Goldy <[EMAIL PROTECTED]> wrote: > > > Thank you, where would i insert, verbose_name_plural = "breweries" > > into ? > > In the Meta inner class. See below... > > > > > class Brewery (models.Model):

Re: Country, State and City data

2007-12-11 Thread Alex Ezell
Why not let them freehand it and then geocode it, so you have a standard way to search it? Of course, not knowing how you will use it, I could be making no sense :) /alex On Dec 11, 2007 3:59 PM, <[EMAIL PROTECTED]> wrote: > > I'm building a django site that requires the user to select their > g

django REST: update tables

2007-12-11 Thread crybaby
I have a view which allows users to upload pictures and add tags, description to them. I have to update two tables: post and img If I want to do this by REST, how do you do this? Is REST only suited for manipulating one resource(one table) at a time? --~--~-~--~~~---

Re: Admin

2007-12-11 Thread Rajesh Dhawan
On Dec 11, 5:38 pm, Goldy <[EMAIL PROTECTED]> wrote: > Thank you, where would i insert, verbose_name_plural = "breweries" > into ? In the Meta inner class. See below... > > class Brewery (models.Model): > name = models.CharField(maxlength=60) > status = models.CharField(maxlength=8) >

Re: Custom model fields not working?

2007-12-11 Thread [EMAIL PROTECTED]
Never mind, I see it's to do with database backends. On Dec 11, 10:34 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > OK, well now, for some reason whenever I use a custom field Django > just ignores it when running syncdb. If I ask it for the raw SQL > output I can see that the field is bei

Re: Admin

2007-12-11 Thread Goldy
Thank you, where would i insert, verbose_name_plural = "breweries" into ? class Brewery (models.Model): name = models.CharField(maxlength=60) status = models.CharField(maxlength=8) address = models.CharField(maxlength=60) postcode = models.CharField(maxlength=8) county = model

Re: Performance of a django website

2007-12-11 Thread Graham Dumpleton
On Dec 12, 6:21 am, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > Hi again, > > > 3. I'm using prefork MPM on apache with maxclients set to 1000. > > Apart from Joe's excellent profiling suggestion, I would recommend > reducing maxclients to a much lower value (like say 100) and then > increasing it

Re: Custom model fields not working?

2007-12-11 Thread [EMAIL PROTECTED]
OK, well now, for some reason whenever I use a custom field Django just ignores it when running syncdb. If I ask it for the raw SQL output I can see that the field is being omitted entirely. Even if I do something simple like: class TestField(models.TextField): pass Does anyone know what I

Country, State and City data

2007-12-11 Thread weissblitz
I'm building a django site that requires the user to select their geographical location. Does anyone knows where can I get this country/state/city data in a format that can be imported into MySQL? Thanks in advance, Carlos --~--~-~--~~~---~--~~ You received this m

Re: Custom model fields not working?

2007-12-11 Thread [EMAIL PROTECTED]
You're a saint, you know that? On Dec 11, 9:04 pm, "Marty Alchin" <[EMAIL PROTECTED]> wrote: > On Dec 11, 2007 3:42 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > When I try to run syncdb on a model which uses the PickledObjectField > > (see my sample model athttp://dpaste.com/hold/27713/

Re: Custom model fields not working?

2007-12-11 Thread Marty Alchin
On Dec 11, 2007 3:42 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > When I try to run syncdb on a model which uses the PickledObjectField > (see my sample model at http://dpaste.com/hold/27713/), I get this > traceback:- Your problem is that you're importing the PickledObjectField into your c

Re: about tagging app and tags cloud

2007-12-11 Thread Lic. José M. Rodriguez Bacallao
I'm controling the font size with CSS, that is not the problem, the problem is with the code for tags cloud that it doesn't generate the font_size attr for some tags. On Dec 11, 2007 3:44 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Just control the default font size with a little CSS? (pr

Re: about tagging app and tags cloud

2007-12-11 Thread [EMAIL PROTECTED]
Just control the default font size with a little CSS? (presuming you're using this for [X]HTML output) On Dec 11, 8:26 pm, "Lic. José M. Rodriguez Bacallao" <[EMAIL PROTECTED]> wrote: > hi folks, I need to generate a tags cloud for a model and I'm using > the tagging app from google code. I do so

Custom model fields not working?

2007-12-11 Thread [EMAIL PROTECTED]
Hey everyone, I've asked a little in the Django IRC, but nobody seems to be able to help. I'm trying to implement a custom model field, and I really can't figure out why I keep getting errors. My code for my fields module is at http://dpaste.com/hold/27712/ When I try to run syncdb on a model wh

RSS...my parameters are not correct

2007-12-11 Thread Greg
Hello, I'm trying to get my RSS feed items to link to the right url, however I'm having trouble. I was orginally having my blogs appear in my RSS feed. When I clicked on one of them I would get the error: ' Invalid feed parameters. Slug u'latest' is valid, but other parameters, or lack thereof,

about tagging app and tags cloud

2007-12-11 Thread Lic. José M. Rodriguez Bacallao
hi folks, I need to generate a tags cloud for a model and I'm using the tagging app from google code. I do something like this: cloud = Tag.objects.cloud_for_model(NewsEntry, 6) and generate the html cloud based in the "font_size" attr from the tags list "cloud". The problem come when I realize t

Re: Django Application Without Source?

2007-12-11 Thread gordyt
I had thought the .pyc files were supposed to be portable... On Dec 10, 2:29 pm, "Jay Parlar" <[EMAIL PROTECTED]> wrote: > And if I recall correctly, .pyc files are version dependent, machine > independent, but don't quote me on that :) I did find this post http://www.python.org/search/hype

Re: Performance of a django website

2007-12-11 Thread James Bennett
On Dec 11, 2007 1:28 PM, Richard Coleman <[EMAIL PROTECTED]> wrote: > I have maxclients set to 1000, but the number of apache processes never > gets close to that value. I've played around with various settings for > maxclient, but as long as I don't set it too low, this never comes into > play.

Re: Catching 413 response

2007-12-11 Thread Jeremy Dunck
I think you want tramline. Or you want ticket #2070 Sorry you've received no helpful response in the meantime. On Dec 7, 2007 8:58 AM, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > > Did anybody manage to catch in Django 413 response (request entity too > large), thrown by http servers eg. when size

Re: Performance of a django website

2007-12-11 Thread Jeremy Dunck
On Dec 11, 2007 1:39 PM, Richard Coleman <[EMAIL PROTECTED]> wrote: ... > > > I think a large part of my question really comes down to "Is 300 > requests per second reasonable for an uncached django site on a single > machine?". Maybe it is. > > We are looking at using the memcached API in our co

Re: Performance of a django website

2007-12-11 Thread Karen Tracey
On Dec 11, 2007 1:49 PM, Richard Coleman <[EMAIL PROTECTED]> wrote: > 1. Static content and dynamic are on the same server (that will change > on production). But they are on different apache virtual. Mod_python > is turned off for the static stuff. Hitting only a static page is very > fast (65

Re: Performance of a django website

2007-12-11 Thread Richard Coleman
Forest Bond wrote: >>> - How are you running your Django app? Mod_python? FastCGI? >>> - What web server are you using? >>> - What's the nature of the dynamic Django request you are measuring? >>> How many DB queries does it make? Is DEBUG mode off? >>> - What kind of numbers do you get when you s

Accessing Multiple Databases

2007-12-11 Thread Derek Steinkamp
I read through all the relevant documentation but I couldn't find any info on an issue I am about to face: accessing multiple tables in different databases with Django. Here's a quick example: My Django app (MyApp) has r/w access to the MyApp database on MySQLserver1, and all of MyApp models l

Re: Admin

2007-12-11 Thread Rajesh Dhawan
> I have a table ending in 'ery', however in the admin it is spelt 'ys', > if course this is wrong it should end in 'ies'. > Is it possible to change this? http://www.djangoproject.com/documentation/model-api/#verbose-name-plural -Rajesh --~--~-~--~~~---~--~~ You

Re: Admin

2007-12-11 Thread Marty Alchin
http://www.djangoproject.com/documentation/model-api/#verbose-name-plural On Dec 11, 2007 2:37 PM, Goldy <[EMAIL PROTECTED]> wrote: > > I have a table ending in 'ery', however in the admin it is spelt 'ys', > if course this is wrong it should end in 'ies'. > Is it possible to change this? > > >

Re: Performance of a django website

2007-12-11 Thread Jeremy Dunck
On Dec 11, 2007 1:21 PM, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > > Hi again, > > > 3. I'm using prefork MPM on apache with maxclients set to 1000. > > Apart from Joe's excellent profiling suggestion, I would recommend > reducing maxclients to a much lower value (like say 100) and then > increas

Admin

2007-12-11 Thread Goldy
I have a table ending in 'ery', however in the admin it is spelt 'ys', if course this is wrong it should end in 'ies'. Is it possible to change this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" grou

Re: docs for the new ModelForm() class

2007-12-11 Thread John M
No, I don't need anything added, I'm just slow and didn't see the link at the end of the newforms doc, dh. Thanks everyone, I love this group, took only 2min to get an answer!! John On Dec 11, 11:32 am, "Joseph Kocherhans" <[EMAIL PROTECTED]> wrote: > On 12/11/07, John M <[EMAIL PROTECTED]>

Re: docs for the new ModelForm() class

2007-12-11 Thread Joseph Kocherhans
On 12/11/07, John M <[EMAIL PROTECTED]> wrote: > > I love newforms, and as soon as I 'master' form_for_instance/model, > you guys come out with something totally awesome, sub-classing > something called ModelForm, wow. > > now, where do i get 'docs' for this? Would the developer group be > best,I

Re: Performance of a django website

2007-12-11 Thread Richard Coleman
Rajesh Dhawan wrote: >> 3. I'm using prefork MPM on apache with maxclients set to 1000. >> > > Apart from Joe's excellent profiling suggestion, I would recommend > reducing maxclients to a much lower value (like say 100) and then > increasing it gradually. > > From your description of the slu

Re: docs for the new ModelForm() class

2007-12-11 Thread Rajesh Dhawan
> I love newforms, and as soon as I 'master' form_for_instance/model, > you guys come out with something totally awesome, sub-classing > something called ModelForm, wow. > > now, where do i get 'docs' for this? Would the developer group be > best,I've found some good stuff there, and a few exampl

Re: Performance of a django website

2007-12-11 Thread Forest Bond
Hi, On Tue, Dec 11, 2007 at 01:37:36PM -0500, Richard Coleman wrote: > Rajesh Dhawan wrote: > >> When I stress test the dynamic part of the site, I am only getting about > >> 300 requests per second on my test setup. This is using two Dell 1950's > >> (one for web, one for mysql database). These

Re: docs for the new ModelForm() class

2007-12-11 Thread Karen Tracey
ModelForm is documented here: http://www.djangoproject.com/documentation/modelforms/ On Dec 11, 2007 2:22 PM, John M <[EMAIL PROTECTED]> wrote: > > I love newforms, and as soon as I 'master' form_for_instance/model, > you guys come out with something totally awesome, sub-classing > something cal

docs for the new ModelForm() class

2007-12-11 Thread John M
I love newforms, and as soon as I 'master' form_for_instance/model, you guys come out with something totally awesome, sub-classing something called ModelForm, wow. now, where do i get 'docs' for this? Would the developer group be best,I've found some good stuff there, and a few examples here and

Re: Performance of a django website

2007-12-11 Thread Brian Morton
http://www.djangoproject.com/documentation/db-api/#select-related On Dec 11, 1:18 pm, Joe <[EMAIL PROTECTED]> wrote: > I've found the largest memory hog to be the native way related tables > are setup. > > Check class definitions with related tables and edit as such: > > class ...(models.Mode): >

Re: Performance of a django website

2007-12-11 Thread Rajesh Dhawan
Hi again, > 3. I'm using prefork MPM on apache with maxclients set to 1000. Apart from Joe's excellent profiling suggestion, I would recommend reducing maxclients to a much lower value (like say 100) and then increasing it gradually. >From your description of the sluggish response of your web s

Re: Performance of a django website

2007-12-11 Thread Brian Morton
Sorry, just saw your earlier post about debug being turned off. I would say it is definitely time to start profiling your code. On Dec 11, 2:11 pm, Brian Morton <[EMAIL PROTECTED]> wrote: > Joseph raises a good point. I only recently discovered what a > performance killer DEBUG mode can be when

Re: using FileField.delete_file to remove unused images

2007-12-11 Thread Marty Alchin
There are several things you need to know, so I'll lay them out. 1) You can get any Field instance from a class by using the model._meta.get_field() method. Instead of your list comprehension, just use the following line: picfield = p._meta.get_field('picture') 2) If you read the comments in de

Re: Performance of a django website

2007-12-11 Thread Brian Morton
Joseph raises a good point. I only recently discovered what a performance killer DEBUG mode can be when it comes to queries. It will cause your client machine (the web server in this case) to run out of memory after a lengthy process (such as data loading). Are you profiling in DEBUG mode? On

Re: Noob question: Which Linux distribution is "best" for Django?

2007-12-11 Thread Lic. José M. Rodriguez Bacallao
I will recommend Arch, is simple and powerful. On Dec 11, 2007 1:22 PM, Joe <[EMAIL PROTECTED]> wrote: > > To make things easy, you could download VMware Server - run that on > your windows box and install the prebuilt appliances. That'd make it > easy to try out a few linux versions. VMware is fr

Re: custom ordering on related objects

2007-12-11 Thread Rajesh Dhawan
> > when I do A.objects.all() I want to sort by title. But when > B.foo_set.all() I would like to always order by A.number. > > It seems like a custom manager is the path here, but there does not > appear to be a way to define one when defining the relationship. Actually, there is. The related ma

Re: Performance of a django website

2007-12-11 Thread Joseph Heck
Definitely take that specific dynamic page and profile it - see what's happening and why its slow. That's clearly your first bottleneck to work on from the data you've provided. There's a wiki page on that very process here: http://code.djangoproject.com/wiki/ProfilingDjango and there's additiona

Re: Performance of a django website

2007-12-11 Thread Richard Coleman
Brian Morton wrote: > Are you serving static content from the same apache instance? Also, > what kind of network connectivity do you have between your web and > mysql servers? It sounds like apache might need some tuning in terms > of thread parameters. Have you enabled caching yet? Turn on th

Re: Performance of a django website

2007-12-11 Thread Brian Morton
Are you serving static content from the same apache instance? Also, what kind of network connectivity do you have between your web and mysql servers? It sounds like apache might need some tuning in terms of thread parameters. Have you enabled caching yet? Turn on the cache framework site-wide

Re: Performance of a django website

2007-12-11 Thread Eric Walstad
If you don't already use them: Firebug: http://www.getfirebug.com/ will show you how long each component of the page takes from request to response and shows you what components are returned in parallel (among other really cool features). This can help identify your bottleneck. For example, i

Re: Performance of a django website

2007-12-11 Thread Richard Coleman
Richard Coleman wrote: > Rajesh Dhawan wrote: > >>> When I stress test the dynamic part of the site, I am only getting about >>> 300 requests per second on my test setup. This is using two Dell 1950's >>> (one for web, one for mysql database). These are very powerful machines >>> (3.0ghz Xeon

Re: Performance of a django website

2007-12-11 Thread Richard Coleman
Rajesh Dhawan wrote: >> When I stress test the dynamic part of the site, I am only getting about >> 300 requests per second on my test setup. This is using two Dell 1950's >> (one for web, one for mysql database). These are very powerful machines >> (3.0ghz Xeons, 8 cores each, 16 gig of ram, 15

Re: Performance of a django website

2007-12-11 Thread Jeremy Dunck
On Dec 11, 2007 12:18 PM, Joe <[EMAIL PROTECTED]> wrote: > > I've found the largest memory hog to be the native way related tables > are setup. > > Check class definitions with related tables and edit as such: > > class ...(models.Mode): > relatedtable= models.ForeignKey(RelatedTable, core=Tru

Re: Noob question: Which Linux distribution is "best" for Django?

2007-12-11 Thread Joe
To make things easy, you could download VMware Server - run that on your windows box and install the prebuilt appliances. That'd make it easy to try out a few linux versions. VMware is free as are the appliances. I use ubuntu primarily. j On Dec 9, 9:57 am, Andreas Pfrengle <[EMAIL PROTECTED]>

Re: Performance of a django website

2007-12-11 Thread Joe
I've found the largest memory hog to be the native way related tables are setup. Check class definitions with related tables and edit as such: class ...(models.Mode): relatedtable= models.ForeignKey(RelatedTable, core=True, raw_id_admin=True) The raw_id_admin=True prevents django from pulli

Re: Performance of a django website

2007-12-11 Thread Joseph Heck
Add on to Rajesh's list - what pages are you requesting and have you profiled them to understand what's taking long? -joe On Dec 11, 2007 10:08 AM, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > > Hi Richard, > > > > > When I stress test the dynamic part of the site, I am only getting about > > 300

Re: Noob question: Which Linux distribution is "best" for Django?

2007-12-11 Thread Ramdas S
Go for Ubuntu. RS On Dec 11, 5:48 pm, Andreas Pfrengle <[EMAIL PROTECTED]> wrote: > Thanks for so many replies and the helpful links. Ubuntu really seems > to be a good solution as far as I can tell by now. I'll give it a try. > At least now I know what I will do on Christmas :-) --~--~-

Re: Performance of a django website

2007-12-11 Thread Rajesh Dhawan
Hi Richard, > > When I stress test the dynamic part of the site, I am only getting about > 300 requests per second on my test setup. This is using two Dell 1950's > (one for web, one for mysql database). These are very powerful machines > (3.0ghz Xeons, 8 cores each, 16 gig of ram, 15k SAS driv

Re: Performance of a django website

2007-12-11 Thread l5x
I think that some info about your web-server could be important. --~--~-~--~~~---~--~~ 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

Re: using FileField.delete_file to remove unused images

2007-12-11 Thread l5x
I didn't use delete_file, but if you can't solve this you can write your own code for that using signals (pre_delete or post_delete). More: http://code.djangoproject.com/wiki/Signals Anyway I'm also curious how to do that without signals. --~--~-~--~~~---~--~~ You

using FileField.delete_file to remove unused images

2007-12-11 Thread ER Yost
I am working on a project with the following: class Person(models.Model): # ... picture = models.ImageField(...) I'd like to give each Person the ability to delete images, and I'd like to remove deleted pictures from the filesystem once a person has deleted them. From what I can tell, th

Performance of a django website

2007-12-11 Thread Richard Coleman
At work, we are developing a commercial website based on Django. It's a fairly dynamic site (think social networking). I am doing the initial load testing to estimate the number of servers we will need for the production site. The production site will be load balanced using a pair of BigIP

Re: Django Application Without Source?

2007-12-11 Thread Matthew Wensing
Jython. On 12/11/07 11:08 AM, "Hugh Bien" <[EMAIL PROTECTED]> wrote: > Ttry using pyobfuscate. It works really well with python 2.3 (run it using > python 2.3 and only use it on python 2.3 compatible code). > > - Hugh > > On 12/10/07, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: >> >> try ja

Re: Django Application Without Source?

2007-12-11 Thread Hugh Bien
Ttry using pyobfuscate. It works really well with python 2.3 (run it using python 2.3 and only use it on python 2.3 compatible code). - Hugh On 12/10/07, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > > try java, or C or even BF > > On 11-Dec-07, at 10:32 AM, [EMAIL PROTECTED] wrote: > > > > >

Re: Best way to make content in templates

2007-12-11 Thread l5x
Isn't it just putting variable into template? I don't know if I understand you correctly but for example: models.py Image(models.Model) name = CharField(...) location = ImageField(...) YourModel(models.Model) image = ForeignKey(Image) user = ForeignKey(User) (...) index.html:

Best way to make content in templates

2007-12-11 Thread [EMAIL PROTECTED]
Hi folks, I am new to Django and I want to know which is the best approach to create content in templates for example: - I need to call a logo image for the website, the logo location in the system is referenced in a field of a model. I want to display the logo by getting it from the system afte

Re: Import RSS headlines from feeds into django based pages.

2007-12-11 Thread Tim Riley
http://www.feedparser.org/ On Dec 11, 2007 9:29 AM, Alessandro <[EMAIL PROTECTED]> wrote: > > I want to add in a django page some rss feeds from another websites, > like headlines from news portals. how can I do that without > javascript, java and inline frames? > > -- > Alessandro Ronchi > Sky

Import RSS headlines from feeds into django based pages.

2007-12-11 Thread Alessandro
I want to add in a django page some rss feeds from another websites, like headlines from news portals. how can I do that without javascript, java and inline frames? -- Alessandro Ronchi Skype: aronchi http://www.alessandroronchi.net - Il mio sito personale http://www.soasi.com - Sviluppo Softwar

Import RSS feeds in django pages

2007-12-11 Thread Alessandro Ronchi
I want to add in a django page some rss feeds from another websites, like headlines from news portals. how can I do that without javascript, java and inline frames? -- Alessandro Ronchi Skype: aronchi http://www.alessandroronchi.net - Il mio sito personale http://www.soasi.com - Sviluppo Softwar

Re: just starting out with django along with the tutorial - getting a type error

2007-12-11 Thread l5x
Thank you Malcolm, you are very helpful today :) --~--~-~--~~~---~--~~ 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,

Re: Noob question: Which Linux distribution is "best" for Django?

2007-12-11 Thread Andreas Pfrengle
Thanks for so many replies and the helpful links. Ubuntu really seems to be a good solution as far as I can tell by now. I'll give it a try. At least now I know what I will do on Christmas :-) --~--~-~--~~~---~--~~ You received this message because you are subscribe

Re: just starting out with django along with the tutorial - getting a type error

2007-12-11 Thread Malcolm Tredinnick
On Tue, 2007-12-11 at 04:39 -0800, l5x wrote: [...] > change it to: > > def __unicode__(self): > return smart_unicode(self.ticket_numb) You were going so well on the "good advice" front up until here... :-) A __unicode__() method if one of the few places where smart_unicode() is in

Re: creating user and profile in just one form

2007-12-11 Thread l5x
I suppose that you should also check if the username isn't already taken. --~--~-~--~~~---~--~~ 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 uns

Re: just starting out with django along with the tutorial - getting a type error

2007-12-11 Thread Ivan Levchenko
Thanks to Malcolm for helping me out, and thanks l5x for the help too! On Dec 11, 2007 2:40 PM, l5x <[EMAIL PROTECTED]> wrote: > > Oops, Malcolm answered first :) > > > > -- Best Regards, Ivan Levchenko [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received thi

Re: just starting out with django along with the tutorial - getting a type error

2007-12-11 Thread l5x
Oops, Malcolm answered first :) --~--~-~--~~~---~--~~ 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 to [E

Re: just starting out with django along with the tutorial - getting a type error

2007-12-11 Thread Ivan Levchenko
omg, i feel so dumb... =) Thats probably what i deserve for blindly following the tutorial and not thinking =) On Dec 11, 2007 2:32 PM, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > > On Tue, 2007-12-11 at 04:21 -0800, [EMAIL PROTECTED] wrote: > [...] > > > Exception Type: TypeError at /admi

Re: just starting out with django along with the tutorial - getting a type error

2007-12-11 Thread l5x
I don't know if it could help, but anyway you should: 1) add the following line at the beggining of models.py # -*- coding: utf8 -*- 2) change the order of stuff in models, at first fields: CharField etc, then classes (Admin, Meta) and methods at the end (__unicode__ etc). 3) add after 'coding'

Re: creating user and profile in just one form

2007-12-11 Thread Simone Cittadini
Joe ha scritto: > I've done this but with a manually built form. > > You can just add the extra form fields to the template, then reference > those extra fields in your view. > Yes, after trying with inline options to no result, I've resolved too in using the fields instead of the form to hav

Re: just starting out with django along with the tutorial - getting a type error

2007-12-11 Thread Malcolm Tredinnick
On Tue, 2007-12-11 at 04:21 -0800, [EMAIL PROTECTED] wrote: [...] > Exception Type: TypeError at /admin/trak/ticket/add/ > Exception Value: coercing to Unicode: need string or buffer, int found That error usually means you're trying to return something that isn't a string from a __str__ or __un

just starting out with django along with the tutorial - getting a type error

2007-12-11 Thread [EMAIL PROTECTED]
Hi All, I'm just starting out with django. I want to get familiar with it to do some inhouse development for myself. I'm following along the tutorial, but using my own data and examples - i'm trying to create a very simple request-ticket system. I have got up to the admin interface part of the tu

Re: cannot import ModelForm

2007-12-11 Thread l5x
Once again, you were right Malcolm. Python was importing the old django version, so I did: python setup.py install in the trunk and now it's working. Thank you everyone for your suggestions. Ps. I'm really happy that ModelForm exists, it's very useful. --~--~-~--~~~-

Re: parameters getting modified

2007-12-11 Thread annacoder
Hi, Thanks for the input. Its all because of my misunderstanding of how the URL is handled by apache. Apache does not allow multiple slashes in the path portion of the URL. (It seems there are some security underpinnings, which I did not understand). And there seems to be no way to turn it o