Re: Making session data visible to all templates?

2006-07-07 Thread shredwheat
Thanks, this is exactly what I was after. After setting this up, I realized I had a few render_to_response calls of my own that weren't building a RequestContext. Working great for me. Everytime I think I'm starting to get a handle on how django works, another facet like this is revealed. Adria

Re: Deploying and set up on shared hosting?

2006-07-07 Thread Harish Mallipeddi
On 7/8/06, Iain Duncan <[EMAIL PROTECTED]> wrote: I'm new to Django, but have a project done that must go up live nextweek for a client. However, it's just glamorized brochure ware with and admin interface, so they likely want to use shared hosting. Can anyonetell me:- Recomendations for reliable s

Re: where to put template tags post mr

2006-07-07 Thread Kenneth Gonsalves
On 07-Jul-06, at 5:35 PM, Malcolm Tredinnick wrote: > In django/templatetags/__init__.py, try putting in some printing there > (what does __path__ end up looking like, for example). Maybe in the > ImportError exception block, catch the exception and print it out > to see > if you are raising s

Re: Specify order of content items

2006-07-07 Thread David Robinson
drakepad wrote: > Thanks for clarifying the issue Arthur. Drag and drop support would be > fantastic indeed... We've got the same sort of need to specify the order of news items. And we have done it using Dojo's drag and drop. I'm not the one who did it, but the guy who did get it to work wro

Re: development/production mode

2006-07-07 Thread Kenneth Gonsalves
On 08-Jul-06, at 7:50 AM, Iain Duncan wrote: > > >>> Do most shared hosting providers allow one to do that? I would have >>> thought not >> >> >> not - unless you are on vps hosting with root access, mod_python is >> not an option unless your provider is kind enough to restart apache >> reg

Re: Deploying and set up on shared hosting?

2006-07-07 Thread Iain Duncan
Jay Parlar wrote: > Probably WebFaction (formerly python-hosting.com) would be your best > bet: http://www.webfaction.com/shared_hosting That looks sweet. Anyone else have any feedback on these guys? Iain --~--~-~--~~~---~--~~ You received this message because

Re: development/production mode

2006-07-07 Thread Iain Duncan
>>Do most shared hosting providers allow one to do that? I would have >>thought not > > > not - unless you are on vps hosting with root access, mod_python is > not an option unless your provider is kind enough to restart apache > regularly with a cron job - even that may not be enough

Re: unique and blank/null

2006-07-07 Thread Don Arbow
Right, I noticed this as I was skimming the new posts after sending, sorry. Don --~--~-~--~~~---~--~~ 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@googlegrou

Re: PostgreSQL vs. MySQL

2006-07-07 Thread Iain Duncan
> One of the big advantages of MySQL is ease of use and a choice when it comes > to how you store data. For example: if you need fast reads and less updates, > make your table MyISAM (you can even compress it making it smaller and > faster!). If you need high availability of your data, you can

Re: unique and blank/null

2006-07-07 Thread Malcolm Tredinnick
Whoops. Didn't reply to group automatically (now I discovered some new and interesting behaviour in the way Evolution prioritises reply fields). Forwarded Message From: Malcolm Tredinnick <[EMAIL PROTECTED]> To: Kilian CAVALOTTI <[EMAIL PROTECTED]> Subject: Re: unique and blank

Re: development/production mode

2006-07-07 Thread Kenneth Gonsalves
On 08-Jul-06, at 6:00 AM, Iain Duncan wrote: > Do most shared hosting providers allow one to do that? I would have > thought not not - unless you are on vps hosting with root access, mod_python is not an option unless your provider is kind enough to restart apache regularly with a cron

Re: Deploying and set up on shared hosting?

2006-07-07 Thread Jay Parlar
Probably WebFaction (formerly python-hosting.com) would be your best bet: http://www.webfaction.com/shared_hosting They're one of the few hosts that explicitly support Django. GypsyHosting would be the best way to go, but I don't think Jacob is taking new subscribers right now. I've been really

Re: unique and blank/null

2006-07-07 Thread Malcolm Tredinnick
On Fri, 2006-07-07 at 12:03 -0700, Don Arbow wrote: > On Jul 7, 2006, at 3:57 AM, Malcolm Tredinnick wrote: > >> > >> Actually, with SQLite at least, it seems that multiple NULL values > >> are > >> considered non unique. Could you be a bit more careful when trimming the attribution lines pleas

