Re: django vps hosts

2009-09-23 Thread Nick Lo
This may be helpful: http://djangofriendly.com/hosts/ > I think I'm ready to finally switch to a django vps host due to > problems with django on DreamHost. Can anyone recommend a good vps > host? --~--~-~--~~~---~--~~ You received this message because you are su

MultiWidget fail to render without exception

2009-09-23 Thread JF Simon
Hi there ! I try to understand why my form doesn't render anything. No exception is raised and i'm going crazy ! In my forms.py I got these (simplified for instance) classes : class SignupPasswordWidget(forms.MultiWidget): def __init__(self, attrs=None): widgets = ( form

Re: Limiting queryset on ModelAdmin based on date field

2009-09-23 Thread Brian McKeever
I'm not too familiar with customizing the admin, but you want to use the range field lookup. http://docs.djangoproject.com/en/dev/ref/models/querysets/#range On Sep 23, 11:07 pm, Alvaro Mouriño wrote: > Hi list. > > I'm developing a news application that handles articles, about 10 new > article

Re: FormWizard and form data

2009-09-23 Thread Brian McKeever
I would try creating a view that uses a form factory to define some dynamic forms. This post explains how to create a dynamic form factory: http://www.b-list.org/weblog/2008/nov/09/dynamic-forms/ and then I'd return the Wizard that has the new forms as arguments. I bet it would work, but I haven

Re: django vps hosts

2009-09-23 Thread Kenneth Gonsalves
On Thursday 24 Sep 2009 7:24:25 am neri...@gmail.com wrote: > I think I'm ready to finally switch to a django vps host due to > problems with django on DreamHost. Can anyone recommend a good vps > host? slicehost gandi.net linode -- regards kg http://lawgon.livejournal.com --~--~-~--~--

Re: limiting the scope of a ForeignKey relation to within a model?

2009-09-23 Thread Brian McKeever
The docs say that it's possible although unrecommended to use choices dynamically. http://docs.djangoproject.com/en/dev/ref/models/fields/#choices However, you could easily do it at the form level or with a custom setter method. On Sep 20, 4:57 pm, Doug wrote: > Lets say for instance that I hav

Limiting queryset on ModelAdmin based on date field

2009-09-23 Thread Alvaro Mouriño
Hi list. I'm developing a news application that handles articles, about 10 new articles each day. The site administrator every morning selects from a drop-down-list the ones that hit the front page. As time goes by this list grows bigger and bigger, and what's worst, old articles doesn't even mat

Re: Django + QT4

2009-09-23 Thread Alvaro Mouriño
On Thu, Sep 24, 2009 at 12:39 AM, Brian McKeever wrote: > > That's a little different. > > If you want your desktop apps to all directly connect to your server > database, I'm not sure what security issues you'd be exposing yourself > to. I figured you wanted a local database where it wouldn't ma

Re: Windows compatible?

2009-09-23 Thread Tim Bowden
On Wed, 2009-09-23 at 20:32 -0700, Tim wrote: > Is there a Windows version of Django? See the install docs: http://docs.djangoproject.com/en/dev/topics/install/ HTH Tim Bowden --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goog

Re: Windows compatible?

2009-09-23 Thread Karen Tracey
On Wed, Sep 23, 2009 at 11:32 PM, Tim wrote: > > Is there a Windows version of Django? > > Django runs on Windows. The "Windows version" is the same as the one for Linux or Mac, the Django project does not provide any OS-specific packages. That is, the same release tarfile can be installed on a

Re: Windows compatible?

2009-09-23 Thread Sam Lai
2009/9/24 Tim : > > Is there a Windows version of Django? > Django doesn't care what operating system you run, as long as Python runs on it (and Python runs on most operating systems, including Windows, OSX and Linux). The instructions here should get you started - http://docs.djangoproject.com/

Re: Windows compatible?

2009-09-23 Thread Brian McKeever
Python is inherently cross-platform, so you just need the same version as everyone else. On Sep 23, 9:32 pm, Tim wrote: > Is there a Windows version of Django? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: Django + QT4

2009-09-23 Thread Brian McKeever
That's a little different. If you want your desktop apps to all directly connect to your server database, I'm not sure what security issues you'd be exposing yourself to. I figured you wanted a local database where it wouldn't matter if the user messed it up. I mean, I'm not saying it can't be d

Windows compatible?

2009-09-23 Thread Tim
Is there a Windows version of Django? --~--~-~--~~~---~--~~ 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 emai

Re: Reverse Method Not finding URLs

2009-09-23 Thread Streamweaver
I appreciate the answer and I'll give that a try and put some feedback here about it. On Sep 23, 8:32 pm, Peter Coles wrote: > Looks like your regex isn't matching: > >   reverse('view-project', args=['blue-dog']) > > is trying the regex here: > >   url(r'^(?P\w+)/$', 'view_project', name="view-

Re: Django + QT4

2009-09-23 Thread Mike Ramirez
On Wednesday 23 September 2009 20:01:41 Gustavo Henrique wrote: > I don't have much experience in pyhon and I need to create a desktop app to > works as complement to website made with django, both using same database. > So, I thing to use django with python + pyqt/pygtk/wxpython for database > man

Re: What JavaScript framework do you use and why?

2009-09-23 Thread Brian McKeever
Dojango seems really helpful. Thanks. On Sep 23, 8:40 pm, Ovnicraft wrote: > 2009/9/23 Brian McKeever > > > > > I just decided to learn to use dojo yesterday. > > I chose it because it has a huge library of GUI widgets that are all > > suppose to be accessible to people with disabilities. > > f

Re: Design question

2009-09-23 Thread Brian McKeever
I remember a quote from either headfirst java or design patterns that said something like: "The key to inheritance is to abstract functionality." I realize we're not talking about inheritance, but I think it still applies. It may make logical sense that a user object has a blog that has entries,

Re: Sorting field-rendering order of forms.Form instances

2009-09-23 Thread Scott SA
Hi Peter, On Sep 23, 6:52 pm, Peter Coles wrote: > If you check out the source code in django.forms.forms, the forms use > a SortedDict class that is defined in django.utils.datastructures. SortedDict: "A dictionary that keeps its keys in the order in which they're inserted." VERY sweet in

Re: Django + QT4

2009-09-23 Thread Gustavo Henrique
I don't have much experience in pyhon and I need to create a desktop app to works as complement to website made with django, both using same database. So, I thing to use django with python + pyqt/pygtk/wxpython for database management. Thanks Brian! --~--~-~--~~~---~--

Re: What JavaScript framework do you use and why?

2009-09-23 Thread Ovnicraft
2009/9/23 Brian McKeever > > I just decided to learn to use dojo yesterday. > I chose it because it has a huge library of GUI widgets that are all > suppose to be accessible to people with disabilities. > for dojo you also get http:// code.google.com/p/ *dojan go

Re: Finding unique ForeignKey enties.

2009-09-23 Thread Brian McKeever
To only get one image, you use a limit. like movie.images_set.all()[:1] On Sep 22, 2:37 pm, Joshua Russo wrote: > On Tue, Sep 22, 2009 at 7:23 PM, MV wrote: > > > I have a Movie model > > and I have a Image model > > the Image model has a ForeignKey(Movie) > > > Each Movie has an arbitrary amo

Re: What JavaScript framework do you use and why?

2009-09-23 Thread Brian McKeever
I just decided to learn to use dojo yesterday. I chose it because it has a huge library of GUI widgets that are all suppose to be accessible to people with disabilities. I found this: http://en.wikipedia.org/wiki/Comparison_of_JavaScript_frameworks quite helpful. What I didn't know until recentl

Re: Could Django handle this particular setup?

2009-09-23 Thread Tim Chase
> So to sum it up, 1 admin area, 1 member database (under 1 domain) [snip] > Would something like this be possible in Django? The problem is I'm > not sure what should be a separate App or Project... the goal is to be > able to deploy new "front-end" quickly...so perhaps this could be a > separate

Re: Django + QT4

2009-09-23 Thread Brian McKeever
I imagine you're talking about using django models for database management? There's nothing stopping you really. Django is just a python program. All you need to do is: Create a django project (as per the tutorial). Set up the database like normal in your settings file. Create your app with man

Re: How to update a ManyToManyField in a model's custom save method

2009-09-23 Thread Brian McKeever
Try using a postsave signal. It'll automatically trigger your method upon saving a Project. http://docs.djangoproject.com/en/dev/topics/signals/#receiver-functions Basically, all you'd need is: from django.db.models.signals import post_save def member_check(sender, **kwargs): #your code po

Re: Admin Interface Bug?

2009-09-23 Thread Karen Tracey
On Wed, Sep 23, 2009 at 9:00 PM, Nakedsteve wrote: > > Hey everyone, while playing around with an idea that I'm coding with > Django, I tried to login to the admin interface and after successfully > logging in, I got this error: > > Environment: > > Request Method: GET > Request URL: http://local

django vps hosts

2009-09-23 Thread neri...@gmail.com
I think I'm ready to finally switch to a django vps host due to problems with django on DreamHost. Can anyone recommend a good vps host? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: django-trackback usage?

2009-09-23 Thread Brian McKeever
I would put all signal code in the models. I'm afraid I'm not familiar with trackback, but I would imagine that all you'd need to do is: from django.db.models.signals import post_save def your_trackback_function(sender, **kwargs): #whatever goes here post_save.connect(your_trackback_functio

Re: Sqlite3

2009-09-23 Thread Brian McKeever
What does your DATABASE_NAME setting set to in your settings.py file? I know django gives that error if the path is set incorrectly. It needs to say something like: '/home/user_name/django_project/ your_database.db' if you're using sqlite On Sep 23, 4:47 pm, RcCypher wrote: > First I'd like to s

Re: Could Django handle this particular setup?

2009-09-23 Thread Brian McKeever
Here's the documentation for the sites framework which does everything you need: http://docs.djangoproject.com/en/dev/ref/contrib/sites/#ref-contrib-sites On Sep 23, 3:13 pm, Jean-Nicolas wrote: > I would like to use Django for my next project, however, the setup is > a bit particular and I'm no

Admin Interface Bug?

2009-09-23 Thread Nakedsteve
Hey everyone, while playing around with an idea that I'm coding with Django, I tried to login to the admin interface and after successfully logging in, I got this error: Environment: Request Method: GET Request URL: http://localhost:8000/admin/ Django Version: 1.1 Python Version: 2.6.1 Installed

Re: Sorting field-rendering order of forms.Form instances

2009-09-23 Thread Peter Coles
If you check out the source code in django.forms.forms, the forms use a SortedDict class that is defined in django.utils.datastructures. I'd probably go about this by creating a class called something like SortableForm: from django.utils.datastructures import SortedDict class SortableForm(forms.

Re: Reverse Method Not finding URLs

2009-09-23 Thread Peter Coles
Looks like your regex isn't matching: reverse('view-project', args=['blue-dog']) is trying the regex here: url(r'^(?P\w+)/$', 'view_project', name="view-project"), I think you want (?P[\w\-]+). Whenever I'm unsure about a regex, I open up a shell "import re" and test it out. -- Peter On

Sorting field-rendering order of forms.Form instances

2009-09-23 Thread Scott SA
For reasons unimportant to this message, I found it necessary to rearrange the order that fields are rendered on some of my forms. According to the django docs., I simply needed to rearrange the order of fields as I defined them, which works quite fine when I know in advance the required order. My

Re: serialization formats?

2009-09-23 Thread Russell Keith-Magee
On Wed, Sep 23, 2009 at 10:38 PM, Chris Withers wrote: > > Hi All, > > Where can I find docs on the actual serialisation formats used by > Django's serialisation support? > > http://docs.djangoproject.com/en/dev/topics/serialization/#id1 > > ...lists them, but doesn't actually describe them :-S

Sqlite3

2009-09-23 Thread RcCypher
First I'd like to say that I'm completely new to this. I am not very Linux savvy and I am trying to learn as I go. SO now to jump off the deep end (for me anyway). I setup my server (ubuntu 8.1) installed python version 2.6.2 installed django by following the install guide. I began the tutorial p

django-trackback usage?

2009-09-23 Thread josebrwn
I'm wondering if anybody who's using trackback can answer a simple question that has me stumped. I added the signals code to my class' save method, and it runs, it just doesn't seem to do anything. I have the code running on two sites and when I save entries that point at one another, nothing ev

How to update a ManyToManyField in a model's custom save method

2009-09-23 Thread M Godshall
I have a Project model with a ManyToManyField called "members" to keep track of members of a project. Whenever the model is updated, I need to check if certain members need to be removed from or added to the m2m field. The most logical place to do this is in the model's custom save method, but w

Django-Storages

2009-09-23 Thread Nick
Hey everyone, I'm working on setting up an app to upload images to s3. I am using David Larlet's djang-storages backends and am running into a pretty annoying problem. When I try to save an entry through the admin I get the following error: Storage module "backends.s3" does not define a "s3sto

Could Django handle this particular setup?

2009-09-23 Thread Jean-Nicolas
I would like to use Django for my next project, however, the setup is a bit particular and I'm not sure if there's a way to setup Django to handle it...here's what I need basically... The site is a subscription based site, ... the main functionalities are: Member need to signup to access some pag

Re: Disable apache directory browsing

2009-09-23 Thread Peter Coles
Did you try it inside a Directory tag? For example, try putting something like this into your httpd.conf, where "path_to_htdocs" is the actual path to your htdocs directory: Options -Indexes +FollowSymLinks AllowOverride None Order allow,deny Allow from all Or even change the

Reverse Method Not finding URLs

2009-09-23 Thread Streamweaver
I'm still having considerable problems with my reverse URLs and can't find what I'm doing wrong. For reference I'm pasting in my localsettings file (with some info scrubbed out), my root urls.py file as well as an included urls.py file relevant to the error. My problem is that I am getting vario

Re: overriding save() for ManyToManyFields

2009-09-23 Thread Daniele Procida
On Wed, Sep 23, 2009, mrts wrote: >> So, obviously I need another stage, to save the many-to-many relations >> once theo bject is saved. > >Call super(Event, self).save(), then update the many-to-many >relations. Don't I need to run some sort of save for those? Otherwise, what happens to the at

Re: QuerySet: clone vs deepcopy?

2009-09-23 Thread Peter Coles
Depending on what framework or language you're working with, a "clone ()" method can be implemented as either a deep copy or a shallow copy. I do not see a __deepcopy__ function or a clone function on QuerySet (apart from the "private" _clone function). Are you referring to the django.db.models.

Re: IntegrityError: may not be NULL for my simple override of models.DateTimeField

2009-09-23 Thread Jim DeLaHunt
Karen: Yayyy!!! Thank you! On Sep 23, 11:45 am, Karen Tracey wrote: ... > /home/kmt/software/web/playground/ttt/newfields.py(56)to_python() > > -> utc_dt = super(DateTimeFieldInTZ, self).__init__(value, *args, **kwargs) ... > I don't actually have a clue what the code here is trying to do,

Django + QT4

2009-09-23 Thread Gustavo Henrique
Hi guys! Is possible use django with qt4 for desktop apps? if yes, where I can find about this? anyone have a example to study? Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Parse URLs to integers

2009-09-23 Thread Daniel Roseman
On Sep 23, 5:24 pm, IanSR wrote: > Is there some trick to parse > > http://www.example.com/foo/42 > > such that "42" becomes an integer parameter to the view function, > instead of a string? > > Right now I have to do: > > from my.app.views import foo > > urlpatterns = patterns('', > (r'foo/(

client/server synchronization

2009-09-23 Thread Andrés Otárola
Hi django community, I'm a little bit stuck on something, and I need some of your help to put me on the right track... I have developed a django POS (point of sale) application, with succesful results, but it was a single application. Right now I have to develop a django POS (point of sale) app

Re: multi-db vs. data warehouse

2009-09-23 Thread Joshua Russo
I have many years of database design experience and it sounds like you are getting lost in terminology. I would start out with a set of tables in the warehouse that mirror the existing data. In these tables you can either wipe and reload each time, or create a mechanism to track each individual loa

testing with different settings

2009-09-23 Thread skunkwerk
Hi, I've been using the built-in django test suite, but need a way to somehow specify a different settings file or a configuration variable from the settings file, when the tests are run. Sort of similar to how django automatically changes the DATABASE_NAME setting - how does it actually do t

Re: multi-db vs. data warehouse

2009-09-23 Thread Tony Schmidt
Thanks for your reply, Joshua. Complexity is exactly what I'm trying to avoid - but after doing a little research on data warehouses (I've never built one), that seems like a very complex route as well! I would like to just come up with my "dream schema" and run update scripts on a daily or even

Re: multi-db vs. data warehouse

2009-09-23 Thread Joshua Russo
The multi-db branch is just now in the process of being baked into the core and from what I can tell it's not quite done yet. Even when it is completely done I would recommend the data warehouse approach. I view the multi-db functionality more as a last resort, where you really don't have an option

Re: IntegrityError: may not be NULL for my simple override of models.DateTimeField

2009-09-23 Thread Karen Tracey
On Wed, Sep 23, 2009 at 12:47 PM, Jim DeLaHunt wrote: > > Karen: > > Thank you so much for your reply. > > On Sep 23, 7:01 am, Karen Tracey wrote: > > What you haven't shared is the code for DateTimeFieldInTZ. It's going to > be > > rather hard to figure out what is going wrong without seeing th

Re: Slugify doesn't match pre-populated slug field.

2009-09-23 Thread Amos
On Wednesday 23 September 2009 17:06:44 Justin Myers wrote: > Two ideas: > 1. Instead of having the slug prepopulated, override save() [1] and > run slugify yourself. > 2. Instead of running slugify on the name, why not just access its > slugfield directly? > > HTH, > Justin > > [1] > http://doc

Re: verbose_name/i18n sometimes doesn't work in one app

2009-09-23 Thread Florian Schweikert
2009/9/23 > Hi, > > I've a project with 2 apps, I'm using the meta class for defining > verbose_name(_plural), register in admin.py. > For The first app it works good, in the second django shows often the > (buggy) generic name, for example: > > "Lv a_types"(the space is on the wrong place I thin

Re: equivalent of getattr in a django template

2009-09-23 Thread Chris Withers
Daniel Roseman wrote: > It's an intentional limitation of the template language that you can't > do that. You'll need to write a custom tag or filter - luckily it can > be done very trivially as a filter: > > @register.filter > def get_attr(obj, val) > return getattr(obj, val) > > Now in the

Re: equivalent of getattr in a django template

2009-09-23 Thread Karen Tracey
On Wed, Sep 23, 2009 at 1:05 PM, Chris Withers wrote: > > Hi All, > > I have this view function: > > def index(request,model,pk=None): > > return list_detail.object_list( > request, > queryset=model.objects.all(), > paginate_by=10, > template_name='index.html',

Re: equivalent of getattr in a django template

2009-09-23 Thread Daniel Roseman
On Sep 23, 6:05 pm, Chris Withers wrote: > Hi All, > > I have this view function: > > def index(request,model,pk=None): > >      return list_detail.object_list( >          request, >          queryset=model.objects.all(), >          paginate_by=10, >          template_name='index.html', >        

Re: equivalent of getattr in a django template

2009-09-23 Thread Chris Withers
Maksymus007 wrote: > {{object.name}} ? no, that is the equivalent of: getattr(object,'name') I want: getattr(object,name) Subtle, but rather important, difference... Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk -

Re: equivalent of getattr in a django template

2009-09-23 Thread Maksymus007
On Wed, Sep 23, 2009 at 7:05 PM, Chris Withers wrote: > > Hi All, > > I have this view function: > > def index(request,model,pk=None): > >     return list_detail.object_list( >         request, >         queryset=model.objects.all(), >         paginate_by=10, >         template_name='index.html',

equivalent of getattr in a django template

2009-09-23 Thread Chris Withers
Hi All, I have this view function: def index(request,model,pk=None): return list_detail.object_list( request, queryset=model.objects.all(), paginate_by=10, template_name='index.html', extra_context=dict( column_titles = [f.name for

Re: multi-db vs. data warehouse

2009-09-23 Thread Tony Schmidt
Hi, Nausikaa. Thanks for your reply. Unfortunately, the legacy systems must remain in place until they are gradually (if ever) phased out. There's a whole bunch of functionality that I don't want to have to recreate in those systems (POS, inventory/accounting, products, etc.). I just want to b

Re: IntegrityError: may not be NULL for my simple override of models.DateTimeField

2009-09-23 Thread Jim DeLaHunt
Karen: Thank you so much for your reply. On Sep 23, 7:01 am, Karen Tracey wrote: > What you haven't shared is the code for DateTimeFieldInTZ.  It's going to be > rather hard to figure out what is going wrong without seeing that code. ... > If you show us what is in the DateTimeFieldInTZ impleme

Parse URLs to integers

2009-09-23 Thread IanSR
Is there some trick to parse http://www.example.com/foo/42 such that "42" becomes an integer parameter to the view function, instead of a string? Right now I have to do: from my.app.views import foo urlpatterns = patterns('', (r'foo/(?P\d+)/?$', foo), ) my/app/views.py def foo(reque

Re: how can i pass more agrument to template filter

2009-09-23 Thread Join hack
thanks 2009/9/24 Karen Tracey > On Wed, Sep 23, 2009 at 12:13 PM, Join hack wrote: > >> i read the django doc, but there is no solution for this . >> >> > The doc ( > http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#writing-custom-template-filters) > is clear: a filter has only

Re: how can i pass more agrument to template filter

2009-09-23 Thread Karen Tracey
On Wed, Sep 23, 2009 at 12:13 PM, Join hack wrote: > i read the django doc, but there is no solution for this . > > The doc ( http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#writing-custom-template-filters) is clear: a filter has only one argument. You are free to take the value

how can i pass more agrument to template filter

2009-09-23 Thread Join hack
i read the django doc, but there is no solution for this . --~--~-~--~~~---~--~~ 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 t

Re: Slugify doesn't match pre-populated slug field.

2009-09-23 Thread Justin Myers
Two ideas: 1. Instead of having the slug prepopulated, override save() [1] and run slugify yourself. 2. Instead of running slugify on the name, why not just access its slugfield directly? HTH, Justin [1] http://docs.djangoproject.com/en/dev/topics/db/models/#overriding-predefined-model-methods

Sitio que estamos lanzando

2009-09-23 Thread Juan Pablo Romero Méndez
Chequen este sitio web que estamos lanzando, a ver que les parece: http://www.quetanprincipeeres.com.mx/ Saludos, Juan Pablo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to thi

serialization formats?

2009-09-23 Thread Chris Withers
Hi All, Where can I find docs on the actual serialisation formats used by Django's serialisation support? http://docs.djangoproject.com/en/dev/topics/serialization/#id1 ...lists them, but doesn't actually describe them :-S cheers, Chris -- Simplistix - Content Management, Batch Processing

verbose_name/i18n sometimes doesn't work in one app

2009-09-23 Thread kelvan . mailinglist
Hi, I've a project with 2 apps, I'm using the meta class for defining verbose_name(_plural), register in admin.py. For The first app it works good, in the second django shows often the (buggy) generic name, for example: "Lv a_types"(the space is on the wrong place I think) and "possibilitys"

Re: opener.dismissAddAnotherPopup error tinymce

2009-09-23 Thread Joost Cassee
On 22 sep, 16:57, Ali Rıza Keleş wrote: > There is something strange with popups on admin page while this page > includes tinymce editor. > > > [...] > > because media files are being served via another server named as a > subdomain. That's the problem. The admin popup windows do set the docume

Re: HTML / CSS question

2009-09-23 Thread Joshua Russo
On Wed, Sep 23, 2009 at 1:00 PM, Daniel Roseman wrote: > > On Sep 23, 2:54 pm, Joshua Russo wrote: > > I want to apply style to a block of text in the middle of a sentance > without > > effecting the flow. I've been using what feels like a serious hack by > using > > tags with a class property.

Re: Help with templates

2009-09-23 Thread Joshua Russo
On Wed, Sep 23, 2009 at 12:40 PM, gustavo wrote: > > Hi people!! > > I need help trying to understand templates. > > Let me explain where I am. I have finished the django tutorial and I > am assuming ( been right or wrong, I dont know) that the best thing to > do is to use the template automatic

Re: IntegrityError: may not be NULL for my simple override of models.DateTimeField

2009-09-23 Thread Karen Tracey
On Wed, Sep 23, 2009 at 4:46 AM, Jim DeLaHunt wrote: > > Hi, folks: > > I'm new to Django. It's a very powerful system, and I appreciate the > work of the people who built it up into what I'm benefiting from. > > I'm having a difficulty with a very simple app which exercises a > custom field type

Re: HTML / CSS question

2009-09-23 Thread Daniel Roseman
On Sep 23, 2:54 pm, Joshua Russo wrote: > I want to apply style to a block of text in the middle of a sentance without > effecting the flow. I've been using what feels like a serious hack by using > tags with a class property. My big fear is that the tags will > disappear from the list of suppor

HTML / CSS question

2009-09-23 Thread Joshua Russo
I want to apply style to a block of text in the middle of a sentance without effecting the flow. I've been using what feels like a serious hack by using tags with a class property. My big fear is that the tags will disappear from the list of supported tags. But really there has to be a way to do t

QuerySet: clone vs deepcopy?

2009-09-23 Thread Joshua Russo
I was looking through the QuerySet code and noticed logic for both deepcopy and clone. What's the difference? What would be an example of why I should use one or the other? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou

Re: Multi table inheritance and reverse lookup

2009-09-23 Thread JL
We had to use a very similar solution as well in a project using multi- table inheritance. There's simply no good way to get to the actual type of the object. On Sep 23, 1:36 am, Torsten Bronger wrote: > Hallöchen! > > Jani Tiainen writes: > > [...] > > > Now it's trivial play with sub products

Help with templates

2009-09-23 Thread gustavo
Hi people!! I need help trying to understand templates. Let me explain where I am. I have finished the django tutorial and I am assuming ( been right or wrong, I dont know) that the best thing to do is to use the template automatic generation. eg, I have a class Galeria and to have a layout to i

cmemcache with large dataset cause CPU 100%

2009-09-23 Thread Fangzx
I run my django project in Ubuntu + Ligthttpd + fastcgi + cmemcached 0.95, I found that sometimes the CPU usage reached 100% by python process , and now I belive it caused by my program of storing large dataset into memcached! I changed my program to store large dataset into file-cache like this

Disable apache directory browsing

2009-09-23 Thread knight
Hi, I have installed django app with wsgi. I see that by default I have directory browsing enabled in my static files and I want to turn it off. My httpd.conf: LoadModule python_module modules/mod-wsgi.so WSGIScriptAlias /peergw /home/alex/mx30/django.wsgi Alias /media/ /var/www/media/ Alias /

Re: Pseudo random order for Paginator

2009-09-23 Thread Tim Chase
> thx, take a random seed form the session and shuffle data is a good > idea > > looks like slow because of amount od data, but I can save the random > numbers for each row in the database and make 2 selects, one > then > random(seed) and join it with the other, <= random(seed) The catch is if t

Re: Pseudo random order for Paginator

2009-09-23 Thread gentlestone
thx, take a random seed form the session and shuffle data is a good idea looks like slow because of amount od data, but I can save the random numbers for each row in the database and make 2 selects, one > then random(seed) and join it with the other, <= random(seed) On 22. Sep., 14:31 h., Tim Ch

Re: overriding save() for ManyToManyFields

2009-09-23 Thread mrts
On Sep 23, 10:40 am, "Daniele Procida" wrote: > So, obviously I need another stage, to save the many-to-many relations > once theo bject is saved. Call super(Event, self).save(), then update the many-to-many relations. --~--~-~--~~~---~--~~ You received this mess

Re: Internal Server Error for just one site

2009-09-23 Thread phoebebright
Graham, Yes to all your questions and thanks for the very helpful link - That is going to come in most useful. Found the error inspired by another thread, which was a missing custom Middleware call that had been copied through from another app. Once that was removed django started displaying er

Re: Internal Server Error for just one site

2009-09-23 Thread Graham Dumpleton
On Sep 23, 7:11 pm, phoebebright wrote: > Can anyone suggest where the problem might be for this one. > > I am using wsgi and have a number of other django sites on this server > all running fine.  Have recreated the subdomain on the server, have > copied the vhost.conf file from a site that wo

What JavaScript framework do you use and why?

2009-09-23 Thread Joshua Russo
I've been happily using JQuery for a while and was wondering why people use the frameworks that they do. I want to see how other's get flexibility and efficiency (cool widgets and good response time) out of JavaScript. For example: The current project I'm working on I've created a visual display of

Internal Server Error for just one site

2009-09-23 Thread phoebebright
Can anyone suggest where the problem might be for this one. I am using wsgi and have a number of other django sites on this server all running fine. Have recreated the subdomain on the server, have copied the vhost.conf file from a site that works and changed the appropriate names (several times

IntegrityError: may not be NULL for my simple override of models.DateTimeField

2009-09-23 Thread Jim DeLaHunt
Hi, folks: I'm new to Django. It's a very powerful system, and I appreciate the work of the people who built it up into what I'm benefiting from. I'm having a difficulty with a very simple app which exercises a custom field type of mine, one which improves the time zone handling of models.DateTi

Re: django forum

2009-09-23 Thread derekH
Demo? Are you referring to a demo of the http://djangobb.org/ ? If so, please add a link for this. On Sep 23, 6:10 am, Wiiboy wrote: > Looking at the demo, I think that is the best Python forum I've ever > seen.  Congrats.  This would be my site's saving grace. > > However, I installed all the

Re: how to open a new page when clicking a url

2009-09-23 Thread li kai
Thanks, It worked. On Wed, Sep 23, 2009 at 2:07 PM, Ajit jena wrote: > Hello, > > Try this. > > E-shop > target='_blank'>E-coupon > > It will open in a new window. I hope it will fix your issue. > > Thanks, > Ajit > > > On Wed, Sep 23, 2009 at 11:14 AM, li kai wrote: >

overriding save() for ManyToManyFields

2009-09-23 Thread Daniele Procida
My model has a save() override, in which a number of attributes (which are ManyToManyFields) need to get their values from the object's parent: def save(self): if self.parent: attribute_list = ['publishing_destinations', 'registration_enquiries', 'speakers', 'related_peopl

Re: wierd apache and mod_python problem with templates

2009-09-23 Thread andreas schmid
thank you... i solved it using the django.wsgi script created by the buildout! its a lot easier deploy django with wsgi and not to mention how much better it is with a buildout in a clean isolated folder!! love it! Graham Dumpleton wrote: > > On Sep 22, 11:41 pm, andreas schmid wrote: > >> h