Re: Your IDE of choice

2009-01-06 Thread backdoc
screen + vim is very powerful. That's what I use, too. Too bad the learning curve is so steep. On Jan 6, 6:52 am, Tim Chase wrote: > > What is your favorite IDE for coding Django projects? > > screen + vim + pdb + bash > [+ lynx/dillo/firefox/epiphany for browsing] > [+ sqlite3/mysql/psql for

what type of data structure should I use?

2009-01-06 Thread backdoc
I have a list of links (say ~200) that I want to display in several different orders, all on one page. The first question is am I better off to hit the database for every different order? Then, when I click a link, I am changing many of the attributes about that link (like hit count, last access

Re: what type of data structure should I use?

2009-01-07 Thread backdoc
Thanks for the link. I like that. I'm going to see if I can use it. I'd like to be able to do one query, then bring it into this plugin, sort it 3 or 4 different ways on the client side. I haven't really had any time today to look at it. But, I also thought about trying some kind of session ob

Re: Installing django

2010-04-15 Thread backdoc
manage.py is not in your path. If it's not in your path, you have to give the full path with the command, like /path/to/my/executable. However, if you are in the same directory as the executable, your full path becomes "./executable". So, the bottom line is, cd to the location of manage.py and e

Re: can't display my the data in my form

2010-04-16 Thread backdoc
> > File "c:\django\gossip2go\applications\models.py" in save > 138. return Snippet.objects.create(title > =self.cleaned_data['title'], > This is the problem. > > Exception Type: NameError at /add_gossip/ > Exception Value: global name 'Snippet' is not defined > This error is telling y

Re: How to change the look of the main admin site page?

2010-04-17 Thread backdoc
I think you are looking for something like this to your model class: class Meta: ordering = ('lname', 'fname') So, you would have something like: class MyModel(models.Model): fields = SOMEFIELDS(.) class Meta: ordering = ('some', 'column', 'names') On Sat, Apr 17, 2010 at 10:10

Re: modelForm ordering

2010-04-25 Thread backdoc
That still doesn't work. In fact, no matter which column I select, I still get the same order. This is my current code: 101 class Rotation(models.Model): 102 player = models.ForeignKey(Person, to_field='f_name', verbose_name='Player', limit_choices_to={'relationship' : 'Player'}) 103 da

Re: modelForm ordering [SOLVED]

2010-04-26 Thread backdoc
Yes, you understood my problem. Thanks. That helped. I tried both suggestions. Your second suggestion looked a little easier. So, I tried it first. I couldn't get it to work. I assume I wasn't doing something just right. But, I was able to get your first solution to work with little fuss.

Re: MacPorts installation, Django $PATH issue

2010-05-06 Thread backdoc
Type "which python" at the command line as your regular user. Then, look at /usr/bin/python*, /usr/lib, /usr/local/bin/python* and /usr/local/lib. Find where the site-packages for Django are located. Make sure that "which python" is pointing to the correct version. Sounds like Django is not in

Re: mod_wsgi can't find app to import..but I added path to wsgi file?!

2010-05-27 Thread backdoc
Check your apache logs. On Thu, May 27, 2010 at 10:06 AM, Chris Seberino wrote: > On May 25, 9:03 pm, Kenneth Gonsalves wrote: > > you need to add the path to the *parent* directory of your project, and > your > > project should have __init__.py in every folder where there are python > files > >

Re: best approach to solve statistical problem

2010-05-28 Thread backdoc
That sounds interesting. As I am new to Django, I never really gave putting the logic in the model, although I did happen to read a little about model methods yesterday. Would you mind making some of your code available? I'd be interested in seeing your approach. Darren On Fri, May 28, 2010 at

Re: best approach to solve statistical problem

2010-05-28 Thread backdoc
I'm benefiting a great deal from all other aspects of Django. So, I'm not concerned about having to use SQL to get the job done. However, I really want to do it the way the Django developers intended it to be done, which may be to use raw SQL. The only thing I don't like about addressing the sql

Re: New Django site: bucketlist.org

2010-06-06 Thread backdoc
Nice documentation. On Sun, Jun 6, 2010 at 2:26 PM, shacker wrote: > Hi all - > > Wanted to let you know about a new Django site I've just launched: > > http://bucketlist.org/ > > Come log all those things you want to accomplish before you die :) > > And here are the construction notes for Django

Re: Upgrading Python from 2.4 to 2.6 - can I just copy site-packages folder?

2010-06-08 Thread backdoc
I haven't tried it. But, I wouldn't think so. It shouldn't be hard to install Django for 2.6. I've never used CentOS. But, most of the time, a version requirement means "at least". Of course, in the case of Python 3, that would not be true. On Tue, Jun 8, 2010 at 4:25 AM, Nick wrote: > Hi, >

Re: Introducing ImageFlow for Django (Django-ImageFlow)

2010-06-11 Thread backdoc
The examples are pretty slick. On Tue, Jun 8, 2010 at 1:22 AM, simon wrote: > Hi everyone, > > ImageFlow is a platform-independent JavaScript picture gallery > inspired by the Cover Flow technique currently used in iTunes and the > file browser of OSX. The standard ImageFlow setup uses PHP to cre

Re: ordering fields in admin form

2010-06-13 Thread backdoc
This only impacts the order of the records already entered. But, when adding a new record with the admin interface, one of the fields (a select box auto generated from line 107 below) is not in the order I would prefer. While typing this email, I just figured out how to order it. I needed to mod

Re: ordering fields in admin form

2010-06-13 Thread backdoc
27; ] = > Score.objects.all().order_by('something_to_order_by_here') # replace > with your ordering method >      return db_field.formfield(**kwargs) >   return super(MyModelAdmin, self).formfield_for_foreignkey(db_field, > request, **kwargs) > > Hope this helps, > &

Re: Selling Django

2010-06-17 Thread backdoc
This is also one of the things I like most about Django. It's helpful, but not so much that it gets in the way or makes doing anything "outside the box" difficult. But, I'm just a newbie who's learning and doing lots of stuff wrong. But, I continue work in Django because it seems like a sound in

Re: outer join in orm

2010-06-21 Thread backdoc
I hope you get an ORM answer, too. I'm a newbie following this thread and this sounds like the type of problem I have run into a couple of times already. On Mon, Jun 21, 2010 at 9:37 AM, JeffH wrote: > That looks reasonable... but I wonder if the ORM can do it directly > somehow. Anyone? > >

Re: Deploying Django with mod_wsgi

2010-06-22 Thread backdoc
nothing. it's empty On Tue, Jun 22, 2010 at 8:41 AM, commonzenpython wrote: > thanks, but what should be inside the __init__.py file ? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@go

Re: forms

2010-07-20 Thread backdoc
I'm just learning Django myself. But, it sounds like you didn't inherit from Form.forms (or is it Forms.form??). On Tue, Jul 20, 2010 at 1:14 PM, commonzenpython wrote: > VolunteerForm is the name of my form class in forms.py, i put the code > you gave me : > > if request.POST: >form = V

Re: Django INNER JOIN

2010-07-28 Thread backdoc
> >fav_and_projs = ((f, f.project) for f in favourites) > This may not be a Django question. But, I'm not familiar with this syntax. Is this returning a tuple for ever item in favourites? So, fav_and_projs would be a tuple of tuples, like ((f1, f.project1), (f2, fproject2), .(fn, fproje

Re: Admin issues

2010-04-09 Thread backdoc
This may be bad advice. But, since I'm a newbie myself running in a non-production environment, what I do is restart Apache after making changes to my model.py or settings.py. It might be worth restarting your web server, if you can. I figure there's a better approach. I just haven't gotten far

fundamental issues with configuring Apache and mod_python

2007-01-31 Thread backdoc
I am trying to experiment with django. And, I'm at a loss. My problem is that I just don't conceptually understand how to match up where everything is supposed to go on the filesystem and how to configure Apache and mod_python to be aware of it. I am running Apache2 on Ubuntu Edgy with mod_pyth

fixing css issues

2007-01-31 Thread backdoc
I'm brand new to Django. And, I was having a problem getting my CSS working. I searched the archives here and I saw lots of references from people having the same problems with CSS and some debates on how to go about making it work. But, I never saw anyone spell out exactly how they got it work

noobie first project

2007-02-01 Thread backdoc
s like something only for site administrators, as opposed to end users. And, while I'm thinking about it. When creating your own fields in the model, is there a password field type? I found the list of types in the documentation, but I cou

output form html

2012-03-07 Thread backdoc
I am having trouble changing the way the HTML in my form fields is presented. I've been reading the docs (https://docs.djangoproject.com/ en/dev/ref/forms/api/#outputting-forms-as-html). I've done this in previous versions. But, it doesn't seem to work now. No matter if I use form.as_p or form.

Re: Problems getting started

2012-03-07 Thread backdoc
I think you might need to install as root or sudo. >From memory. sudo python setup.py install Also, try executing "which django-admin.py" at the terminal. That will tell you the location of the executable. Basically, I'm curious if it will even find it, as I'm thinking it didn't install at

Re: Problems getting started

2012-03-07 Thread backdoc
Andre Terra wrote: > Again, don't install as root, use virtualenv. This will save you headaches > in the future, and unless you have an inexcusable reason to have Django run > as root, you shouldn't. > > Sincerely, > AT > > > > > > > > On Wed, M

Re: Character Diff Utility

2012-03-08 Thread backdoc
I have to use Windows at work. I installed Cygwin so that I could use the *nix diff utilities. It's not a bad approach because you also get grep, find and many other useful utilities that Windows sucks at. Be sure to mark that packages you need. I can't remember for certain. But, I believe that

Re: output form html

2012-03-08 Thread backdoc
If you mean, does the final page being rendered match the code that I am trying to change? The answer would have to be "Yes". In other words, anything else that I modify will be reflected on the rendered page. On Mar 8, 2:55 pm, Joel Goldstick wrote: > On Wed, Mar 7, 2012 at 4:2

Re: output form html

2012-03-10 Thread backdoc
ts that tags create? It seems like the default would be to not have them. Thanks On Mar 7, 3:23 pm, backdoc wrote: > I am having trouble changing the way the HTML in my form fields is > presented.  I've been reading the docs (https://docs.djangoproject.com/ > en/dev/ref/forms/api/#o