Re: Deploying and set up on shared hosting?

2006-07-07 Thread Kenneth Gonsalves
On 08-Jul-06, at 2:48 AM, Iain Duncan wrote: > - Recomendations for reliable shared hosting that is Django friendly > with service to the developer ( me ) being more important than price. subject to price considerations, i would suggest zettai vps > > - How does one deal with the "restart apach

Re: PostgreSQL vs. MySQL

2006-07-07 Thread Kenneth Gonsalves
On 08-Jul-06, at 3:56 AM, Ian Holsman wrote: > guys... > this is turning into a religious debate. given the nature of the question, it was inevitable, but i agree we could stop here -- regards kg http://lawgon.livejournal.com http://avsap.org.in --~--~-~--~~~

Re: development/production mode

2006-07-07 Thread Kenneth Gonsalves
On 08-Jul-06, at 1:37 AM, Iain Duncan wrote: > > This is my first time using mod_python in production, how do you > handle > the need to restart apache? when you need to restart apache, you restart it -- regards kg http://lawgon.livejournal.com http://avsap.org.in --~--~-~--~---

Re: development/production mode

2006-07-07 Thread Iain Duncan
Wade Leftwich wrote: > Iain Duncan wrote: > how do you handle changes on a site which is already online (talking about changing models and/or views)? >>> >>> >>>I typically maintain a duplicate setup on a testing machine (in my >>>case, a laptop running Linux) and use that for developme

Re: mod_python autoreload acts unpredictable

2006-07-07 Thread Kenneth Gonsalves
On 08-Jul-06, at 12:37 AM, x0nix wrote: > Yeah, in ideal world, in HUGE corporation :-) > In real world, in tiny company we need to make a modification, test it > and deploy within few hours and as simply as possible. i am a one man shop - but i follow that procedure. > > Of course we do coding

Re: Using an application more than once in a project

2006-07-07 Thread Kenneth Gonsalves
On 08-Jul-06, at 12:10 AM, Ahmad Alhashemi wrote: > Besides, symlinking is an OS feature, not a feature of Django. I do > all > my development on Windows, so I can't use it. there is a utility for that -- regards kg http://lawgon.livejournal.com http://avsap.org.in --~--~-~--~--

Re: Users Can't Log Into Admin

2006-07-07 Thread Kenneth Gonsalves
On 07-Jul-06, at 11:11 PM, keukaman wrote: > Also, I'm unsure what "Use '[algo]$[salt]$[hexdigest]'" means just > below the password field when setting up the account. at python prompt: import md5 passwd = md5.new('yourpassword').hexdigest() print passwd cut and paste the result in the passwd

Re: Specify order of content items

2006-07-07 Thread drakepad
Thanks for clarifying the issue Arthur. Drag and drop support would be fantastic indeed... Would a series of up/down buttons be easier to implement? In the meantime, I'll use intervals between the individual items' position values to leave some room for maneuver. Ciao! On 7/8/06, arthur debert

Re: Using a Django project in a python script.

2006-07-07 Thread [EMAIL PROTECTED]
As someone mentioned, you'll have to set the DJANGO_SETTINGS_MODULE variable before invoking your python script but remember to add your django project to the Python path as well. Assuming your project is on a Projects directory this should work (Linux bash): $ export DJANGO_SETTINGS_MODULE=your

Re: mod_python autoreload acts unpredictable

2006-07-07 Thread Kenneth Gonsalves
On 07-Jul-06, at 10:52 PM, x0nix wrote: > Well ... I don't like the idea of every programmer (after every minor > change) logging in as root to production server. i dont like it too - but it is far better than having autoreload on for mod_python on a production server. You have just thrown aw

Re: Specify order of content items

2006-07-07 Thread arthur debert
Hi drakepad. I am not aware of a good way to implement this, but this is how I have been doing it...If you must have an arbitrary order (not by date or alphabetical) you must create a field specifically to store your desired order. class MyModel(Model): ... regular fields go here... posi

Specify order of content items

