Re: best practices for a production site

2008-01-20 Thread Andrew
This also may be a good time to consider a distributed version control system (Like bazaar or mercurial)... we're just about to finish porting to bazaar after running up to several situations just like yours. One benefit of DVCS is that branching is easier than SVN...making feature-level branches

ajax toolkit suggest request

2008-01-20 Thread Oguz Yarimtepe
Hi, I need some ajax help at my Django application. I haven't used ajax before so it will be good if someone suggest me some toolkits so that i won't spend time reading all ajax things. One thing that i want to do is filling a text box by clicking a button. It will be good if another Djang

Re: ImageField Example

2008-01-20 Thread Alex Koshelev
Read the docs http://www.djangoproject.com/documentation/newforms/#binding-uploaded-files-to-a-form On 19 янв, 15:32, Darthmahon <[EMAIL PROTECTED]> wrote: > Hey, > > Does anyone have a working example of uploading images using Django? > I've looked extensively and haven't found anything - any id

App naming conflict? - modification of contrib.comments

2008-01-20 Thread MichaelMartinides
Hi all, I dont know where to search anymore. I copied django.contrib.comments into my project directory and adapted it to my needs (eg email field to freecomments, forms, import statements, etc.) When running the project with python manage runserver everything works as it should. But when runni

Re: got error when use code of djangobook chapter 7 for searching

2008-01-20 Thread birkin
On Jan 19, 3:46 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > indentation matters in Python... > > ...the python interpreter does allow tabs for indentation, but assumes that > they have the standard size (8 spaces)... > > To be clear, what matters is *consistency* of indentation -- I use tab

Re: App naming conflict? - modification of contrib.comments

2008-01-20 Thread MichaelMartinides
ah, found the issue, I used comment-utils to create a moderator. After changing the import statement in comment_utils.moderation to mysite.comments.models import FreeComment it also works in mod_python Although I still have no understanding for why it first worked with runserver and not with mo

الف شكر

2008-01-20 Thread الهكر الاسود ****
ممكن انتضم ليكم --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] F

Re: ajax toolkit suggest request

2008-01-20 Thread Artiom Diomin
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Seems like you want someone write it for you? It costs money :) Vice versa you *need* to "spend time reading all ajax things" Generally not all, just pick up some javascript framework (jquery, moo-tools, etc), read how to dial with ajax in django(you

Re: best practices for a production site

2008-01-20 Thread Tim Chase
> This also may be a good time to consider a distributed version control > system (Like bazaar or mercurial)... we're just about to finish > porting to bazaar after running up to several situations just like > yours. I second this suggestion. Mercurial is currently at the top of my pick-list for

Re: ajax toolkit suggest request

2008-01-20 Thread Steve Bergman
On Jan 20, 6:49 am, Artiom Diomin <[EMAIL PROTECTED]> wrote: > Seems like you want someone write it for you? > It costs money :) It's good that he provided a description of what he wanted to accomplish. What he wants does not really require ajax. A bit of javascript might make it nicer. To t

Re: admin page seg faults

2008-01-20 Thread Heather
Well, it looks like the answer is here: http://groups.google.com/group/django-users/browse_thread/thread/797259d0152de507/7855bdc498395f45?lnk=gst&q=segmentation+fault#7855bdc498395f45 the php module and mod_python not playing nice in Apache. I commented out the php module and the admin page wor

Re: Help tracking down runaway RAM

2008-01-20 Thread Matt Davies
Peter Have you tried running the websites with lighttpd FCGI instead of Apache? If you have the time and the spare resource, try it out, if your still having memory problems then you will eliminated apache as the problem. I doubt very much that it isn't the apache from what you've said though, an

Re: Running django+apache on my macbook

2008-01-20 Thread Anton P. Linevich
Greeting, John! Fri, Jan 18, 2008 at 11:29:38AM -0800, retireoncsco wrote: > > Anton, that was sort of my question, how do I complete your second > idea but w/o the recompile. The mac already comes with apache 2 > installed and running rather well, how hard would it be to add > mod_python or

