'module' object has no attribute 'handler404'

2007-03-20 Thread akonsu
hello, i have no handler404 defined in my application, so when a 404 is raised the server returns internal server error and an error message saying 'module' object has no attribute 'handler404' is written in to the log. how to make it use the default 404 view? i am running the current version fr

Re: 'module' object has no attribute 'handler404'

2007-03-21 Thread akonsu
Scott, thanks for your reply. the error that i am getting seems to indicate that it is not 404.html that is the problem. it cannot find the handler itself, not the template. and i do have this template, but it does not help :-) konstantin On Mar 21, 6:46 am, "ScottB" <[EMAIL PROTECTED]> wrote:

Re: 'module' object has no attribute 'handler404'

2007-03-21 Thread akonsu
this helped. thanks. i was not importing the default handler. konstantin > > Make sure the module referred to by ROOT_URLCONF has defined 'handler404'. > > This is typically provided via > " > from django.conf.urls.defaults import * > " in the URLConf because urls.defaults.py includes this: > ha

Re: Handling a page with multiple areas

2007-03-21 Thread akonsu
hello, unless i misunderstood the question, you need to maintain some state across multiple requests. if so, this is what the database is for. :-) make a model that has your "marked" flag. konstantin On Mar 21, 11:36 am, "MattW" <[EMAIL PROTECTED]> wrote: > Dear All, > > More of a design questi

Re: Always repeating myself in templates

2007-03-22 Thread akonsu
hello, thanks for posting. te way i do it is by creating a variable: {% let email = company.contact.email %} after that you can use email variable just like any other. konstantin class LetNode(Node) : def __init__(self, var, expr) : self.var, self.expr = var, expr def render

permission denied from development server

2007-03-29 Thread akonsu
hello, i am running development server from a windows command line and when i navigate to localhost:8000 i get Permission denied: / i do not even know where to start debugging. "manage.py syncdb" works fine, so it is not because of my setup or anything like that. i think. thanks konstantin -

Re: Left Joins / Inheritance / Plugins ...whatever...

2007-03-30 Thread akonsu
hello, I myself hink that your solution with foreign keys is good. the fact that django requires raw sql to handle left joins is its limitation but not that of your design. another solution that comes to mind is to have a table of generic "attributes" for each patron. this way you will have two

Re: Using field choices in a template...

2007-03-31 Thread akonsu
hello, you will have to write code for that. i think django does not have this functionality. konstantin On Mar 31, 8:09 pm, "mediumgrade" <[EMAIL PROTECTED]> wrote: > I have a model with charfield's with choices attached to them. In my > templates, however, I would like to be able to display

media urls in templates

2007-04-04 Thread akonsu
hello, i need a way to emit media url in a template. something similar to the {% url %} tag but for media. curently django site itself is in violation of the DRY principle: http://code.djangoproject.com/browser/djangoproject.com/django_website/templates/base.html (line 18 for example) i guess i

Re: Accessing custom model methods from template

2007-04-04 Thread akonsu
hello, {{item.image}} is correct. konstantin On Apr 4, 2:15 pm, "James Earl" <[EMAIL PROTECTED]> wrote: > Hi, > > I'm pretty new to python and django. I have a list of items that I'm > displaying, and each item can have zero, one or many images. I want > to display the first image if one exis

Re: Templates inheritance and the passing of variables

2007-04-04 Thread akonsu
hello, {{block.super}} renders the block contents of the parent, but this might not be enough for what you want. konstantin On Apr 4, 8:05 pm, "Roboto" <[EMAIL PROTECTED]> wrote: > Hey guys, just a quick question here: > > I have a base template called base.html. Essentially all it holds are >

django-tagging and admin pages

2007-05-11 Thread akonsu
hello, i have a question related to the http://code.google.com/p/django-tagging/ code and how to use it in the admin pages. hopefully someone can help me. the problem is that the module documentation sugests that i use a text field in my model to implement tags: class Link(models.Model):

Re: django-tagging and admin pages

2007-05-11 Thread akonsu
thanks for your response. the tags_list field that you propose is an extra field that is stored in the database. i want to avoid this because tags are stored in their own tables and this field is only used for conveniency. the contents of this field is not needed at all and it goes out of sync wi

Re: django-tagging and admin pages

2007-05-11 Thread akonsu
, "James Bennett" <[EMAIL PROTECTED]> wrote: > On 5/11/07, akonsu <[EMAIL PROTECTED]> wrote: > > > the tags_list field that you propose is an extra field that is stored > > in the database. i want to avoid this because tags are stored in their > > own table

Re: Reverse URL resolver fails with a literal dot

