Upload to ImageField from PIL?

2008-10-13 Thread Kevin Leung
Hey everyone, Quick summary of what I'm trying to do: There are images stored in an ImageField. I need to be able to edit this image (I'm using ImageDraw from the PIL), put it into a separate ImageField in the same entry, so that it's also accessible from the front-end. I, however, am having

Re: fastCGI: always one server per site ?

2008-10-13 Thread Graham Dumpleton
On Oct 13, 8:43 pm, "Valts Mazurs" <[EMAIL PROTECTED]> wrote: > On Mon, Oct 13, 2008 at 12:15 PM, xavier dutoit <[EMAIL PROTECTED]> wrote: > > Thanks for your reply. I do already run php under fcgi (as separated > > server, as you point out). But the main difference is that this pool > > of

Re: Multiple relationships between multiple tables

2008-10-13 Thread Greg Ewing
Necmettin Begiter wrote: > At the admin page (or my template, whatever), when I select Person as > the source table, SourceIdx / SourceName should be dynamically fetched > from the Person model. If I change it to Phone, this time members of > the Phone model should be listed. This sounds like a

Re: makemessages create invalid msgid in django.po file

2008-10-13 Thread Karen Tracey
On Mon, Oct 13, 2008 at 11:07 PM, Chuck22 <[EMAIL PROTECTED]> wrote: > > Thanks, Karen. You are correct. My version is Win32 binaries of GNU > gettext-runtime 0.13.1. It seems getting the development trunck is a > better choice for me. But, I am not sure if the Django development > trunck is

Re: makemessages create invalid msgid in django.po file

2008-10-13 Thread Chuck22
Thanks, Karen. You are correct. My version is Win32 binaries of GNU gettext-runtime 0.13.1. It seems getting the development trunck is a better choice for me. But, I am not sure if the Django development trunck is stable enough to use. I will give it a try. > > You don't mention your system type

Re: Update_object and file uploads