2006-07-07 Thread drakepad
Hello everybody, Suppose I want to manually specify the order in which a number of content items are displayed in a page (e.g. list of menu items). I want to be able to control the ordering from the admin interface, using for example an 'ordering' weight for each individual item. - What would b

Re: PostgreSQL vs. MySQL

2006-07-07 Thread Ian Holsman
guys... this is turning into a religious debate. I think the question has been answered. both are excellent choices. and in the hands of an expert can be made to shine. On 08/07/2006, at 8:18 AM, Geert Vanderkelen wrote: > > Don Arbow wrote: >> On Jul 7, 2006, at 3:35 AM, Kenneth Gonsalves wro

Re: PostgreSQL vs. MySQL

2006-07-07 Thread Geert Vanderkelen
Don Arbow wrote: > On Jul 7, 2006, at 3:35 AM, Kenneth Gonsalves wrote: >> another thing, your have to be careful about postgresql is that data >> recovery tools for a borked db for postgres are rare to the point of >> non-existence, whereas there are lots of them for mysql > > > Perhaps MySQL b

Re: Using an application more than once in a project

2006-07-07 Thread scaba
Ahmad Alhashemi wrote: > Besides, symlinking is an OS feature, not a feature of Django. I do all > my development on Windows, so I can't use it. You can do the same on Windows (if you use NTFS). Get junction from Sysinternals: http://www.sysinternals.com/Utilities/Junction.html Use it like so:

Re: mod_python autoreload acts unpredictable

2006-07-07 Thread x0nix
> Um, you earlier stated that the problem was that you have > "PythonAutoReload On". That's not on your production server is it? > Generally, that setting would only be used in a testing environment. Oh I didn't notice that it should be used only for testing, thanks for info. > And do you really

Re: development/production mode

2006-07-07 Thread Wade Leftwich
Iain Duncan wrote: > >>how do you handle changes on a site which is already online (talking > >>about changing models and/or views)? > > > > > > I typically maintain a duplicate setup on a testing machine (in my > > case, a laptop running Linux) and use that for development and > > testing, then w

Deploying and set up on shared hosting?

2006-07-07 Thread Iain Duncan
I'm new to Django, but have a project done that must go up live next week for a client. However, it's just glamorized brochure ware with and admin interface, so they likely want to use shared hosting. Can anyone tell me: - Recomendations for reliable shared hosting that is Django friendly with se

Re: mod_python autoreload acts unpredictable

2006-07-07 Thread Waylan Limberg
On 7/7/06, x0nix <[EMAIL PROTECTED]> wrote: > > Yeah, in ideal world, in HUGE corporation :-) > In real world, in tiny company we need to make a modification, test it > and deploy within few hours and as simply as possible. > > Of course we do coding 'n testing on other machine, but restart apache

Re: development/production mode

2006-07-07 Thread Iain Duncan
>>how do you handle changes on a site which is already online (talking >>about changing models and/or views)? > > > I typically maintain a duplicate setup on a testing machine (in my > case, a laptop running Linux) and use that for development and > testing, then when I know I've got the bugs w

Re: mod_python autoreload acts unpredictable

2006-07-07 Thread x0nix
I found this message by Graham Dumpleton where he explains the problem: http://www.modpython.org/pipermail/mod_python/2006-January/020079.html I belive this is the explanation: > When you see what you expect, it is because the request was handled by a > different Apache child process which had n

file upload

2006-07-07 Thread Jay
Hi, Love Django! I can't figure out, however, how to upload files. The only examples I find are post-magic-removal. I'd ask on the irc channel, but I can't reach it. To make it as basic as possible, I just made a Supplement class with a foreign key to the logged-in User, and a FileField. I did

Re: mod_python autoreload acts unpredictable

2006-07-07 Thread x0nix
Glenn Tenney napsal: > On Fri, Jul 07, 2006 at 10:22:12AM -0700, x0nix wrote: > > Well ... I don't like the idea of every programmer (after every minor > > change) logging in as root to production server. > > You shouldn't have your programmers logging in to a production server > to do testing eve

Re: Using an application more than once in a project

2006-07-07 Thread RajeshD
Ahmad, You don't even need a symlink to achieve this. If you expect to reuse this app in multiple Django projects, just make sure it is in your Python path and you can simply add it to your projects' settings.INSTALLED_APP list. This is exactly like using the Django admin app in multiple projec