2007-05-24 Thread akonsu
hello, i would say that yes it is a bug. i have seen many bugs in the reverse resolver code. for example, it crashes (throws a python exception) if a regex pattern contains question marks (optional elements) and i am sure it has a lot more. my personal opinoin is that this code is simply a hack.

Re: Reverse URL resolver fails with a literal dot

2007-05-25 Thread akonsu
yes, it is an innovative feature. i think it is difficult to implement right. the general problem in my understanding is to be able to generate a regex that accepts a (partial) input string. then, to compare the generated regex with the list in the urls module. this involves programming language t

No module named managers

2007-06-03 Thread akonsu
hello, i have just synched to the latest trunk and my application has stopped working: ViewDoesNotExist at / Could not import mysite.ko.views. Error was: No module named managers Request Method: GET Request URL: http://localhost:8000/ Exception Type: ViewDoesNotExist Exception Value: Could not i

Re: No module named managers

2007-06-03 Thread akonsu
hello, this problem repro's even on an empty application freshly created using manage.py. i do think that someone forgot to add a file to the repository. konstantin On Jun 3, 9:32 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On 6/4/07, akonsu &

how to link to previous and next objects in object_detail view ?

2007-09-15 Thread akonsu
hello, in my object_detail view i need to emit links to the previous and next objects in the object list which invoked this detail view. has anyone done this? any advice? thanks konstantin --~--~-~--~~~---~--~~ You received this message because you are subscribe

Re: how to link to previous and next objects in object_detail view ?

2007-09-15 Thread akonsu
one by pk I would probably do: > model.objects.filter(pk > current_model_instance_id).order_by(id)[:1] > which should be the next object in the db, by id ascending > for the previous one I would do the same just with the order_by(-id) > > Like I said, never done it but I'd giv

Re: how to link to previous and next objects in object_detail view ?

2007-09-15 Thread akonsu
his is my understanding of the problem: there are two genric views: list view and detail view. the template invoked from the former gets the queryset in the context, and the template invoked from the latter gets the object in the context. note that the latter does not get the queryset, just a sin

Re: how to link to previous and next objects in object_detail view ?

2007-09-15 Thread akonsu
rote: > are you using django Generic Views or are you using the word to imply > non-special views (i.e. you have a number of views just like this.) > -richard > > On Sep 15, 6:38 pm, akonsu <[EMAIL PROTECTED]> wrote: > > > > > his is my understanding of the probl

object_list and select_template

2007-09-26 Thread akonsu
hello, is there a way to make django.views.generic.list_detail.object_list invoke django.template.loader.select_template when searching for template? i have a set of items with tags. i want to use object_list generic view to show items with a specific tag, and i want to use different templates f

Re: custom sql portability

2007-09-26 Thread akonsu
hello, an obvious one is to check whether the query uses standard syntax and features. and if not, rewrite it so it does. also, try to test it on different databases. cheers konstantin On Sep 26, 10:29 am, Filipe Correia <[EMAIL PROTECTED]> wrote: > Hi, > > I'm using some custom sql which isn'

Re: disguising a django app as php?

2007-09-26 Thread akonsu
i woul say do it in php. the reason why they want php might be because they want to be sure that the app is written in a language that can be understood by more people than python. konstantin On Sep 26, 8:13 am, omat <[EMAIL PROTECTED]> wrote: > A client requires a web application to be develope

Re: It's Django for bussines/financial apps??

2007-09-26 Thread akonsu
On Sep 26, 2:17 pm, olivier <[EMAIL PROTECTED]> wrote: > This doesn't seem to be a problem for most users, but if you have a > complex data model, and need to do some complex joins, out-of-the-box > django may not be the best tool for the job, and anything based on > sqlAlchemy (pylons ? turboge

Re: It's Django for bussines/financial apps??

2007-09-26 Thread akonsu
On Sep 26, 2:38 pm, olivier <[EMAIL PROTECTED]> wrote: > > Sure, but you're losing newforms integration, generic views, > admin, ... > Not sure it's still django at the end of the day ;o) > > Olivier i agree with you here. i did not know about the integration problems, thanks. what has been bo

please recommend a video streaming app/lib

2011-06-25 Thread akonsu
hello, can anyone recommend a library or an application for video streaming that can be used in a commercial site that requires good performance and scalability? we expect the site to receive a lot of traffic. and the main functionality is video on demand. thank you -- You received this message

making a search page using generic class views

2011-07-26 Thread akonsu
hello, I am trying to migrate my function based views to class based ones. I have a search page with a form (which is represented by MySearchForm class). The form's action URL is set to the current page (). When the form is submitted the search results are shown in the page below the form. in othe

<    1   2