Problems setting mutliple filter for a model

2008-01-20 Thread tximo
Hi, I have a problem concerning the database api. I'm using a model called products and these products can have up to five options like 'black', 'high price', 'big'. When I'm showing an article list, you can set multiple filters for articles you like to see. The selected filter will be stored in

Re: Help with either setting or lack of knowledge of Custom error_class

2008-01-20 Thread Roboto
The definition for loginForm can be found at the bottom of this pastebin http://pastebin.com/m79fa445e On Jan 20, 12:39 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Jan 20, 2008 12:31 AM, Roboto <[EMAIL PROTECTED]> wrote: > > > > > whoops - here is the re-edited pastebin > > >http://paste

notmm-0.2.9 (phycocyanine) released

2008-01-20 Thread Etienne Robillard
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello all, I'm pleased to announce the release of notmm-0.2.9. notmm is a heterogenous toolkit which strives at becoming a multi-purpose swiss knife for Django. It is fully unstable, unreviewed, and there's no favicon.ico yet... ;) The release

Re: Help with either setting or lack of knowledge of Custom error_class

2008-01-20 Thread Karen Tracey
On Jan 20, 2008 10:42 AM, Roboto <[EMAIL PROTECTED]> wrote: > > The definition for loginForm can be found at the bottom of this > pastebin > > http://pastebin.com/m79fa445e > > OK, since loginForm doesn't override __init__ then it the error must be coming from Django code. Are you using 0.96? It

Re: Help with either setting or lack of knowledge of Custom error_class

2008-01-20 Thread Roboto
Yes, right now I'm using 0.96 Is error_class a 0.97 feature? Thanks Karen. I can redo my css =P to revert to ul and li it's not that big of an issue. On Jan 20, 11:26 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Jan 20, 2008 10:42 AM, Roboto <[EMAIL PROTECTED]> wrote: > > > > > The defin

Re: Help with either setting or lack of knowledge of Custom error_class

2008-01-20 Thread Karen Tracey
On Jan 20, 2008 11:43 AM, Karen Tracey <[EMAIL PROTECTED]> wrote: > On Jan 20, 2008 11:38 AM, Roboto <[EMAIL PROTECTED]> wrote: > > > > > Yes, right now I'm using 0.96 > > > > Is error_class a 0.97 feature? > > > > Well, strictly speaking there is no 0.97, since 0.96 is the most recent > "release"

Re: Help with either setting or lack of knowledge of Custom error_class

2008-01-20 Thread Karen Tracey
On Jan 20, 2008 11:38 AM, Roboto <[EMAIL PROTECTED]> wrote: > > Yes, right now I'm using 0.96 > > Is error_class a 0.97 feature? > Well, strictly speaking there is no 0.97, since 0.96 is the most recent "release". So it's a post-0.06 feature, available if you use an SVN checkout as opposed to th

Loading fixtures from views

2008-01-20 Thread [EMAIL PROTECTED]
To support testing (using Selenium), I would like to invoke fixtures from regular Django views. More generally, I want to be able to perform test setup and teardown operations from Selenium which interacts with the application through http. I know that fixtures are normally part of Django tests

Re: Loading fixtures from views

2008-01-20 Thread Jonathan Buchanan
[EMAIL PROTECTED] wrote: > To support testing (using Selenium), I would like to invoke fixtures > from regular Django views. More generally, I want to be able to > perform test setup and teardown operations from Selenium which > interacts with the application through http. > > I know that fixtu

Re: Loading fixtures from views

2008-01-20 Thread Alex Koshelev
Try this code: from django.core.management.commands.loaddata import Command def my_view( request, fixture_label1, fixture_label2 ) Command().handle( fixture_label1, fixture_label2 ) #... On 20 янв, 20:04, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > To support testing (using Seleniu