Re: unique and blank/null

2006-07-07 Thread Don Arbow
On Jul 7, 2006, at 3:57 AM, Malcolm Tredinnick wrote: >> >> Actually, with SQLite at least, it seems that multiple NULL values >> are >> considered non unique. NULL is not a value, it is the lack of a value. In database theory, you cannot compare one NULL against another NULL or against a va

Re: Using an application more than once in a project

2006-07-07 Thread RajeshD
Julio is right that you can use the same app in multiple Django projects from the same common path. The key point here is that each Django project runs in a separate Python runtime environment. This is what makes this possible. If you really meant using two instances of an app in the _same_ Djang

Re: Using an application more than once in a project

2006-07-07 Thread Ahmad Alhashemi
Thank you for the tip, Julio. It is sure going to be useful practically. But it doesn't feel right. The fact that you trick django into thinking that there are multiple physical copies of the same application just to use it more than once in one website. Besides, symlinking is an OS feature, not

Re: mod_python autoreload acts unpredictable

2006-07-07 Thread Glenn Tenney
On Fri, Jul 07, 2006 at 10:22:12AM -0700, x0nix wrote: > Well ... I don't like the idea of every programmer (after every minor > change) logging in as root to production server. You shouldn't have your programmers logging in to a production server to do testing even if there were no issues about

is django support permanent connection?

2006-07-07 Thread [EMAIL PROTECTED]
Hello, I'm using mod_python+postgresql+tsearch2 and django from trunk. After making a new connection to postgresql, the first query which uses some tserach2 function is time consuming. All next queries run fast. I don't know exactly what is the cause but I suppose the tsearch2 machinery is lazy

Re: Users Can't Log Into Admin

2006-07-07 Thread Jonathan Henry
You can add this to one of your models.py to get a behaviour close to what you're describing: from django.contrib.auth.models import User def user_save(self): if not self.password.startswith('sha1$'): self.set_password(self.password) super(User, self).save() User.save = user_save

Re: displaying and image

2006-07-07 Thread RajeshD
Are you using the Django built-in development server ('manage.py runserver') or a deployment under a regular web server? If using Django, you will need to set it up to serve static files for you. See this doc: http://www.djangoproject.com/documentation/static_files/ Please beware that this metho

Re: Users Can't Log Into Admin

2006-07-07 Thread keukaman
Thanks. I took a shortcut and pasted the hash from the superuser into each account. Then I went into each and used the "change password" link. This created a hash for each. It seems that it would be easier when creating a user through the admin to create a user friendly password which is then tr

Re: Users Can't Log Into Admin

2006-07-07 Thread Jeremy Dunck
On 7/7/06, keukaman <[EMAIL PROTECTED]> wrote: > Also, I'm unsure what "Use '[algo]$[salt]$[hexdigest]'" means just > below the password field when setting up the account. Based on that, I assume you've put the actual password in the database. Instead, django expects a hash of the actual passwor

Users Can't Log Into Admin

2006-07-07 Thread keukaman
I created 2 users in my admin site. When I try to login with their username and password I get the following message: Please enter a correct username and password. Note that both fields are case-sensitive. Any ideas why this may occur, even though I have the correct username and password? Also,

Re: mod_python autoreload acts unpredictable

2006-07-07 Thread x0nix
Kenneth Gonsalves napsal: > On 07-Jul-06, at 9:19 PM, x0nix wrote: > > > After apache restart everything is ok (until I make another change in > > my code) > > that has happened to me at times - my solution is: always restart > apache on changes - no big deal, keep a terminal for this and press >

Re: mod_python autoreload acts unpredictable

2006-07-07 Thread Kenneth Gonsalves
On 07-Jul-06, at 9:19 PM, x0nix wrote: > After apache restart everything is ok (until I make another change in > my code) that has happened to me at times - my solution is: always restart apache on changes - no big deal, keep a terminal for this and press up arrow and enter -- regards kg

Re: Update form for nested one-to-many

2006-07-07 Thread Spider
I just noticed ticket #2107 "Adding an object and several related objects at once with manipulators isn't documented." That sounds like what I want, although I'm now leaning towards just writing the code. --~--~-~--~~~---~--~~ You received this message because you

Re: Update form for nested one-to-many

