Re: how to deploy Django on the web server?

2009-08-11 Thread derek
On Aug 9, 7:49 pm, justin jools wrote: > o thanks for that :) > as soon as my administrator finally sorts out Python script executing for me > - omg! ,I'll try that Not sure if this is off-topic or not, but I see Google is also offering free Django deployment on their App Engine: http://code.goo

Sort by output of arbitrary method

2009-08-11 Thread Harish
Hi Friends, According to the django tutorial: "You can click on the column headers to sort by those values -- except in the case of the was_published_today header, because sorting by the output of an arbitrary method is not supported. " Is there any work around for this? Regards Harish Bhat M

Re: Sort by output of arbitrary method

2009-08-11 Thread Malcolm Tredinnick
On Tue, 2009-08-11 at 00:29 -0700, Harish wrote: > Hi Friends, > > According to the django tutorial: > "You can click on the column headers to sort by those values -- except > in the case of the was_published_today header, because sorting by the > output of an arbitrary method is not supported. "

Re: Sort by output of arbitrary method

2009-08-11 Thread Harish
On Aug 11, 12:35 pm, Malcolm Tredinnick wrote: > On Tue, 2009-08-11 at 00:29 -0700, Harish wrote: > > Hi Friends, > > > According to the django tutorial: > > "You can click on the column headers to sort by those values -- except > > in the case of the was_published_today header, because sorti

Re: Timezones in Django

2009-08-11 Thread Jarek Zgoda
Wiadomość napisana w dniu 2009-08-11, o godz. 08:46, przez Brian May: > On Tue, Aug 11, 2009 at 12:08:21AM -0400, Vitaly Babiy wrote: >> Hey guys, I am working on an application that needs to be timezone >> aware. Is >> there support for this with in django I can't seem to find anything >> ex

Bad DateTime for LANGUAGE_CODE = 'sk'

2009-08-11 Thread gentlestone
My settings: DEFAULT_CHARSET = "utf-8" TIME_ZONE = 'Europe/Bratislava' LANGUAGE_CODE = 'sk' USE_I18N = True DateTime fields are displayed in the admin page incorrectly. If I change the language code for 'en' or 'cz', the display format is ok. It is propably a bug. How can I fix it? --~--~---

Re: looping over forms in a formset