Re: Inclusion-Tag + Admin

2008-01-20 Thread Christoph Egger
Christoph Egger wrote: > Hi > > I've two problems I can't solve with the documentation. > > 1. I was adviced to use Inclusion-Tags for my Menu but I can't work out >how to load the library. {% load proj.app %} doesn't work nor >{% load proj.app.mytags %} > >'proj.app.mytags' is not a

Inclusion-Tag + Admin

2008-01-20 Thread Christoph Egger
Hi I've two problems I can't solve with the documentation. 1. I was adviced to use Inclusion-Tags for my Menu but I can't work out how to load the library. {% load proj.app %} doesn't work nor {% load proj.app.mytags %} 'proj.app.mytags' is not a valid tag library: Could not load templ

Email as primary key in users

2008-01-20 Thread J . Pablo Fernández
Hello, Is it possible to use email instead of username for users. So for logging in I would ask email and password (no username)? Thanks. -- J. Pablo Fernández <[EMAIL PROTECTED]> (http://pupeno.com) --~--~-~--~~~---~--~~ You received this message because you are

Mixins and non-database fields on instances

2008-01-20 Thread Wyley
Hello all, I'm currently using a mixin class to contribute a few extra fields to my models, to keep track of some metadata on instances (for example, an update_mode attribute that specifies whether data should replace all fields or only non-empty ones in the database when the instance is saved).

Re: admin page seg faults

2008-01-20 Thread Graham Dumpleton
The mod_wsgi package gets affected by a lot of similar issues to mod_python. The documentation for mod_wsgi covers various shared library and name space conflicts including that of MySQL, PHP etc in: http://code.google.com/p/modwsgi/wiki/ApplicationIssues Even if using mod_python useful to rea

Re: Email as primary key in users

2008-01-20 Thread Sebastjan Trepca
Sure, you just use email field when authenticating user. Like this: from django.contrib.auth import authenticate user = authenticate(email='[EMAIL PROTECTED]', password='secret') if user is not None: if user.is_active: print "You provided a correct username and password!" else:

Re: Inclusion-Tag + Admin

2008-01-20 Thread Christoph Egger
Christoph Egger wrote: > Christoph Egger wrote: [..] > > Well sorry for asking to early. These things seem to be solved by > creating a File templatetags.py in the appropriate app and adding a > __str__() Function to the models. > > But now there is an > > AttributeError at /members/details/1/

Re: Help tracking down runaway RAM

2008-01-20 Thread Sebastjan Trepca
I think the problem lies in apps, are you super sure they don't leak? As a temporary solution you could set Apache to kill a process when it consumes too much memory. Sebastjan On 1/20/08, Matt Davies <[EMAIL PROTECTED]> wrote: > Peter > > Have you tried running the websites with lighttpd FCGI

Re: Email as primary key in users

2008-01-20 Thread J . Pablo Fernández
Hello Sebastjan, That means I would not be using djanago.contrib.auth.views.login, right? Sebastjan Trepca wrote: > Sure, > > you just use email field when authenticating user. > > Like this: > > from django.contrib.auth import authenticate > user = authenticate(email='[EMAIL PROTECTED]', pa

Re: Another database for unit tests

2008-01-20 Thread Russell Keith-Magee
On Jan 20, 2008 2:13 PM, Jim Crossley <[EMAIL PROTECTED]> wrote: > > "James Bennett" <[EMAIL PROTECTED]> writes: > > > On Jan 19, 2008 10:24 PM, Jim Crossley <[EMAIL PROTECTED]> wrote: > >> Yes, I knew I could override the NAME, but I'd like to override the > >> ENGINE,USER,PASSWORD,HOST, and PORT

Re: Loading fixtures from views

2008-01-20 Thread Russell Keith-Magee
2008/1/21 Alex Koshelev <[EMAIL PROTECTED]>: > > Try this code: > > from django.core.management.commands.loaddata import Command > > def my_view( request, fixture_label1, fixture_label2 ) > Command().handle( fixture_label1, fixture_label2 ) > #... While this will probably work, but the ge

Django can't connect to postgresql

2008-01-20 Thread LRP
Hello, I've been making small progress moving into Django 0.96.1-1, but have hit a snag early on. I'm able to start a project and bring up the Django blue "It works!" screen. Following the instructions in http://glasnost.beeznest.org/articles/218, I've created a Postgresql database web and user

IE error when clicking the back button after a POST

2008-01-20 Thread Greg
Hello, I have a form submission where people can search by properties of my product (color, size, price, etc...). We'll when they do a search a bunch of products are returned. When they click on a product and then try to click on the back button. In IE they receive an error: 'Webpage has expire

Filtering with AND in a list

2008-01-20 Thread Julien
Hi all, Sorry if this has been asked before, but I could not find help in the search. Here's my code: class Code(models.Model): name = models.CharField(max_length=100) class Quote(models.Model): content = models.CharField(max_length=100) codes = models.ManyToManyField(Code, null=Tr

Re: best practices for a production site

2008-01-20 Thread Kenneth Gonsalves
On 20-Jan-08, at 2:06 PM, Andrew wrote: > This also may be a good time to consider a distributed version control > system (Like bazaar or mercurial)... we're just about to finish > porting to bazaar after running up to several situations just like > yours. > > One benefit of DVCS is that branchi

Re: Django can't connect to postgresql

2008-01-20 Thread Kenneth Gonsalves
On 21-Jan-08, at 4:07 AM, LRP wrote: > Psycopg2.Operational Error: FATAL Ident authentication failed for user > 'webuser' # TYPE DATABASEUSERCIDR-ADDRESS METHOD # "local" is for Unix domain socket connections only local all all trus

Re: Filtering with AND in a list

2008-01-20 Thread ocgstyles
Hi Julien, The "in" filter translates to an SQL in clause, which in turns simulates or functionality like you are experiencing. The type of clause you are looking for is similar to: where x=1 and x=2 and x=3 What I would try to do (and I'm a newbie with all this too) is dynamically create a

Passing form initial values from one view to another?

2008-01-20 Thread Dennis
Hi All, In my application, I have a form with a choice field which populated from the model using ModelChoiceField. On the view I have a link which takes the user to a view which lets them create a new model object. What I'd like to have happen after the successful creation is redirect back to

Re: ImageFile not prepending MEDIA_ROOT onto upload_to folder location

2008-01-20 Thread Kenneth Gonsalves
On 21-Jan-08, at 11:37 AM, oak wrote: > (upload_to="/albums" upload_to="albums' - no '/' -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/web/ Foss Conference for the common man: http://registration.fossconf.in/web/ --~--~-~--~~~---~--~---

ImageFile not prepending MEDIA_ROOT onto upload_to folder location

2008-01-20 Thread oak
For some reason when I upload files, they are getting put straight into my c:/ root rather than the MEDIA_ROOT specified in the setting.py. ie. If I have this in my model: image = models.ImageField(upload_to="/albums",blank=True, null=True) it will create a directory c:\albums and upload the f

differences between runserver and apache

2008-01-20 Thread Carl Karsten
I developed a site using ./mmanage.py runserver for testing. I try to run it under apache and it errors. I hear runserver adds things to sys.path (installed apps) and when you run from apache that doesn't happen. sure enough, I can fix it by adding things to PythonPath. Now I am having 2 p

Re: differences between runserver and apache

2008-01-20 Thread Graham Dumpleton
Post your Apache configuration snippet where you configure mod_python for Django. Post your full urls.py file. Indicate the path to the directory containing the settings.py file so we can see if it matches with what it is meant to be. Graham On Jan 21, 6:22 pm, Carl Karsten <[EMAIL PROTECTED]>