2006-07-07 Thread Spider
Additional information : I'm using the development version of django (from the svn repository). --~--~-~--~~~---~--~~ 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

Re: PostgreSQL vs. MySQL

2006-07-07 Thread Don Arbow
On Jul 7, 2006, at 3:35 AM, Kenneth Gonsalves wrote: > > another thing, your have to be careful about postgresql is that data > recovery tools for a borked db for postgres are rare to the point of > non-existence, whereas there are lots of them for mysql Perhaps MySQL borks its databases much mo

Update form for nested one-to-many

2006-07-07 Thread Spider
I've just started using Django (and I'm very impressed), but I'm not sure of the "official" way to handle updates for my latest application, which records a timetable of regular visits by a person to somewhere. The structure (somewhat simplified) is : A VISIT has a start time and and end time (bu

Re: Using an application more than once in a project

2006-07-07 Thread Julio Nobrega
Sure. All Django/Python cares about is where the folder (module) is. Here's what I do sometimes: Create an app on my /home/ dir and symlink it inside the projects. So I am just re-using the same codebase on different projects, and getting the benefit of its changes/upgrades/development. On 7

Re: FIXED - file upload with flash 8 uploader

2006-07-07 Thread Don Arbow
On Jul 7, 2006, at 6:17 AM, spako wrote:i think... here's the patch:/django/http/__init__.pyIndex: __init__.py===--- __init__.py (revision 3287)+++ __init__.py (working copy)@@ -48,7 +48,7 @@     POST = MultiValueDict()     FILES = Mul

Using an application more than once in a project

2006-07-07 Thread Ahmad Alhashemi
Hi, Is it possible to use the same application more than once in the same project? For example, if I download a ready made weblog application, can I use it in one place as a general purpose weblog and in another place as a seperate development weblog? TIA. --Ahmad --~--~-~--~~---

Re: mod_python autoreload acts unpredictable

2006-07-07 Thread x0nix
Only one mod_python running (but I intend to run more than one - is it going to be a problem?). After apache restart everything is ok (until I make another change in my code). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: file upload with flash 8 uploader

2006-07-07 Thread arthur debert
On macrodobe's site, there's a reference implementation of php receiveing the flash upload. it's php, but you can have an idea of where things are on the request: http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=1591.html The flash

Re: Date and fileupload fields

2006-07-07 Thread Tyson Tate
On Jul 7, 2006, at 1:23 AM, bernadet wrote: > hii, > > I am writing my own forms, using manipulators and custom manipulators. > I have a date field and uploadimage field in one of the forms. > > I need to create a popup calendar for the date field in the html page, > and a button for the image fi

Re: About reverse queries in FK relationships

2006-07-07 Thread Kilian CAVALOTTI
On Friday 07 July 2006 14:17, Malcolm Tredinnick wrote: > Let's try this again... take two... (it's still an interesting > question).. I'm glad it took you some time to answer, I always feel reassuring to see that more skilled people scratch their head on my problems too. I feel less dumb. :))

Re: displaying and image

2006-07-07 Thread ama55
i did what is written in the documentation in my templated i tried: and but this didnot work. i even tried to give it the path manually to check if it uploading a pic but that also didnot work ie:. note that when idid so i opened the html file manually and the image was displayed what can

Re: Generic views and dates in the future

2006-07-07 Thread Jan Claeys
On do, 2006-07-06 at 17:03 -0400, Jay Parlar wrote: > On 7/6/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > > > On 7/6/06, Jay Parlar <[EMAIL PROTECTED]> wrote: > > > What's the justification for the date based generic views not showing > > > dates in the future? > > > > The justification is:

Re: unique and blank/null

2006-07-07 Thread Kilian CAVALOTTI
On Friday 07 July 2006 12:57, Malcolm Tredinnick wrote: > Maybe there is some oddity about your circumstances. Can you post more > details if you are really seeing NULL values being treated distinctly, > please? Actually, it may not been SQLite related, after all. I narrowed the problem to the w

Re: Django and Oracle, again

2006-07-07 Thread BP
My testing procedure was simple. Typed DATABASE_ENGINE = 'oracle' in settings.py and tried initializing that (with proper credentials, of course). It just failed, on the basic model taken directly from the 1st part of the official tutorial. The error was "incorrect character" so I guess noone too