2009-08-11 Thread bnl
Hi Malcolm Thanks for looking in at this. There is some magic aura about this group. Both times I've posted to it, I've found other folks solutions that I could not find before I finally, in desperation, post ... and then magically they appear ... (In this case, I finally found the combination of

Re: Bad DateTime for LANGUAGE_CODE = 'sk'

2009-08-11 Thread Ivan Mincik
On Tue, Aug 11, 2009 at 10:09 AM, gentlestone wrote: > > My settings: > > DEFAULT_CHARSET = "utf-8" > TIME_ZONE = 'Europe/Bratislava' > LANGUAGE_CODE = 'sk' > USE_I18N = True > > DateTime fields are displayed in the admin page incorrectly. If I > change the language code for 'en' or 'cz', the disp

Re: looping over forms in a formset

2009-08-11 Thread Malcolm Tredinnick
On Tue, 2009-08-11 at 01:12 -0700, bnl wrote: [...] > Apologies that I'm not asking my questions in the way you'd like, > but believe me, I am cutting it down a lot ... and I appreciate that > it's still not obvious where the errors are (I would have found > them otherwise). In this case, I had cu

Re: help with excel exports

2009-08-11 Thread Chris Withers
Bobby Roberts wrote: > I'm generating the > response in my view as such: > >response = render_to_response("spreadsheet.html", { > 'tms': tms, > }) This is an evil hack, don't be surprised if weird things happen with it. You should be using xlwt to generate your spre

Re: Bad DateTime for LANGUAGE_CODE = 'sk'

2009-08-11 Thread gentlestone
also local flavors SKRegionSelect and SKDistrictSelect do not work, I'm afraid On 11. Aug, 10:16 h., Ivan Mincik wrote: > On Tue, Aug 11, 2009 at 10:09 AM, gentlestone wrote: > > > My settings: > > > DEFAULT_CHARSET = "utf-8" > > TIME_ZONE = 'Europe/Bratislava' > > LANGUAGE_CODE = 'sk' > > USE_I

Standalone script with django's ORM and multiprocessing

2009-08-11 Thread Spajderix
Hi! I've written a standalone script, which looks throught a table in db for tasks to perform. It then starts subprocesses for each task it founds using multiprocessing.Process class from python. Everything's fine when there is one task, but when i try to start more subprocesses at once i get:

Re: Passing optional URL params to reverse() function

2009-08-11 Thread nabucosound
Hi Malcolm, Thanks for your answer. Somehow I had a shortcircuit in my brain yerterday that made me try to do an impossible upon the framework, that is, using the same GET response with the same URL after an HTTP redirect, rendering extra information if extra params in the URLconf url were given.

Re: Bad DateTime for LANGUAGE_CODE = 'sk'

2009-08-11 Thread Malcolm Tredinnick
On Tue, 2009-08-11 at 02:03 -0700, gentlestone wrote: > also local flavors SKRegionSelect and SKDistrictSelect do not work, > I'm afraid Please file tickets for these items (one issue per ticket) if they don't already exist. There is a localflavor component in Trac that is worth scanning the titl

Re: Standalone script with django's ORM and multiprocessing

2009-08-11 Thread Malcolm Tredinnick
On Tue, 2009-08-11 at 11:06 +0200, Spajderix wrote: > Hi! > > I've written a standalone script, which looks throught a table in db for > tasks to perform. It then starts subprocesses for each task it founds > using multiprocessing.Process class from python. Everything's fine when > there is on

Re: Cross post from Djangoindia list: [Pycon] IRC Meeting to discuss how to represent Django

2009-08-11 Thread Kenneth Gonsalves
On Monday 10 Aug 2009 5:27:13 pm shabda wrote: > With Pycon's talk submission deadline just a week away and only 1 > talk on our favourite web framework, I suggest that we organize > an IRC meeting hopefully on August 15th (Saturday around evening) > and discuss our plans to increase the represent

Re: Standalone script with django's ORM and multiprocessing

2009-08-11 Thread Spajderix
Malcolm Tredinnick pisze: > On Tue, 2009-08-11 at 11:06 +0200, Spajderix wrote: > >> Hi! >> >> I've written a standalone script, which looks throught a table in db for >> tasks to perform. It then starts subprocesses for each task it founds >> using multiprocessing.Process class from python. E

Re: Standalone script with django's ORM and multiprocessing

2009-08-11 Thread prabhu S
Solution appears like a hack to me. Why do you close the connection in every process? Can you not just close once in parent? Execute commits alone in each process. On Aug 11, 10:50 am, Spajderix wrote: > Malcolm Tredinnick pisze: > > > > > On Tue, 2009-08-11 at 11:06 +0200, Spajderix wrote: > >

Re: Standalone script with django's ORM and multiprocessing

2009-08-11 Thread Malcolm Tredinnick
On Tue, 2009-08-11 at 03:12 -0700, prabhu S wrote: [...] > Why do you close the connection in > every process? Can you not just close once in parent? That would also work. Regards, Malcolm --~--~-~--~~~---~--~~ You received this message because you are subscrib

Re: Dumping Large Databases

2009-08-11 Thread Chris Spencer
I guess I should have prefixed that by saying my goal is to migrate from MySQL to PostgreSQL. However, I'm having trouble finding a tool to do this, so I thought I'd try Django's backend neutral dumpdata/loaddata feature. Chris On Mon, Aug 10, 2009 at 9:48 PM, Malcolm Tredinnick wrote: > > On Mo

Re: Django: Add SET DATESTYLE

2009-08-11 Thread Bdfy
class ModelForm(forms.Form): test_date = forms.DateField(required=False) ,,, INSERT INTO SQL: obj.test_date = test_date All OK for default format ( 2009-12-31 ). But for InputFormat "30.12.2009" - error. How to change InputFormat for all forms in application ? On 10 авг, 20:08, Karen Tra

Re: Standalone script with django's ORM and multiprocessing

2009-08-11 Thread Spajderix
prabhu S pisze: > Solution appears like a hack to me. Why do you close the connection in > every process? Can you not just close once in parent? Execute commits > alone in each process. > I've checked that. Unfortunately, in my case, it won't work. I have a loop looking like this: for job in

Re: IE problems w. admin save

2009-08-11 Thread Jesper Rasmussen
I've made some more experiments, and it does seem to be a (database?) timing issue: About once in 10 it shows the right page :o| My model is quite big ... about 40 entries of mixed types many having both blank and null. If nothing else works ... and good ideas of where to put in some pause to "s

unique_together with None

2009-08-11 Thread gentlestone
if I have unique_together = ('some_fk_field', 'some_plain_field') and some_fk = ...(null = True) the system allows put more intsances with some_fk_field=None and the same some_plain_field value I think, this is a bug. Or how can I manage to allow just one instance with null fk and the same ot

Re: looping over forms in a formset

2009-08-11 Thread bnl
Thanks. Before I suggest anything concrete for the docs, let's see if my understanding is now right: The problem from my point of view was that I didn't think I had any hidden fields. Hence I didn't loop over them, and didn't think of them - yes, despite the massive hint in the error message .

Django for smaller sites

2009-08-11 Thread moesian
Hi, I'm looking at using django for building my sites. I want to be able to build sites of varying size but the likelyhood is i'll be creating a number smaller low traffic sites. I was wondering if django is suitable for smaller sites ( simple cms, contact forms etc ) or would it be overkill ? W

Re: Dynamic/complex forms

2009-08-11 Thread Ludwik Trammer
Hi, I haven't tried it myself, but look at django-ajax-validation (http://github.com/alex/django-ajax-validation). Ludwik --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

django 0.96.4 does not has django.utils._os

2009-08-11 Thread dongua
/django/core/servers/basehttp.py code: from django.utils._os import safe_join but there does not has any _os.py in pacakge, and after install 0.96.4 will can't runserver --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

Re: Default value for fields

2009-08-11 Thread AG
Thank you very much for all the responses. I found the source of the problem in my code. I was adding a property to Model Model.revision = property(fget=XXX, fset=YYY) which conflicted with the revision field I was having trouble with. Sorry for the confusion. Best, AG On Aug 10, 2:22 pm, Kar

Re: django 0.96.4 does not has django.utils._os

2009-08-11 Thread Karen Tracey
On Tue, Aug 11, 2009 at 8:37 AM, dongua wrote: > > /django/core/servers/basehttp.py > code: > from django.utils._os import safe_join > > but there does not has any _os.py in pacakge, and after install 0.96.4 > will can't runserver > Ugh, indeed this is broken. Fix is being looked into. Karen

Re: Django for smaller sites

2009-08-11 Thread Gustavo Henrique
Django is the best option for websites. It's very good for e-commerce, cms, ERP, CRM, etc. IMHO, the bests frameworks are: 1. Django 2. Rails 3. CakePHP 4. Code Igniter PS.: I tried all php frameworks, but python frameworks only django. See about web2py too. -- Gustavo Henrique http://www.gus

Re: unique_together with None

2009-08-11 Thread Gustavo Henrique
Try also: null=True, blank=True -- Gustavo Henrique http://www.gustavohenrique.net http://blog.gustavohenrique.net --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Question about request.user

2009-08-11 Thread Gustavo Henrique
maybe a problem with cache. try this: from django.views.decorators.cache import never_cache @never_cache def yourview(request): # your code here -- Gustavo Henrique http://www.gustavohenrique.net http://blog.gustavohenrique.net --~--~-~--~~~---~--~~ You re

Re: django 0.96.4 does not has django.utils._os

2009-08-11 Thread Russell Keith-Magee
On Tue, Aug 11, 2009 at 8:37 PM, dongua wrote: > > /django/core/servers/basehttp.py > code: > from django.utils._os import safe_join > > but there does not has any _os.py in pacakge, and after install 0.96.4 > will can't runserver It appears that the security fix that was committed in r11354 was

Re: unique_together with None

2009-08-11 Thread gentlestone
On 11. Aug, 15:01 h., Gustavo Henrique wrote: > Try also: null=True, blank=True > > -- > Gustavo Henriquehttp://www.gustavohenrique.nethttp://blog.gustavohenrique.net blank=True ... I have had, but this one doesn't solve the problem, maybe the problem is in postgresql, the associated SQL code fo

connectiong querysets

2009-08-11 Thread elminio
Hello, Is it possiblo to merge Querystets into one big Queryset? --~--~-~--~~~---~--~~ 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

Extending Django-cms Menu

2009-08-11 Thread Alessandro Ronchi
I have a django-cms app with this menu: - Apples -> Red Apples -> Green Apples - Oranges -> Big oranges - Lemons - New Lemon types I must add another link (a blog category) to Apples and Oranges first level menu, to achieve this result: - Apples -> Red Apples -> Green Apples -> Blog (app

session management problem

2009-08-11 Thread Oguz Yarimtepe
Hi all, In my application i have a login screen. The view is simple as below: loginform=None formvalid=True if request.method == "POST": username = request.POST['username'] password = request.POST['password'] loginform=LoginForm(request.POST)

Re: Extending Django-cms Menu

2009-08-11 Thread Alessandro Ronchi
2009/8/11 Alessandro Ronchi > I have a django-cms app with this menu: I've partially solved my problem. but it doesn't get get_title from the model. It's very strange, because I've followed the documentation example on http://github.com/digi604/django-cms-2.0/blob/18d184375fdf2e94a5c5a26bbe57a

Apache mod_wsgi Django setup - Forbidden You don't have permission to access /mysite on this server.

2009-08-11 Thread justin jools
Ive been the install instructions in : http://wiki.thinkhole.org/howto:django_on_windows%E2%80%8F (with mod_wsgi) install python 26, Apache 2.2, modwsgi ap2.2 py26 and apache loads modwsgi fine. when I check localhost: apache says - It works! when I check 127.0.0.1:8000: Django says - It worke

Concurrent Web Access and Edits

2009-08-11 Thread Doug Blank
New Django user here with a question about the client side: Is there built-in support for dealing with concurrent edits? I'm not referring to the database issues (locking, etc) but is there Django support for handling a request to access or edit data for which another user is editing? I'm thinkin

Re: Dumping Large Databases

2009-08-11 Thread Alex Gaynor
On Tue, Aug 11, 2009 at 5:37 AM, Chris Spencer wrote: > > I guess I should have prefixed that by saying my goal is to migrate > from MySQL to PostgreSQL. However, I'm having trouble finding a tool > to do this, so I thought I'd try Django's backend neutral > dumpdata/loaddata feature. > > Chris >

Re: IE problems w. admin save

2009-08-11 Thread Jesper Rasmussen
I've just updated my IE from 7 to 8 and the problem is gone ... :o) Only problem left is that the customers are currently all using IE7 ... sigh :o( Cheers, Jesper On 11 Aug., 12:59, Jesper Rasmussen wrote: > I've made some more experiments, and it does seem to be a (database?) > timing iss

Re: unique_together with None

2009-08-11 Thread Alex Gaynor
On Tue, Aug 11, 2009 at 8:25 AM, gentlestone wrote: > > On 11. Aug, 15:01 h., Gustavo Henrique wrote: >> Try also: null=True, blank=True >> >> -- >> Gustavo Henriquehttp://www.gustavohenrique.nethttp://blog.gustavohenrique.net > > blank=True ... I have had, but this one doesn't solve the problem,

quick django gig $300

2009-08-11 Thread Bobby Roberts
contact me privately for more information. A friend needs help wrapping up a project. I'll provide his email address to interested parties. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To po

Re: unique_together with None

2009-08-11 Thread Karen Tracey
On Tue, Aug 11, 2009 at 10:40 AM, Alex Gaynor wrote: > > On Tue, Aug 11, 2009 at 8:25 AM, gentlestone > wrote: > > > > On 11. Aug, 15:01 h., Gustavo Henrique wrote: > >> Try also: null=True, blank=True > >> > >> -- > >> Gustavo Henriquehttp://www.gustavohenrique.nethttp:// > blog.gustavohenrique

Re: Sort by output of arbitrary method

2009-08-11 Thread Javier Guerra
On Tue, Aug 11, 2009 at 2:47 AM, Harish wrote: > s there any other way of doing this? read the whole result set and use Python sorting. -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" grou

Re: How-to use SelectMultiple widget with CommaSeparatedIntegerField ?

2009-08-11 Thread nono
I wrote a clean_csi() method and I call it in each clean_() method passing the field name and and it's working now Here is the code def clean_csi(self, field): data = self.cleaned_data[field] data.sort() csi_list = [] first_element = True for element i

inspectdb and postgresql schema

2009-08-11 Thread Marek Pietrucha
Hello, I have a relational database written in PostgreSQL 8.4. I use different schemas - not default public schema. I tried to inspectdb my database but the output was clean. It looked like the inspectdb tool didn't look in my schemas. I thought it was the matter of the pg driver, so I changed it

Re: connectiong querysets

2009-08-11 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 http://docs.djangoproject.com/en/dev/topics/db/queries/#complex-lookups-with-q-objects Luke Seelenbinder luke.seelenbin...@gmail.com http://www.google.com/profiles/luke.seelenbinder On Tue, Aug 11, 2009 at 9:38 AM, elminio wrote: -BEGIN PGP S

Re: Question about request.user

2009-08-11 Thread David
This fixes the problem. Thanks Gustavo! On Aug 11, 6:07 am, Gustavo Henrique wrote: > maybe a problem with cache. > try this: > > from django.views.decorators.cache import never_cache > @never_cache > def yourview(request): >    # your code here > > -- > Gustavo Henriquehttp://www.gustavohenriq

Django, CMS, CSS newbie question

2009-08-11 Thread eldonp2
Hi, I'm new to programming. I would like to start my own website. I figured, since I don't know much, that I would start with a CSS template and work back. How can I use a free template and then integrate Django-Cms and Django into it? Thanks alot. Eldon --~--~-~--~~~

can't get comment moderation working, following docs

2009-08-11 Thread smcoll
i was having trouble enabling comment moderation in my app, so i decided to make a test app that would follow the docs at http://docs.djangoproject.com/en/dev/ref/contrib/comments/moderation/ as closely as possible. Unfortunately, moderation still isn't working for me: - If i create an Entry wit

Re: can't get comment moderation working, following docs

2009-08-11 Thread shannon
Edit: correct url is http://dpaste.com/78282/ --~--~-~--~~~---~--~~ 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, se

Re: Django, CMS, CSS newbie question

2009-08-11 Thread Juan Hernandez
you can start here www.djangobook.com On Tue, Aug 11, 2009 at 10:58 AM, eldonp2 wrote: > I would like to start my own website. I > figured, since I don't know much, that I would start with a CSS > template and work back. How can I use a free template and then > integrate Django-Cms and Django i

dates with a different format in the db

2009-08-11 Thread Vokial
Hi! In a db i have, already filled up with data, i have a varchar field which contains dates formatted like "mmdd". Is there a way to make Django recognise that field as a proper DateField even if the formatting is different than the usual "-mm-dd" ? Because i can't alter the data in that

dropping django admin change password urls

2009-08-11 Thread David De La Harpe Golden
I'm using a simple ldap authentication backend, and the admin password change functionality may need to be disabled or mangled to do the right thing (currently going for disabled, can just redirect to different password change form), as it changes the django User model password, which at best wil

How to get this auto-field id value

2009-08-11 Thread David
Hello, I am trying to retrieve an autoField id value in my following code when I update records. def update_record(request): if request.POST: form = Model_Form(request.POST) if form.is_valid(): form.save(pk=form.id, force_update=True) I got an error that "Model_F

Re: How to get this auto-field id value

2009-08-11 Thread David
Just a little more information. The autoField id is in the model class. Model_Form is a form based on this model class. On Aug 11, 9:20 am, David wrote: > Hello, > > I am trying to retrieve an autoField id value in my following code > when I update records. > > def update_record(request): >  

Re: How do I show generic relationship items with my generic inline on Django Admin page?

2009-08-11 Thread chyea
I'm still a little lost, here. I'm not sure how I'd do this. On Aug 10, 10:58 pm, chyea wrote: > Hi all, > > I've just finished reading through the docs, and following > ubernostrum's blog post about generic inlines. Generic relationships > and generic inlines are exactly what I'm looking for. T

How to show the email field in a UserCreationForm?

2009-08-11 Thread Berco Beute
Hi, I'm using the UserCreationForm for creating users, but I would like to show the email, firstname and lastname fields as well (and they should be required). Much like the view you get when adding a user through the admin interface. What's the best way to do this? Extend UserCreationForm? Or cr

Re: How to show the email field in a UserCreationForm?

2009-08-11 Thread Berco Beute
To reply to my own question...I've extended UserCreationForm as follows: == class UserCreationFormExtended(UserCreationForm): def __init__(self, *args, **kwargs): super(UserCreationFormExtended, self).__init__(*args, **kwargs) self.fields['first_name'].require

Re: How do I show generic relationship items with my generic inline on Django Admin page?

2009-08-11 Thread chyea
Oops. I don't mean to triple post, here, but I think the original post might be slightly confusing. When I say that I'd like to be able to select from existing RelatedLinks, I don't mean that I'd like to view the existing relationships between the new Entry model and the RelatedLinks model. The g

Re: Apache mod_wsgi Django setup - Forbidden You don't have permission to access /mysite on this server.

2009-08-11 Thread Gustavo Henrique
Do you using a windows ou linux? if it's linux, try: create a dir: /home/user/django and put your project inside it and create a file called mysite.wsgi in same dir containing: import os, sys sys.path.append('/usr/lib/python2.6/site-packages/django/') sys.path.append('/home/user/myproject') os.e

Deploying django on apache - cant access database

2009-08-11 Thread consiglieri
Hi I'm new with django and have made a small test app which works as it should with the development server. However when i try and deploy it with apache and mod_python I cant get it to work. I have tested that mod_python works. I can do the recommended mod_python test. When i try to run the djan

Re: Date/time field styling?

2009-08-11 Thread mhulse
Hi! > Look at the SplitDateTimeWidget in django.forms.widgets. I am sorry to be a complete noob here, but I am not sure how I can use SplitDateTimeWidget to break-up the two dat/time fields? I am actually using django-schedule: Looks lik

Re: paginator for 0.96?

2009-08-11 Thread Bobby Roberts
anyone have ideas on 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 this group, send email to django

Re: Deploying django on apache - cant access database

2009-08-11 Thread Mike Ramirez
On Tuesday 11 August 2009 09:43:38 am consiglieri wrote: > Hi > > I'm new with django and have made a small test app which works as it > should with the development server. > > However when i try and deploy it with apache and mod_python I cant get > it to work. I have tested that mod_python works.

Re: paginator for 0.96?

2009-08-11 Thread Mike Ramirez
On Tuesday 11 August 2009 10:45:53 am Bobby Roberts wrote: > anyone have ideas on this? Django Snippets has a couple http://www.djangosnippets.org/snippets/394/ and http://www.djangosnippets.org/snippets/219/ these import modules from this file: http://code.djangoproject.com/svn/django/bra

Post matching query does not exist.

2009-08-11 Thread When ideas fail
Hi, I have a strange error which i hope someone might be able to help me with. Two of my urls seems to be conflicting somehow. i have these two URLs: (r'^blog/(?P.+)/$', 'mysite.blog.views.title_view'), (r'^blog/category/(?P.+)/$', 'mysite.blog.views.category_view'),

Re: Deploying django on apache - cant access database

2009-08-11 Thread consiglieri
Thanks for the tip, however it does not make a difference. I moved the app to another catalogue and made sure that the database file was chmod to 755 and also that all directories have the same permissions. The error remains. There is something happening that i dont understand. I'm beginning to t

Re: Javascript with built-in templates tags

2009-08-11 Thread WilsonOfCanada
I want to access the string from the list that is in the dictionary: function changeArea() { alert({{list_areas.British_Columbia}}); } I get what I want in the generated HTML: function changeArea() { alert(['Metro Vancouver', 'Metro Vancouver A', 'Sunshine Coast']); } Howev

Re: syncdb with ForeignKey to_field outputs statements in wrong order

2009-08-11 Thread physicsnick
Actually they don't need to be unique (and I don't want them to be unique). MySQL does not require that foreign keys be unique; only that they be indexed. I am actually using this for a temporal database. There are many instances of an Author with the same code (an instance for each time it was c

Re: Javascript with built-in templates tags

2009-08-11 Thread Michael
On Tue, Aug 11, 2009 at 2:53 PM, WilsonOfCanada wrote: > > I want to access the string from the list that is in the dictionary: > > function changeArea() > { >alert({{list_areas.British_Columbia}}); > } > > I get what I want in the generated HTML: > > function changeArea() > { >

is Django a good choice for a LAN app?

2009-08-11 Thread snfctech
I'm about to start a fairly large project for a mid-sized business with a lot of integration with other systems (POS, accounting, website, inventory, purchasing, etc.) The purpose of the system is to try to reduce current data siloing and give employees role-based access to the specific data entry

Re: Post matching query does not exist.

2009-08-11 Thread When ideas fail
After some more experiments i've decided its definetly some sort of problem with the URLs, if i comment one out the 2nd works and if i have them uncomment it doesn't. Can anyone help me with this please? On 11 Aug, 19:30, When ideas fail wrote: > Hi, I have a strange error which i hope someone

Re: is Django a good choice for a LAN app?

2009-08-11 Thread Antoni Aloy
2009/8/11 snfctech : > > I'm about to start a fairly large project for a mid-sized business > with a lot of integration with other systems (POS, accounting, > website, inventory, purchasing, etc.) The purpose of the system is to > try to reduce current data siloing and give employees role-based >

Location of Change User admin template

2009-08-11 Thread bfrederi
I was browsing contrib/admin templates for the "Change User" template that allows you to change the user's permissions and such. I can't seem to find it though. Can anyone point me in the right direction? --~--~-~--~~~---~--~~ You received this message because you a

Re: is Django a good choice for a LAN app?

2009-08-11 Thread Joshua Russo
On Tue, Aug 11, 2009 at 6:06 PM, snfctech wrote: > > I'm about to start a fairly large project for a mid-sized business > with a lot of integration with other systems (POS, accounting, > website, inventory, purchasing, etc.) The purpose of the system is to > try to reduce current data siloing and

Re: django newbie, having problems with my first app. maybe in the urls.py?

2009-08-11 Thread ezulo...@gmail.com
AHA, both of those were the problem :) got my hello world working, im sure i'll have many more questions! Thanks!!! On Aug 10, 5:06 am, gumbah wrote: > Whoops... i see now that it never even finds your urs.py so it must be > something wrong with the configuration on webfaction... > > you have

Re: Extending Django-cms Menu

2009-08-11 Thread odonnell
Never mind, I read your question wrong. On Aug 11, 7:10 am, Alessandro Ronchi wrote: > 2009/8/11 Alessandro Ronchi > > > I have a django-cms app with this menu: > > I've partially solved my problem. > but it doesn't get get_title from the model. > > It's very strange, because I've followed the

Re: Extending Django-cms Menu

2009-08-11 Thread odonnell
Try getting it to work with one blog first. On Aug 11, 7:10 am, Alessandro Ronchi wrote: > 2009/8/11 Alessandro Ronchi > > > I have a django-cms app with this menu: > > I've partially solved my problem. > but it doesn't get get_title from the model. > > It's very strange, because I've followed

Re: is Django a good choice for a LAN app?

2009-08-11 Thread Peterle
Perhaps Zope-Plone is more suitable for that purpose. _ On Aug 11, 9:06 pm, snfctech wrote: > I'm about to start a fairly large project for a mid-sized business > with a lot of integration with other systems (POS, accounting, > website, inventory, purchasing, etc.) The purpose of

More Than Two Models With inlineformset_factory

2009-08-11 Thread Geraldo
Hi, I'm new to Django and am putting together a page for my new site. I want to be able to edit data that is contained in 3 models, organized as follows: Parent --> Child 1 (always one to one) --> Child 2 (one or more) I understand I can do the following: class Parent(models.Model): name

Re: Apache mod_wsgi Django setup - Forbidden You don't have permission to access /mysite on this server.

2009-08-11 Thread Graham Dumpleton
On Aug 12, 12:13 am, justin jools wrote: > Ive been the install instructions in > :http://wiki.thinkhole.org/howto:django_on_windows%E2%80%8F > (with mod_wsgi) > > install python 26, Apache 2.2, modwsgi ap2.2 py26 > > and apache loads modwsgi fine. > > when I check localhost: apache says - It

Django aggregates and having

2009-08-11 Thread lfrodrigues
Hi, I'm having some problems with "having": I want to group by date and restrict to a given week, in my tests I can do this: select_data = {"d": """date_format(date, '%%U')"""} ScoreHistory.objects.extra(select=select_data).values('d').annotate (l=Sum("points")).filter(l=2).query.as_sql() sql:

Re: is Django a good choice for a LAN app?

2009-08-11 Thread Matthias Kestenholz
On Tue, Aug 11, 2009 at 10:00 PM, Peterle wrote: > > Perhaps Zope-Plone is more suitable for that purpose. Perhaps not. Do you have anything to back this statement? (I'm not saying it's untrue, I'm just trying to point out that this contribution wasn't particularly helpful. A bit more on topic:

Re: More Than Two Models With inlineformset_factory

2009-08-11 Thread Matthias Kestenholz
On Tue, Aug 11, 2009 at 10:04 PM, Geraldo wrote: > > Hi, > > I'm new to Django and am putting together a page for my new site.  I > want to be able to edit data that is contained in 3 models, organized > as follows: > Parent >  --> Child 1 (always one to one) >  --> Child 2 (one or more) > > I und

Re: Deploying django on apache - cant access database

2009-08-11 Thread Graham Dumpleton
For SQLite database, the directory the database is in must also be writable to user that Apache runs as. The location of the database in settings file must also be an absolute path, can't use a relative path. BTW, what is: Alias test.django.com "/Users/someone/djangoproject/appname" for in co

Model example for simple family tree

2009-08-11 Thread sniper
Hi, I am new to django and wanted to try it out. I would like to create a table for family tree where Relation is a many to many table which contains Profile ids profile_id, relative_id,type,priority. RELATIVE_CHOICES = ( (u'F', u'Father'), (u'M', u'Mother'), (u'B', u'Br

Re: Post matching query does not exist.

2009-08-11 Thread Daniel Roseman
On Aug 11, 8:27 pm, When ideas fail wrote: > After some more experiments i've decided its definetly some sort of > problem with the URLs, if i comment one out the 2nd works and if i > have them uncomment it doesn't. > > Can anyone help me with this please? > > On 11 Aug, 19:30, When ideas fail w

Re: More Than Two Models With inlineformset_factory

2009-08-11 Thread Geraldo
Excellent, Matthias... That should work nicely. It does appear, however, that there is no way to have more than 2 forms in a single formset. If inlineformset_factory had an append method things might be a bit cleaner. Thanks again for your help. geraldo On Aug 11, 3:55 pm, Matthias Kestenholz

Re: Model example for simple family tree

2009-08-11 Thread Mike Dewhirst
sniper wrote: > Hi, > I am new to django and wanted to try it out. > > I would like to create a table for family tree > where Relation is a many to many table which contains Profile ids > > profile_id, relative_id,type,priority. > > RELATIVE_CHOICES = ( > (u'F', u'Father'), > (u

Re: imitating a spreadsheet (kind of) with formsets

2009-08-11 Thread Chris Curvey
On Aug 10, 10:13 pm, Malcolm Tredinnick wrote: > On Mon, 2009-08-10 at 19:07 -0700, Chris Curvey wrote: > > What I want to do is have a series of forms, all next to each other in > > table format, like this: > > > Car     Honda      Toyota       Chevy > > Price   $12,000    $14,000   $10,000 >

Re: inspectdb and postgresql schema

2009-08-11 Thread Russell Keith-Magee
On Tue, Aug 11, 2009 at 10:41 PM, Marek Pietrucha wrote: > > Hello, > > I have a relational database written in PostgreSQL 8.4. I use > different schemas - not default public schema. I tried to inspectdb my > database but the output was clean. It looked like the inspectdb tool > didn't look in my

AUTH_PROFILE_MODULE in "Definitive Guide" Second Edition?

2009-08-11 Thread Watts Martin
I've noticed with some mild consternation that there's absolutely no documentation for using AUTH_PROFILE_MODULE in the new edition of _Definitive Guide to Django,_ nor is there any indication of something else I should be using instead of that if this is being deprecated. So is this safe to use?

Re: How to get this auto-field id value

2009-08-11 Thread David
Any tips/suggestions are highly appreciated... On Aug 11, 9:26 am, David wrote: > Just a little more information. The autoField id is in the model > class.  Model_Form is a form based on this model class. > > On Aug 11, 9:20 am, David wrote: > > > > > Hello, > > > I am trying to retrieve an a

Re: AUTH_PROFILE_MODULE in "Definitive Guide" Second Edition?

2009-08-11 Thread James Bennett
On Tue, Aug 11, 2009 at 7:16 PM, Watts Martin wrote: > I've noticed with some mild consternation that there's absolutely no > documentation for using AUTH_PROFILE_MODULE in the new edition of > _Definitive Guide to Django,_ nor is there any indication of something > else I should be using instead

Re: Date-based generic view not working

2009-08-11 Thread Thomas Jaggi
It was in fact the timezone. A few hours later it magically worked. ;) Thanks for your help! --~--~-~--~~~---~--~~ 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@goog

Re: AUTH_PROFILE_MODULE in "Definitive Guide" Second Edition?

2009-08-11 Thread Watts Martin
On Aug 11, 5:30 pm, James Bennett wrote: > Seeing as how Django's documentation still covers everything you need > to know about it, it's unlikely there's something newer you're > missing. I didn't *think* so, but I am very good at making assumptions that prove to be wrong in practice! > It's t

  1   2   >