2008-10-13 Thread Malcolm Tredinnick
On Mon, 2008-10-13 at 18:03 -0700, [EMAIL PROTECTED] wrote: > Since upgrading django (I think it's 1.0, or very close to it) I've > got a form that is no longer uploading or saving the file with > update_object. I've looked at the docs, but I'm not finding the thing > I'm missing. Since both

Re: Issue with starting a process in middleware

2008-10-13 Thread Malcolm Tredinnick
On Mon, 2008-10-13 at 21:53 +0100, Bob Cowdery wrote: > Hi all > > Just starting out on Django. I have an app that needs a long running > process. This is a python process that gets started from some code that > I kick off from __init__ in a middleware class. Is there another way to > do this?

separate users from django admin'able users

2008-10-13 Thread tvaughan
let's say i'm building and on-line sudoku game. i want two types of users. the first are those users that would play the game. and the second are those that are built-in django users who would use the django admin interface to mange the data model (create games). is the typical pattern to use

Once-only initialization of per-process resources following Django startup.

2008-10-13 Thread Lifto
Greetings Django Users, How do you control the initialization of your Django process? Do you rely exclusively on Python's module-loading to initialize your namespaces and reusable resource-connections? I would like to perform initialization of certain features in my Django project exactly once

Update_object and file uploads

2008-10-13 Thread [EMAIL PROTECTED]
Since upgrading django (I think it's 1.0, or very close to it) I've got a form that is no longer uploading or saving the file with update_object. I've looked at the docs, but I'm not finding the thing I'm missing. --~--~-~--~~~---~--~~ You received this message

Re: Streaming Video

2008-10-13 Thread Dan Ellis
There isn't really anything Django-specific here, although there might be helper apps. But take a look at FlowPlayer, which is a free, customisable Flash video player (I think it plays both FLV and H.264). For converting videos, ffmpeg is the thing, and a quick Google suggests there are at least

Formset - How to avoid required field errors in extra forms

2008-10-13 Thread Federico H
Hi, I'm using a formset with hidden fields in the forms and other required fields. Those fields need to be initialized with some value. When I try to validate the formset I get "required field" errors for those other required fields. The formset apparently thinks that the extraform is half filled

Python/Django Developer at NASA Ames

2008-10-13 Thread Matt Hancher
Hi everyone, I wanted to forward this along to see if any of you might be interested in applying. It's a new position opening up for a Django developer to work at the NASA Ames Research Center, NASA's silicon valley research center. Full info, including the person to contact with your resume

Re: Virtual Methods?

2008-10-13 Thread DrMeers
Thank you Daniel (and James) for your prompt responses. At least now I know I wasn't missing something obvious. Your comment about storing the type in each object sparked an idea: from django.contrib.contenttypes.models import ContentType # very handy that Django stores this information... #...

Re: passing data with urls.py

2008-10-13 Thread bruno desthuilliers
On 13 oct, 23:14, KillaBee <[EMAIL PROTECTED]> wrote: (snip) > > I creted the url strucure like I want it ,and the user was add to the > url. Nope. The user *id*. > How can I just display it on a page. I was thinking that I was > not login in cerrectlly, but only on the login can I use the

Re: Building Django web application

2008-10-13 Thread Daniel
and of course, a save() on the model would be necessary: class ClientModel(models.Model): """ An abstract base class model that provides a link to client table """ client = Client() def save(self): client = super(ClientModel, self).save() class Meta:

Re: Building Django web application

2008-10-13 Thread Daniel
Would it not be possible to create a base model and model manager that specifies a client, and override the default django.db.models.Model and django.db.models.Manager classes? Something like this: class Client(models.Model): client_name = models.CharField(max_length=64) # etc... class

Re: Counts for related tags via custom manager?

2008-10-13 Thread Parand Darugar
Answering my question: I used Simon's "jQuery style chaining with the Django ORM" method: http://simonwillison.net/2008/May/1/orm/ In my Tag model I created a QuerySet with a get_counts method, grabbed the queryset values via "values = self.values()", constructed my SQL, and injected the

Re: filter on doubly-spanned relationship failing

2008-10-13 Thread Cortland Klein
Never mind; I was clashing variables. Thanks, #django IRC! On Oct 13, 12:05 pm, Cortland Klein <[EMAIL PROTECTED]> wrote: > In one of my views, I've got an answers =   > Answer > .objects > .select_related > (depth=2).filter(question__promotion__slug__exact=promotion) . > > Answer has a

Re: Custom form/formset for edit inline

2008-10-13 Thread Emil
Hi, thanks for replying, but I tried that at first, expecting to be able to do that on the inline, but I couldn't get it working. It was a little while back, so I'm not sure I remember correctly, but I think I got some sort of AlreadyRegistered error (might be wrong about that though). Also,

Re: passing data with urls.py

2008-10-13 Thread KillaBee
On Oct 13, 2:39 pm, bruno desthuilliers <[EMAIL PROTECTED]> wrote: > On 13 oct, 20:13, KillaBee <[EMAIL PROTECTED]> > wrote: > > > > > I am want in to pass the user and a date, using the url.  Like the > > polls urls > > (r'^(?P\d+)/$', 'intranet.timesheets.views.detail'), > > > I tried these,

Re: contrib admin and admindocs problem

2008-10-13 Thread Michael Graz
Yes, my original analysis was wrong. The problem was due to a non-existing function specified as url handler. Thanks, -Mike On Sun, Oct 12, 2008 at 11:58 AM, James Bennett <[EMAIL PROTECTED]>wrote: > > On Sun, Oct 12, 2008 at 5:51 AM, Nash <[EMAIL PROTECTED]> wrote: > > I get this error, you

Re: adding date to template

2008-10-13 Thread KillaBee
On Oct 7, 2:02 pm, KillaBee <[EMAIL PROTECTED]> wrote: > On Oct 7, 1:49 pm,KillaBee<[EMAIL PROTECTED]> > wrote: > > > > > On Oct 6, 4:44 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > > > > On Mon, Oct 6, 2008 at 4:55 PM,KillaBee< > > > > [EMAIL PROTECTED]> wrote: > > > > Thanks I have read

Re: django-jython-postgres driver

2008-10-13 Thread David Durham, Jr.
On 10/13/08, dusans <[EMAIL PROTECTED]> wrote: > I have writen a Test.java with: > Class.forName("org.postgresql.Driver"); > > It works, so that means it should work. > > But jython tells me: DatabaseError: driver [org.postgresql.Driver] not > found > > What am i doing wrong > I have been

Issue with starting a process in middleware

2008-10-13 Thread Bob Cowdery
Hi all Just starting out on Django. I have an app that needs a long running process. This is a python process that gets started from some code that I kick off from __init__ in a middleware class. Is there another way to do this? I just use subprocess.Popen() to start the other process.

Counts for related tags via custom manager?

2008-10-13 Thread Parand Darugar
Hello, I'd like to get occurrence counts for my tags. I have Item and Tag models, where Item has: tags = models.ManyToManyField(Tag) I'd like to build a query set of tags (eg. Tag.objects.filter(user=someuser) ), then get the occurrence count. The sql would be: select tag_id, count(*) from

Re: Best practice to build a multilingual site

2008-10-13 Thread Adrián Ribao
I have the same question as you. Translation of dynamic content is not a feature for Django 1.1. I wonder if I can insert this feature in the wiki. I'd like to know the best approach for translating some fields of a model to different languages. Thank you. On 13 oct, 17:48, "Alex Rades"

Re: Best practice to build a multilingual site

2008-10-13 Thread Anderson Santos
I was using i18ndynamic (http://djangoplugables.com/projects/ i18ndynamic/) for a website, on our new project I prefered not to use afraid of performance issues. We are going to achieve something like Cortland said, but we're still analyzing the possibilities. The main issue is an easy to use

Re: sending a context to a template by calling a function with parameters.

2008-10-13 Thread [EMAIL PROTECTED]
Thanks! great advice. I am going to try to pass the data from the view. On Oct 13, 2:56 pm, bruno desthuilliers <[EMAIL PROTECTED]> wrote: > On 13 oct, 20:59, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > Hello, > > > I want to return a context of data to the template > > I assume you

Add custom filter in ChangeList admin page

2008-10-13 Thread Anderson Santos
Hello everyone I was looking for a documentation on how to create a new filter in ChangeList admin but no luck for an official documentation. I want to add personalized filters to some models, for example, filter only active records (which is not the default manager) and have some special

Streaming Video

2008-10-13 Thread Adam Schmitz
Does anyone know of any Django Apps that you can plug into your site to stream video content like YouTube (but the video file is hosted yourself, not by YouTube)? -- Adam "Do one thing, and do it well." -- The UNIX Philosophy --~--~-~--~~~---~--~~ You

Re: sending a context to a template by calling a function with parameters.

2008-10-13 Thread bruno desthuilliers
On 13 oct, 20:59, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hello, > > I want to return a context of data to the template I assume you mean "pass", not "return". > that contains > information in the models. I want to pass in variables that dictate > what is returned. > > Example: >

Re: Model Inheritance and save

2008-10-13 Thread sanrioyt
Hi, Sorry for not checking it further. I think the problem was on my end. It actually does work. Thanks, sanrio On Oct 13, 10:26 am, meppum <[EMAIL PROTECTED]> wrote: > What do you mean "this did not work"? did you get an error? or did the > logic in model a's save not run? > > On Oct 13,

Re: Which IDE do you choose with django?

2008-10-13 Thread Adam Schmitz
I've just started using "Eric" for linux. It seems to work well so far. Code completion, auto-indent. Still have to use it more before I make an official opinion of it, but so far looks good. Also, I've just starting using Python/Django. My background is in Visual Studio so if anyone can

Re: passing data with urls.py

2008-10-13 Thread bruno desthuilliers
On 13 oct, 20:13, KillaBee <[EMAIL PROTECTED]> wrote: > I am want in to pass the user and a date, using the url. Like the > polls urls > (r'^(?P\d+)/$', 'intranet.timesheets.views.detail'), > > I tried these, but I am missing a piece: > urlpatterns = patterns('', > (r'^timesheet/(?P)/$', >

Re: Which IDE do you choose with django?

2008-10-13 Thread Abdel Bolanos Martinez
Eclipse + Pydev + Aptana + SVN = Very good IDE On Mon, 2008-10-13 at 11:09 -0700, Django users wrote: > Geany, small, lighweight, fast, and also supports http, javascript, > etc > Supports plugins and has basic svn support > http://www.geany.org/ > > On Oct 12, 12:19 pm, zjffdu <[EMAIL

Re: passing data with urls.py

2008-10-13 Thread KillaBee
On Oct 13, 1:53 pm, Tim Chase <[EMAIL PROTECTED]> wrote: > > I tried these, but I am missing a piece: > > urlpatterns = patterns('', > >     (r'^timesheet/(?P)/$', > > 'intranet.timesheets.views.times'), > >     (r'^timesheet/(?P\d{20})/$', > > 'intranet.timesheets.views.times'), > >    

Re: Best practice to build a multilingual site

2008-10-13 Thread Cortland Klein
It depends on if a particular News is shared across languages, or if each language has its own news. For me, one of my projects has translations of objects where each object should have all translations. Thus, I have something like a News and then NewsTranslations with ForeignKey back to

filter on doubly-spanned relationship failing

2008-10-13 Thread Cortland Klein
In one of my views, I've got an answers = Answer .objects .select_related (depth=2).filter(question__promotion__slug__exact=promotion) . Answer has a ForeignKey to Question, which in turn has a ForeignKey to Promotion, which has a SlugField. When I run this query from the shell and call

sending a context to a template by calling a function with parameters.

2008-10-13 Thread [EMAIL PROTECTED]
Hello, I want to return a context of data to the template that contains information in the models. I want to pass in variables that dictate what is returned. Example: author1.get_books_published_after Then it grabs all the data via a method in the model and returns it. Should I instead use

Re: Building Django web application

2008-10-13 Thread Mitch Guthrie
I've decided to push forward with the project using Django with separate client instances. It will keep my development overhead low and allow me to better focus on the application. I appreciate all the great feedback. This has definitely clarified a lot for me. -MG On Sun, Oct 12, 2008 at

Re: Execute function after Add in admin site

2008-10-13 Thread bruno desthuilliers
On 13 oct, 18:11, Joe Sr <[EMAIL PROTECTED]> wrote: > I am working on an "Issues" application and I want to execute code to > send an e-mail to an assignee after an issue has been added. I saw > that there are signals I can intercept for pre- and post-save, but how > could I only limit to insert

Re: passing data with urls.py

2008-10-13 Thread Tim Chase
> I tried these, but I am missing a piece: > urlpatterns = patterns('', > (r'^timesheet/(?P)/$', > 'intranet.timesheets.views.times'), > (r'^timesheet/(?P\d{20})/$', > 'intranet.timesheets.views.times'), > (r'^timesheet/(?P\d{20})/(?P\d{10})/$', > 'intranet.timesheets.views.times'), >

Django Application for performing Model Searches

2008-10-13 Thread SnappyDjangoUser
Hi, Is anyone aware of a django utility that has already been developed to search model fields? I have found djangosearch and django-search in the google code projects, but it appears that these only support basic text search. They do not support searching boolean fields, date fields, etc

Re: order of apps in the admin panel

2008-10-13 Thread Eric
Quoted from the very bottom of Tutorial 2: """Customize the admin index page On a similar note, you might want to customize the look and feel of the Django admin index page. By default, it displays all the apps in INSTALLED_APPS that have been registered with the admin application, in

passing data with urls.py

2008-10-13 Thread KillaBee
I am want in to pass the user and a date, using the url. Like the polls urls (r'^(?P\d+)/$', 'intranet.timesheets.views.detail'), I tried these, but I am missing a piece: urlpatterns = patterns('', (r'^timesheet/(?P)/$', 'intranet.timesheets.views.times'), (r'^timesheet/(?P\d{20})/$',

Re: Which IDE do you choose with django?

2008-10-13 Thread Django users
Geany, small, lighweight, fast, and also supports http, javascript, etc Supports plugins and has basic svn support http://www.geany.org/ On Oct 12, 12:19 pm, zjffdu <[EMAIL PROTECTED]> wrote: > I am a newbie of django, and want to know which IDE is suit for > django? > > thank your

Execute function after Add in admin site

2008-10-13 Thread Joe Sr
I am working on an "Issues" application and I want to execute code to send an e-mail to an assignee after an issue has been added. I saw that there are signals I can intercept for pre- and post-save, but how could I only limit to insert and not update events?

Re: Best practice to build a multilingual site

2008-10-13 Thread Erik Allik
I'd add a "lang" field to News and retrieve news based on whether the URL starts with /en/, /sp/ ,/ru/ etc. Erik On 13.10.2008, at 18:48, Alex Rades wrote: > > Hi, > if we have a model like: > > class News(models.Model): >title = models.CharField(..) >content = models.TextField(...)

Best practice to build a multilingual site

2008-10-13 Thread Alex Rades
Hi, if we have a model like: class News(models.Model): title = models.CharField(..) content = models.TextField(...) Imagine i want to work with different language (this means adding multilingual content via admin and retrieving it from views/templates) What is the best way to develop

Re: Model Inheritance and save

2008-10-13 Thread sanrioyt
Can anyone help? Thanks, sanrio On Oct 10, 11:30 am, [EMAIL PROTECTED] wrote: > Hi, > > How does the save work, if you have a base abstract class that has > save, and the parent class has save? > > For example: > > Model A: >save(self): > super(A, self).save() > >class Meta: >

Re: Best Practices in Implementing Mini-Content Boxes Across the Site

2008-10-13 Thread bruno desthuilliers
On 13 oct, 10:38, raeldc <[EMAIL PROTECTED]> wrote: (snip) > One of the things I'm wondering about is how to implement mini-content > boxes. It is known to Joomla as modules, in Drupal as blocks, to > others they are called widgets or side bars. In CMS systems, I can > assign a content-box to be

order of apps in the admin panel

2008-10-13 Thread Vokial
Hello! Is there a way to change the order of the applications shown in the admin page? If i'm not wrong it used to be the order in which the applications were written in the INSTALLED_APPS but now it seems to follow the alphabetic order.. I'd like to give an arbitrary order, if it's possible...

how to integrate FCKeditor

2008-10-13 Thread webcomm
I would like to integrate a WYSIWYG editor with my site, preferably FCKeditor. I found a relevant thread at... http://groups.google.com/group/django-users/browse_thread/thread/163c06f2a22bbe1e/07686be7a0656429?lnk=gst=fck#07686be7a0656429 ...but I need more information. I followed the link

Re: related_name in filter search

2008-10-13 Thread Karen Tracey
On Mon, Oct 13, 2008 at 4:22 AM, Alessandro Ronchi < [EMAIL PROTECTED]> wrote: > 2008/10/11 Karen Tracey <[EMAIL PROTECTED]>: > > > You've got a typo in there somewhere, because there is no 'notizie' in > the > > query you posted, you've got 'schede' like above. So I'm not sure > exactly > >

Re: How to detect changes in a model's fields before save() ?

2008-10-13 Thread bruno desthuilliers
On 13 oct, 15:35, zhango <[EMAIL PROTECTED]> wrote: > Bruno - yes, your solution is even better as it avoids a database > lookup. Yeps, that's mostly the point. But beware : it's not *fully* tested. IOW : it _should_ work but you'd better test it more carefully than I did !-)

Re: makemessages create invalid msgid in django.po file

2008-10-13 Thread Karen Tracey
On Mon, Oct 13, 2008 at 12:37 AM, Chuck Bai2 <[EMAIL PROTECTED]> wrote: > > The base language of my site is Chinese. I want to change to English > when user select language perferrence. > > In my base.html, I have > {% trans "产品" %} > > I generated django.po file using > django-admin.py

allowing users to create and edit content types without editing model classes

2008-10-13 Thread webcomm
I've been playing with django in recent weeks and have been impressed, but there is one publishing/programming problem I'm not sure how I would handle with django. I'm thinking of a site where dozens of different users need to frequently create and edit content types. I have in mind a site

Re: How to detect changes in a model's fields before save() ?

2008-10-13 Thread zhango
Bruno - yes, your solution is even better as it avoids a database lookup. Thank you! On Oct 12, 4:06 pm, bruno desthuilliers <[EMAIL PROTECTED]> wrote: > On 11 oct, 02:59, zhango <[EMAIL PROTECTED]> wrote: > > > I'm overriding a model's save() method, and I want to detect changes > > in values

Re: How to detect changes in a model's fields before save() ?

2008-10-13 Thread zhango
Thanks Donn, for the suggestion, but I'm actually not getting the data via a form, I'm using the ORM in a long-running script. I've figured out one way to do this: in overriding the save() method, the self instance passed in has the new values; simply use self.id to retrieve the prior version,

Re: Virtual Methods?

2008-10-13 Thread James Bennett
On Mon, Oct 13, 2008 at 6:16 AM, DrMeers <[EMAIL PROTECTED]> wrote: > I am writing a Blog-style django site which needs to render a > collection of Item objects. Item is the root Super class for a whole > bunch of sub-classes -- Photo, Video, Quote, News, etc. I want to be > able to iterate

Re: Virtual Methods?

2008-10-13 Thread Daniel Roseman
On Oct 13, 12:16 pm, DrMeers <[EMAIL PROTECTED]> wrote: > I am writing a Blog-style django site which needs to render a > collection of Item objects. Item is the root Super class for a whole > bunch of sub-classes -- Photo, Video, Quote, News, etc. I want to be > able to iterate through

Re: Multiple relationships between multiple tables

2008-10-13 Thread Necmettin Begiter
On Mon, Oct 13, 2008 at 16:15, Christian Joergensen <[EMAIL PROTECTED]> wrote: > > Necmettin Begiter wrote: > > Hello all, > > > > I have, say, 8 tables: Persons, works, phones, emails, addresses, > > eaddresses, articles, books. > > > > Each one may have relationship with another one, like so: >

Re: fastCGI: always one server per site ?

2008-10-13 Thread Robin Becker
Valts Mazurs wrote: ... > > Any reason you went for processes rather than thread ? > > Robust, stable, no issues with GIL. > .. We run flup+apache+django with many hosts and only had problems when trying to run threaded. We are running different virtual machines into the same

Re: Multiple relationships between multiple tables

2008-10-13 Thread Christian Joergensen
Necmettin Begiter wrote: > Hello all, > > I have, say, 8 tables: Persons, works, phones, emails, addresses, > eaddresses, articles, books. > > Each one may have relationship with another one, like so: > > A person may have more than one work, phone, email, address, eaddress, > article and

Virtual Methods?

2008-10-13 Thread DrMeers
I am writing a Blog-style django site which needs to render a collection of Item objects. Item is the root Super class for a whole bunch of sub-classes -- Photo, Video, Quote, News, etc. I want to be able to iterate through Item.objects.all() and ask each Item to render() itself based on which

Re: static html

2008-10-13 Thread Peter Herndon
On Mon, Oct 13, 2008 at 8:36 AM, Alfredo Alessandrini <[EMAIL PROTECTED]> wrote: > > ok...it's work. > > but If I want customize the url by url.py? > > > Alfredo > If you really want to customize the URL with urls.py, then go ahead. But for URL customization with Apache, use mod_rewrite. It may

Re: fastCGI: always one server per site ?

2008-10-13 Thread Valts Mazurs
On Mon, Oct 13, 2008 at 3:33 PM, xavier dutoit <[EMAIL PROTECTED]> wrote: > > And on your config, you got each fastcgi running under a different > user too ? > I don't really need it but it is trivial with use of sudo. I use sudo to run all fcgi processes as the same user. If I would be less

Multiple relationships between multiple tables

2008-10-13 Thread Necmettin Begiter
Hello all, I have, say, 8 tables: Persons, works, phones, emails, addresses, eaddresses, articles, books. Each one may have relationship with another one, like so: A person may have more than one work, phone, email, address, eaddress, article and book. A phone, email, address, eaddress, .. may

Re: static html

2008-10-13 Thread Alfredo Alessandrini
ok...it's work. but If I want customize the url by url.py? Alfredo 2008/10/13 Daniel Roseman <[EMAIL PROTECTED]>: > > On Oct 13, 12:12 pm, "Alfredo Alessandrini" <[EMAIL PROTECTED]> > wrote: >> > First of all, why don't you just point the browser at the URL of the >> > commands.html file in

django-jython-postgres driver

2008-10-13 Thread dusans
I have 1. django 2. jython 3. doj.backends.zxjdbc.postgresql 4. ...\jre1.6.0_07\lib\ext\postgresql-8.3-603.jdbc4.jar I have writen a Test.java with: Class.forName("org.postgresql.Driver"); It works, so that means it should work. But jython tells me: DatabaseError: driver

Re: fastCGI: always one server per site ?

2008-10-13 Thread xavier dutoit
> I am afraid that single pool of fcgi resources is not currently possible for > multiple django sites. Maybe it would be possible if someone wrote a > specific script/wrapper for Django but, I guess, it would create more risks > (think about thread safety) than benefits. And on your config, you

Re: static html

2008-10-13 Thread Daniel Roseman
On Oct 13, 12:12 pm, "Alfredo Alessandrini" <[EMAIL PROTECTED]> wrote: > > First of all, why don't you just point the browser at the URL of the > > commands.html file in the first place? > > at the URL? > > In urls.py? > > Alfredo No, nothing to do with Django at all. If it's a static HTML

Re: static html

2008-10-13 Thread Alfredo Alessandrini
> First of all, why don't you just point the browser at the URL of the > commands.html file in the first place? at the URL? In urls.py? Alfredo >> 2008/10/8 Alfredo Alessandrini <[EMAIL PROTECTED]>: >>> Hi, >>> >>> I'm trying to show a static html page... >>> >>> The html page is in the

Re: Custom form/formset for edit inline

2008-10-13 Thread gearheart
hi, fieldsets is not a form's attribute you should put them in ImageInline V. On Oct 12, 10:27 pm, Emil <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to figure out how to use a custom form for when editing > objects inline in the admin. The case is something like this: > I have Images that

Re: 404 not found for media files

2008-10-13 Thread huw_at1
Hi Erik, Ok this did something now. Instead of a 404 page not found on server message I am getting a "403 Forbidden" "You don't have permission to access /media/test.js" on this server. I have checked my file and directory permissions which all seem fine all the way thorugh /var/www/

Re: 404 not found for media files

2008-10-13 Thread Erik Allik
Just use RequestContext instead of Context when passing context to templates to be rendered. Like: return render_to_response("my_app/my_template.html", {"some_var": "foo"}, context_instance=RequestContext(request)) or: return

Re: 404 not found for media files

2008-10-13 Thread huw_at1
Hi Erik, Many thanks for your reply. This is somewhat more complicate dthan I had hoped. Does this mean I am going about this the wrong way and that there is a simpler way? If not then is Alias a command I use from within the apache conf file? Also how do I check if I have the request context

Re: Highlight current active page

2008-10-13 Thread Alex Rades
Hi Gerard, sorry but I don't understand your setup. Could you show us some sample code which does the actual navigation list? Thank you very much for your time On Tue, Sep 30, 2008 at 1:53 PM, Gerard Petersen <[EMAIL PROTECTED]> wrote: > > Hi All, > > I don't understand why it's needs to be so

Re: PostgreSQL with Psycopg2

2008-10-13 Thread leonel
Gaus wrote: > Hi All > I am developing my first-Django based project by myself. Wanted to use > Postgresql with Psycopg2 & dont want to use Sqlite or Mysql for that > matter. I have a problem which I cant rectify. My development > environment is as follows : > > 1. Ubuntu 8.04 > 2. Python2.5 -

Re: Which IDE do you choose with django?

2008-10-13 Thread mrsource
I'm using eclipse because I also work on JAVA and I didn't want to learn another editor for python. Are Komodo or Eric 4 able to hot replace code in the debug mode? Pydev can't do that. On 12 Ott, 23:22, "Rob Sutherland" <[EMAIL PROTECTED]> wrote: > On Sun, Oct 12, 2008 at 3:01 PM, Tim Chase > >

Re: Best Practices in Implementing Mini-Content Boxes Across the Site

2008-10-13 Thread raeldc
Daniel, thank you so much! Your answer opened a whole box of new ideas I'd like to try. Thanks everyone! Rael On Oct 13, 5:19 pm, Daniel Roseman <[EMAIL PROTECTED]> wrote: > On Oct 13, 9:38 am, raeldc <[EMAIL PROTECTED]> wrote: > > > > > Hi Guys, > > > I'm a Programmer coming from a Joomla! CMS

Re: 404 not found for media files

2008-10-13 Thread Erik Allik
First of all, you should set MEDIA_URL to '/media/' and Alias /media as /var/www/django_projects/proj_name/media/ or use mod_rewrite. Then you should instead request for {{ MEDIA_URL }}test.js not the hardcoded /media/test.js. This requires that you have request context processor

Re: fastCGI: always one server per site ?

2008-10-13 Thread Valts Mazurs
On Mon, Oct 13, 2008 at 12:15 PM, xavier dutoit <[EMAIL PROTECTED]> wrote: > Thanks for your reply. I do already run php under fcgi (as separated > server, as you point out). But the main difference is that this pool > of fcgi php processes (or thread, not sure) are available to all the > sites

Re: How can I check which view is being called in response to a specific Url?

2008-10-13 Thread David Reynolds
On 12 Oct 2008, at 7:38 pm, shabda wrote: > One of my views is returning a Http404, and I think it is calling a > view function diffrent from what I am expecting to be called. > > So How can I check which view is being called in response to a > specific Url? The X-View header as set by the

404 not found for media files

2008-10-13 Thread huw_at1
Hi there. I have a website running out of django on my apache/ mod_python web server. When trying to link javascript to my templates such as:

Re: Which IDE do you choose with django?

2008-10-13 Thread Cubells
En/na zjffdu ha escrit: > I am a newbie of django, and want to know which IDE is suit for > django? > vim is a good option... Cheers, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Best Practices in Implementing Mini-Content Boxes Across the Site

2008-10-13 Thread Daniel Roseman
On Oct 13, 9:38 am, raeldc <[EMAIL PROTECTED]> wrote: > Hi Guys, > > I'm a Programmer coming from a Joomla! CMS background ( I develop > Joomla extensions). I took notice of Django when I'm looking for other > alternatives to build mission critical Web Apps, because it's clear to > me that Joomla

Re: fastCGI: always one server per site ?

2008-10-13 Thread xavier dutoit
Hi, > FastCGI works a little bit different than mod_python. FastCGI server is a > separate process from web server. You can have multiple FastCGI servers and > one web server that communicates to FastCGI servers. Use virtual hosts or > whatever else settings in web server configuration to route

Re: Best Practices in Implementing Mini-Content Boxes Across the Site

2008-10-13 Thread Olivier François
> One of the things I'm wondering about is how to implement mini-content > boxes. It is known to Joomla as modules, in Drupal as blocks, to > others they are called widgets or side bars. In pure Django, you would have to write a "template tag", see the doc for this. It's Django's equivalent for

Re: Best Practices in Implementing Mini-Content Boxes Across the Site

2008-10-13 Thread Ronny Haryanto
On Mon, Oct 13, 2008 at 3:38 PM, raeldc <[EMAIL PROTECTED]> wrote: > One of the things I'm wondering about is how to implement mini-content > boxes. It is known to Joomla as modules, in Drupal as blocks, to > others they are called widgets or side bars. In CMS systems, I can > assign a

Re: Oracle DateTime SQL error

2008-10-13 Thread dusans
Tnx works! On Oct 10, 11:38 pm, Ian <[EMAIL PROTECTED]> wrote: > On Oct 10, 1:08 am, dusans <[EMAIL PROTECTED]> wrote: > > > > > > > Im getting this error when updating or inserting a row with a DateTime > > Field. Did i do something wrong or is it a bug? Same error in admin > > console also. >

Re: PostgreSQL with Psycopg2

2008-10-13 Thread Antoni Aloy
2008/10/13 Gaus <[EMAIL PROTECTED]> > > Hi All > I am developing my first-Django based project by myself. Wanted to use > Postgresql with Psycopg2 & dont want to use Sqlite or Mysql for that > matter. I have a problem which I cant rectify. My development > environment is as follows : > > 1.

Re: Which IDE do you choose with django?

2008-10-13 Thread dusans
Pyscripter; best python interpreter, autocompletion, django debugging... On Oct 12, 6:19 pm, zjffdu <[EMAIL PROTECTED]> wrote: > I am a newbie of django, and want to know which IDE is suit for > django? > > thank your --~--~-~--~~~---~--~~ You received this

Best Practices in Implementing Mini-Content Boxes Across the Site

2008-10-13 Thread raeldc
Hi Guys, I'm a Programmer coming from a Joomla! CMS background ( I develop Joomla extensions). I took notice of Django when I'm looking for other alternatives to build mission critical Web Apps, because it's clear to me that Joomla and PHP will not be enough to do the job. I'm now learning

Re: fastCGI: always one server per site ?

2008-10-13 Thread Valts Mazurs
Hello, FastCGI works a little bit different than mod_python. FastCGI server is a separate process from web server. You can have multiple FastCGI servers and one web server that communicates to FastCGI servers. Use virtual hosts or whatever else settings in web server configuration to route

fastCGI: always one server per site ?

2008-10-13 Thread xavier dutoit
Hi, My goal is to run django on prod with a lighttpd server, and I'm trying to compare it with the mod_python on apache. On all the examples I've seen, there is one fastcgi server per site. However and if I understand it properly with apache, you simply set a handful of env variables, and all

Re: related_name in filter search

2008-10-13 Thread Alessandro
2008/10/11 Karen Tracey <[EMAIL PROTECTED]>: > You've got a typo in there somewhere, because there is no 'notizie' in the > query you posted, you've got 'schede' like above. So I'm not sure exactly > what you tried nor exactly what error you got. Cut and paste of code and > error messages is

Re: related_name in filter search

2008-10-13 Thread Alessandro Ronchi
2008/10/11 Karen Tracey <[EMAIL PROTECTED]>: > You've got a typo in there somewhere, because there is no 'notizie' in the > query you posted, you've got 'schede' like above. So I'm not sure exactly > what you tried nor exactly what error you got. Cut and paste of code and > error messages is

Re: Blank and null values for a foreign key

2008-10-13 Thread Fabio Natali
Thanks to Gerard and Karen for their kind and precious help. Karen Tracey wrote: [...] > The inability to sort blank=True,null=True ForeignKey columns has > been fixed (post 1.0): I switched to trunk and now everythink is fine! I'm veeery happy this sorting issue has been fixed. All the best

  1   2   >