Re: displaying and image

2006-07-07 Thread Malcolm Tredinnick
On Fri, 2006-07-07 at 13:43 +, ama55 wrote: > Hi everyone: > i have a person module i am able to upload an image related to the > person > this is in mmy module file > image = models.ImageField(upload_to = > 'training/admin/templates/pictures'). > it is saving the image in the folder. > th

displaying and image

2006-07-07 Thread ama55
Hi everyone: i have a person module i am able to upload an image related to the person this is in mmy module file image = models.ImageField(upload_to = 'training/admin/templates/pictures'). it is saving the image in the folder. the problem is that when i am not able to display the image on my

Re: file upload with flash 8 uploader

2006-07-07 Thread Malcolm Tredinnick
On Fri, 2006-07-07 at 11:42 +, spako wrote: > i've added some print statements in the django code like this: > > Index: __init__.py > === > --- __init__.py (revision 3287) > +++ __init__.py (working copy) > @@ -39,6 +

FIXED - file upload with flash 8 uploader

2006-07-07 Thread spako
i think... here's the patch: /django/http/__init__.py Index: __init__.py === --- __init__.py (revision 3287) +++ __init__.py (working copy) @@ -48,7 +48,7 @@ POST = MultiValueDict() FILES = MultiValueDict() for submes

Dynamic Form Questions

2006-07-07 Thread ChaosKCW
Hi I have come back to Django after a short break and am finding the new trunk with the old MR branch a lovely tool indeed :-) Kudos. I am trying to balance the development and maintance time going forward with the development time now with run time performance. I really like the way the admin

Re: Where to put custom sql?

2006-07-07 Thread Filipe
I think this may be it. The document you pointed out says the following: "Adding extra Manager methods is the preferred way to add "table-level" functionality to your models. (For "row-level" functionality -- i.e., functions that act on a single instance of a model object -- use Model methods, no

Re: PostgreSQL vs. MySQL

2006-07-07 Thread Malcolm Tredinnick
On Fri, 2006-07-07 at 14:38 +0200, Geert Vanderkelen wrote: > Malcolm Tredinnick wrote: > > I would add, for most projects, it's not a really clear cut case. Django > > hides the SQL oddities for you, so there's not going to much difference > > there (using MySQL 5 with transaction support is ki

Re: Getting the Django Admin Working in Apache

2006-07-07 Thread Jonathan Buchanan
> If I do this.. the whole administration interface will work straight > away? Or will it need additional configuration? I was assuming you'd already configured mod_python and the admin app just couldn't find its media files - if that's not the case, have a look at http://www.djangoproject.com/d

Re: PostgreSQL vs. MySQL

2006-07-07 Thread Geert Vanderkelen
Hi James, Thomas, James Bennett wrote: > On 7/7/06, Thomas Ashelford <[EMAIL PROTECTED]> wrote: >> I keep reading that PostgreSQL is the preferred database for use with >> Django, but I'm wondering if anyone can explain what its concrete >> advantages are. > > The advantages of Postgres are most

Re: PostgreSQL vs. MySQL

2006-07-07 Thread Geert Vanderkelen
Hi Malcolm, Tomas, Malcolm Tredinnick wrote: > Hi Thomas, > > On Thu, 2006-07-06 at 23:17 -0700, Thomas Ashelford wrote: >> I keep reading that PostgreSQL is the preferred database for use with >> Django, but I'm wondering if anyone can explain what its concrete >> advantages are. I go also wit

Re: 'Manager' object has no attribute 'get_or_create'

2006-07-07 Thread pault
No I just found out what the problem was I still had an old version installed django egg v0.94 (without get_or_create ) Pretty stupid but thanks a lot --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: Getting the Django Admin Working in Apache

2006-07-07 Thread [EMAIL PROTECTED]
If I do this.. the whole administration interface will work straight away? Or will it need additional configuration? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: mod_python autoreload acts unpredictable

2006-07-07 Thread Kenneth Gonsalves
On 07-Jul-06, at 5:47 PM, x0nix wrote: > I am trying to use Django with mod_python and I am experiencing > strange > auto-reload behavior. When I make any changes in my project, it seems, > that server shows random "version" of that page since last apache > restart. do you have more than one

Re: 'Manager' object has no attribute 'get_or_create'

2006-07-07 Thread Malcolm Tredinnick
On Fri, 2006-07-07 at 11:27 +, pault wrote: > yes i am using the latest checkout version (on a windows xp pc with > mysql) > > class Text(models.Model): > tag = models.CharField(maxlength=50) > tstamp = models.DateTimeField(auto_now_add=True) > > def __str__(self): >

Re: About reverse queries in FK relationships

2006-07-07 Thread Malcolm Tredinnick
On Fri, 2006-07-07 at 12:16 +0200, Kilian CAVALOTTI wrote: > Hi all, > > I have a question about reverse queries in ForeignKey relationships. Taking > the example given in > , I know that > I can filter the Reporter objects to get

mod_python autoreload acts unpredictable

2006-07-07 Thread x0nix
Hi folks, I am trying to use Django with mod_python and I am experiencing strange auto-reload behavior. When I make any changes in my project, it seems, that server shows random "version" of that page since last apache restart. In apache config I've PythonAutoReload On. Any ideas, similar exper

Re: where to put template tags post mr

2006-07-07 Thread Malcolm Tredinnick
On Fri, 2006-07-07 at 17:24 +0530, Kenneth Gonsalves wrote: > > On 07-Jul-06, at 9:25 AM, Malcolm Tredinnick wrote: > > > > > On Fri, 2006-07-07 at 09:00 +0530, Kenneth Gonsalves wrote: > >> > >> On 07-Jul-06, at 8:41 AM, Ian Holsman wrote: > >> > >>> > >>> app/templatetags/ ? > >> > >> thats wh

Re: unique and blank/null

2006-07-07 Thread Malcolm Tredinnick
On Fri, 2006-07-07 at 17:25 +0530, Kenneth Gonsalves wrote: > > On 07-Jul-06, at 5:17 PM, Kenneth Gonsalves wrote: > > > > > > > On 07-Jul-06, at 4:08 PM, Kilian CAVALOTTI wrote: > > > >> I created a model with a CharField which has to be NULL in the > >> database. So I > >> gave it blank=True,

Re: unique and blank/null

2006-07-07 Thread Malcolm Tredinnick
On Fri, 2006-07-07 at 17:17 +0530, Kenneth Gonsalves wrote: > > On 07-Jul-06, at 4:08 PM, Kilian CAVALOTTI wrote: > > > I created a model with a CharField which has to be NULL in the > > database. So I > > gave it blank=True, null=True and unique=True options. I have to > > allow NULL > > va

Re: unique and blank/null

2006-07-07 Thread Kenneth Gonsalves
On 07-Jul-06, at 5:17 PM, Kenneth Gonsalves wrote: > > > On 07-Jul-06, at 4:08 PM, Kilian CAVALOTTI wrote: > >> I created a model with a CharField which has to be NULL in the >> database. So I >> gave it blank=True, null=True and unique=True options. I have to >> allow NULL >> values in the data

Re: where to put template tags post mr

2006-07-07 Thread Kenneth Gonsalves
On 07-Jul-06, at 9:25 AM, Malcolm Tredinnick wrote: > > On Fri, 2006-07-07 at 09:00 +0530, Kenneth Gonsalves wrote: >> >> On 07-Jul-06, at 8:41 AM, Ian Holsman wrote: >> >>> >>> app/templatetags/ ? >> >> thats what is not working > > It should work. You have some other problem going on. The stan

Re: Store and retrieve template code from database

2006-07-07 Thread plungerman
thanks to everyone for all of your assistance. in the end, i created a custom template loader that pulls templates from a database table, based on the dbtemplate loader that georg created for his cms system. i already had a data model so creating the loader and adding the correct incantations to

Re: unique and blank/null

2006-07-07 Thread Kenneth Gonsalves
On 07-Jul-06, at 4:08 PM, Kilian CAVALOTTI wrote: > I created a model with a CharField which has to be NULL in the > database. So I > gave it blank=True, null=True and unique=True options. I have to > allow NULL > values in the database, as well as blank values in admin, but in > the same

Re: file upload with flash 8 uploader

2006-07-07 Thread spako
i've added some print statements in the django code like this: Index: __init__.py === --- __init__.py (revision 3287) +++ __init__.py (working copy) @@ -39,6 +39,8 @@ return '' def parse_file_upload(header_dict, post_data)

Re: About reverse queries in FK relationships

2006-07-07 Thread Malcolm Tredinnick
On Fri, 2006-07-07 at 21:23 +1000, Malcolm Tredinnick wrote: [...] > Reporter.objects.filter(article = None) > > will give you the list you want. I'll add something to the documentation > to make this more explicit once I work out how to phrase it. Ignore this; it is rubbish! Not

Re: 'Manager' object has no attribute 'get_or_create'

2006-07-07 Thread pault
yes i am using the latest checkout version (on a windows xp pc with mysql) class Text(models.Model): tag = models.CharField(maxlength=50) tstamp = models.DateTimeField(auto_now_add=True) def __str__(self): return self.tag class Admin:

Re: About reverse queries in FK relationships

2006-07-07 Thread Malcolm Tredinnick
On Fri, 2006-07-07 at 12:16 +0200, Kilian CAVALOTTI wrote: > Hi all, > > I have a question about reverse queries in ForeignKey relationships. Taking > the example given in > , I know that > I can filter the Reporter objects to get

Re: file upload with flash 8 uploader

2006-07-07 Thread spako
have gotten the following reqeust header, from a header monitor. i also get an error prointed which i will paste below. also i've pasted the view here, it doesn't seem like the request gets to the view. i have tried hitting the view directly in the browser and that works fine. --- view def

Re: 'Manager' object has no attribute 'get_or_create'

2006-07-07 Thread Malcolm Tredinnick
On Fri, 2006-07-07 at 10:53 +, pault wrote: > I receive > 'Manager' object has no attribute 'get_or_create' > > I keep on getting this error in this code: > try: >desc = 'blabla' >t, created = Text.objects.get_or_create(tag=desc) > except Exception, e: >str(e) > i am using the dev

Re: unique and blank/null

2006-07-07 Thread Malcolm Tredinnick
On Fri, 2006-07-07 at 12:38 +0200, Kilian CAVALOTTI wrote: > Hi all, > > I created a model with a CharField which has to be NULL in the database. So I > gave it blank=True, null=True and unique=True options. I have to allow NULL > values in the database, as well as blank values in admin, but in

'Manager' object has no attribute 'get_or_create'

2006-07-07 Thread pault
I receive 'Manager' object has no attribute 'get_or_create' I keep on getting this error in this code: try: desc = 'blabla' t, created = Text.objects.get_or_create(tag=desc) except Exception, e: str(e) i am using the development version and maybe thats the reason for the error --~--~--

unique and blank/null

2006-07-07 Thread Kilian CAVALOTTI
Hi all, I created a model with a CharField which has to be NULL in the database. So I gave it blank=True, null=True and unique=True options. I have to allow NULL values in the database, as well as blank values in admin, but in the same time, I'd like to be sure that non NULL values are unique.

Re: PostgreSQL vs. MySQL

2006-07-07 Thread Kenneth Gonsalves
On 07-Jul-06, at 3:18 PM, Malcolm Tredinnick wrote: > I would say "pick on" and if your experience over time suggests > that the > database is a problem and tests with the alternative work better, then > it's not even *that* painful to move data between the two systems. > They > both basical

About reverse queries in FK relationships

2006-07-07 Thread Kilian CAVALOTTI
Hi all, I have a question about reverse queries in ForeignKey relationships. Taking the example given in , I know that I can filter the Reporter objects to get those who have associated Articles, based on Article properties:

Re: file upload with flash 8 uploader

2006-07-07 Thread Malcolm Tredinnick
On Fri, 2006-07-07 at 09:50 +, spako wrote: > hi > > i'm building a site with which will let the public upload files (after > registration) to the site. i'm going to use flash to upload the files > since the files will be large and with the new flash you can see the > progress of an upload. >

Re: file upload with flash 8 uploader

2006-07-07 Thread patrickk
I´m having a multiple upload and I´m using: for file in request.FILES.getlist('imageupload_file'): ... Am 07.07.2006 um 11:50 schrieb spako: > > hi > > i'm building a site with which will let the public upload files (after > registration) to the site. i'm going to use flash to upload the files >

  1   2   >