Re: Django doesn't like serving a view to Apache

2009-01-21 Thread joshuajonah
I am running this script through shell while ssh'd into the server so its coming from the same source On Jan 21, 3:44 pm, joshuajonah <j...@joshuajonah.com> wrote: > The library is for pulling data from MLS. > > I tried running it under the apache user, works fine there. I gu

Re: Django doesn't like serving a view to Apache

2009-01-21 Thread joshuajonah
The library is for pulling data from MLS. I tried running it under the apache user, works fine there. I guess I'll have to dig a little. On Jan 21, 3:39 pm, Colin Bean <ccb...@gmail.com> wrote: > On Wed, Jan 21, 2009 at 12:18 PM, joshuajonah <j...@joshuajonah.com> wrote: >

Re: Django doesn't like serving a view to Apache

2009-01-21 Thread joshuajonah
Why wouldn't it at least except? On Jan 21, 3:17 pm, joshuajonah <j...@joshuajonah.com> wrote: > It doesn't even get to start the session:http://dpaste.com/111586/ > > On Jan 21, 3:14 pm, joshuajonah <j...@joshuajonah.com> wrote: > > > It works and outputs what it s

Re: Django doesn't like serving a view to Apache

2009-01-21 Thread joshuajonah
It doesn't even get to start the session: http://dpaste.com/111586/ On Jan 21, 3:14 pm, joshuajonah <j...@joshuajonah.com> wrote: > It works and outputs what it should:http://dpaste.com/111584/ > > I'll try commenting out some lines and seeing how far it gets. > > On Jan 21

Re: Django doesn't like serving a view to Apache

2009-01-21 Thread joshuajonah
It works and outputs what it should: http://dpaste.com/111584/ I'll try commenting out some lines and seeing how far it gets. On Jan 21, 3:10 pm, Colin Bean <ccb...@gmail.com> wrote: > On Wed, Jan 21, 2009 at 11:34 AM, joshuajonah <j...@joshuajonah.com> wrote: > > > I'm

Re: move/change database type

2009-01-21 Thread joshuajonah
A normal manage.py dump to fixture doesn't work? On Jan 21, 2:44 pm, Alistair Marshall wrote: > Hi folks, > > I have been developing a project on my desktop using sqlite, I have > just attempted to move it onto a 'proper' server and was hoping to use > mysql. > >

Re: Django doesn't like serving a view to Apache

2009-01-21 Thread joshuajonah
Also, this instance of django serves other views fine. On Jan 21, 2:34 pm, joshuajonah <j...@joshuajonah.com> wrote: > I'm having an issue getting Apache to serve a view. It appears to work > fine through shell (http://dpaste.com/111549/), however when viewed > through a web br

Django doesn't like serving a view to Apache

2009-01-21 Thread joshuajonah
I'm having an issue getting Apache to serve a view. It appears to work fine through shell (http://dpaste.com/111549/), however when viewed through a web browser, it loads indefinitely. Here is the view: http://dpaste.com/111551/ Any ideas guys?

Django sub-sites and email

2009-01-15 Thread joshuajonah
I'm starting a major project as we speak. It's a site where I can create sub-sites for my clients in subdomains (e.g: clientsite.mainproject.com). Just like basecamp/tons of other sites. Many of these sites will have domains pointed at the subdomains on my main site (e.g: www.clientsite.com ->

Re: Many-to-Many different models (quasi-tagging)

2008-09-29 Thread joshuajonah
Also i should say, I'd like to be able to attach multiple "notes" to any given model. On Sep 29, 11:42 pm, joshuajonah <[EMAIL PROTECTED]> wrote: > Hi guys, > >     I'm making a little basic intranet CRM. Here's the models right > now, pretty straight forward: &

Many-to-Many different models (quasi-tagging)

2008-09-29 Thread joshuajonah
Hi guys, I'm making a little basic intranet CRM. Here's the models right now, pretty straight forward: class Person(models.Model): url = models.SlugField(max_length=100) first_name = models.CharField(max_length=100) last_name = models.CharField(max_length=100) business =

Modulo of 4 not working right

2008-07-16 Thread joshuajonah
I have a form model that is generating a dynamic number of fields. It is using a modulo conditional to see if the amount of fields if divisible by 4 (4 column layout). If it doesn't divide, it adds another field and then tries again. This is not working, it is returning field lists that are 30

Dynamic form not running

2008-07-15 Thread joshuajonah
White forever, never loads in the browser. I have changed it today, but i cannot figure out what i screwed up. http://dpaste.com/hold/65163/ It makes a ton of checkboxes in four columns, it then adds blank fields for new options until it is divisible by 4 so that it fits the 4 column layout

Re: Sort a list of objects by an attribute of the objects

2008-07-08 Thread joshuajonah
Resolved. Answer for those interested: def sort_by_attr(seq, attr): import operator intermed = map(None, map(getattr, seq, (attr,)*len(seq)), xrange(len(seq)), seq) intermed.sort() return map(operator.getitem, intermed, (-1,) *

Sort a list of objects by an attribute of the objects

2008-07-08 Thread joshuajonah
Ok i have a list of form fields, i want to sort the list by the ".label" of the fields. I have tried a many different ways but i cant seem to make this work. I know this is more of a python question but this is the best resource I've found for these questions. Can anybody throw an example up

my form "didn't return an HttpResponse object."

2008-07-07 Thread joshuajonah
I'm not sure where I'm going wrong here. I have a form, when i submit it, even blank if gives me this error. I have tried changing it to POST and then back to a GET submit, but it still doesn't get the response. Here's the debug page with bonus GET vars too! (this way both POST and GET vars are

Re: looping through newforms fields in a template

2008-07-06 Thread joshuajonah
Resolved. A little black magic required: http://www.zedkep.com/blog/index.php?/archives/85-Iterating-over-a-dictionary-in-Django-templates.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group.

looping through newforms fields in a template

2008-07-06 Thread joshuajonah
ok, it's actually pretty complicated but I'll give you the specific issue. I'm making a dictionary of form fields, views.py: form = RetailForm() categories = ['Toys', 'Bird'] checkboxlist = {} for category in categories: num = 0 for field

Re: Do you code django with Komodo?

2008-07-05 Thread joshuajonah
I'm not painfully familiar with the API/whatever to make Komodo extensions, but i know enough python to get there. I can think of a million things that would help me get django apps out there faster. --~--~-~--~~~---~--~~ You received this message because you are

Re: django and mod_python with vhosts

2008-07-03 Thread joshuajonah
I am an idiot. It WAS the UniqueID. I had this idea that it it mapped to the SECRET_KEY for some reason. Sorry for the confusion. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: django and mod_python with vhosts

2008-07-03 Thread joshuajonah
Actually, this is my httpd.conf at the bottom: # Use name-based virtual hosting. # #NameVirtualHost *:80 # # NOTE: NameVirtualHost cannot be used without a port specifier # (e.g. :80) if mod_ssl is being used, due to the nature of the # SSL protocol. # # # VirtualHost example: # Almost any

Re: django and mod_python with vhosts

2008-07-03 Thread joshuajonah
Ok, the NameVirtualHost in the main httpd.conf is not enabled. How should i configure this? am i supposed to choose a specific domain? or them all? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: django and mod_python with vhosts

2008-07-03 Thread joshuajonah
Also, i made sure the "UniqueID" is infact unique:D --~--~-~--~~~---~--~~ 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

Re: django and mod_python with vhosts

2008-07-03 Thread joshuajonah
will check the "NameVirtualHost" now. On Jul 3, 9:08 pm, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > On Jul 4, 11:03 am, joshuajonah <[EMAIL PROTECTED]> wrote: > > > > > I have a Media Temple DV server, it has 7 sites hosted on it, 5 of > > them ar

django and mod_python with vhosts

2008-07-03 Thread joshuajonah
I have a Media Temple DV server, it has 7 sites hosted on it, 5 of them are paying clients. The vhost file structure is like this: /var/www/vhosts/whatever.com/ /var/www/vhosts/whatever2.com/ /var/www/vhosts/whatever3.com/ There are vhost.conf files in a "conf" directory (e.g: /var/www/vhosts/

Re: MediaTemple Containers

2008-07-01 Thread joshuajonah
For expandability and dedicated memory you'd probably want a dedicated or Dedicated grid machine. I use a MediaTemple DV with python2.5 and django latest trunk, works great, even for tons of video. On Jul 1, 9:55 am, Niall McCormack <[EMAIL PROTECTED]> wrote: > They do look good, but I want

Re: Django Database Relationship Question

2008-06-26 Thread joshuajonah
And this is why the Django community rocks, two examples and a full explaination with a link in less than 10 minutes, GW guys On Jun 26, 11:55 pm, bhunter <[EMAIL PROTECTED]> wrote: > Hi, sorry for what is probably a trivial question, but I'm new to > Django and a little fuzzy on databases in

Re: Django Database Relationship Question

2008-06-26 Thread joshuajonah
Well you'd want a relational table of author status', some thing like this: class Journalist(models.Model): name = models.Charfield() class Article(models.Model): articles = models.Charfield class State(models.Model): state = models.CharField() class Article_relationship(models.Model):

Re: many to many field

2008-06-24 Thread joshuajonah
PGP SIGNED MESSAGE- > Hash: SHA1 > > hi, > > joshuajonah wrote: > > | You should use the 'db_table' option for any given model. This will > | allow you to use a specific table name and it also works on many-to- > | many relational tables if you define them specifically in

Re: ImageField

2008-06-24 Thread joshuajonah
Have you read the djangobook.com documentation? It's a great cross reference to the django documentation, written by the same person aswell, for some reason. On Jun 24, 1:10 pm, Molly <[EMAIL PROTECTED]> wrote: > I was wondering if anyone could explain ImageField to me or know of a > good

Re: many to many field

2008-06-24 Thread joshuajonah
You should use the 'db_table' option for any given model. This will allow you to use a specific table name and it also works on many-to- many relational tables if you define them specifically in your models.py. You can get the info on them (scattered everywhere) in this doc:

Re: Django - Apache - mod_python setup

2008-06-24 Thread joshuajonah
since you are accessing a subdomain, there may be a vhost for your machine with an apache install for the whole domain... Are you the admin of the domain? if not you may want to have a chat with them. On Jun 24, 12:38 pm, Nagu <[EMAIL PROTECTED]> wrote: > Karen: > > I followed the instructions

Re: Do you code django with Komodo?

2008-06-24 Thread joshuajonah
I use Komodo, however i cant seem to make the built in interpreter use the same version of python that i develop on. Not a big deal, i love the program, especially the forced anal-retentive tabbing. On Jun 24, 5:56 am, ristretto.rb <[EMAIL PROTECTED]> wrote: > Hello, > > Do you code

Re: Where to install additional libraries?

2008-06-23 Thread joshuajonah
Depends on your setup, I store my extras (MySQLdb, Django, mod_python/ wsgi installers, Imaging, etc.) in /opt/. It's usually empty on most machines. Some like to use a folder within their user folder, especially for multi user computers. It's really up to you. On Jun 23, 9:08 am, Jamie Pittock

Re: Django and Adobe Spry

2008-06-23 Thread joshuajonah
I would recommend using another Javascript framework like jQuery or Mootools. SPRY is very invasive and messy. It requires a ton of files that may be a little tough to get your head around even for simple applications. These files could prove to be a scary situation when combined with django

Re: Models advice

2008-06-20 Thread joshuajonah
Yeah i removed them, it seems to work fine pulling data from it. Thanx On Jun 19, 10:57 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I haven't looked through it fully, however you don't need to create > the primary keys, they are automatically created. > > On

Models advice

2008-06-19 Thread joshuajonah
I am making a database of advertisers, product categories, products (advertiser+product category), retailers, and retailers stock (retailer + products) Here is my diagram of the topology: http://www.joshuajonah.com/database.png Here's my models.py: http://dpaste.com/57676/ Do you see any

Re: Comments not working on a specific server

2008-06-18 Thread joshuajonah
Ok, it looks like the comments aren't listing in the admin either, I'm guessing the admin uses the same function to list them. Is there something wrong with my database maybe? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Comments not working on a specific server

2008-06-18 Thread joshuajonah
Where would you propose i do this? On Jun 18, 12:15 pm, "Michael Wieher" <[EMAIL PROTECTED]> wrote: > did you try fiddling with the backslashes? django is ... clumsy with > backslashes and urls. the trailing backslash in particular > > On Wed, Jun 18, 2008 at 1

Re: Comments not working on a specific server

2008-06-18 Thread joshuajonah
Tried switching it to a normal object_detail generic view, same issue. --~--~-~--~~~---~--~~ 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

Comments not working on a specific server

2008-06-18 Thread joshuajonah
You can see my original post here: http://groups.google.com/group/django-users/browse_thread/thread/92eb98b3ea2a8d6b?hl=en I have since re-installed python, mod_python, mysqldb, and django on this server, same issue I have setup an exact replica of the server locally and the exact code it

Problem listing with contrib.comments

2008-06-17 Thread joshuajonah
I have a page: http://www.joshuajonah.com/blog2/200...rst-blog-post/ It has a comment_count and a comment_list, they are being called exactly the same way, however, comment_list has no items. post_detail.html (template for a wrapper around a date_based.object_detail): http://dpaste.com/57001/

Re: Django comments not showing

2008-06-16 Thread joshuajonah
{% extends "blog/index.html" %} {% load extra %} {% load comments %} {% block title %}{{ object.title|escape }}{% endblock %} {% block content %} {{ object.title }} {% if object.lead_image %}http://joshuajonah.com/ {{ object.lead_image }}" alt="{{ object.title }}" /> {% endif %}

Django comments not showing

2008-06-16 Thread joshuajonah
I have gone through the steps in: http://code.djangoproject.com/wiki/UsingFreeComment The post form is working as the comments are being added to the database. I forwards to the free_preview.html, and the preview looks fine, however, the comment_list in my template doesn't display anything.

Re: HTML Escaping JSON data?

2008-06-16 Thread joshuajonah
and > into etc like > > the "escape" filter does. > > > On Jun 16, 5:22 pm, Knifa <[EMAIL PROTECTED]> wrote: > > > Oh damn, I should have probably looked around a bit more, heh. I'm not > > > really used to JS yet. > > > > Thanks very muc

Re: HTML Escaping JSON data?

2008-06-16 Thread joshuajonah
the "escape" filter does. > > On Jun 16, 5:22 pm, Knifa <[EMAIL PROTECTED]> wrote: > > > Oh damn, I should have probably looked around a bit more, heh. I'm not > > really used to JS yet. > > > Thanks very much! > > > On Jun 16, 5:09 pm, joshuajonah &l

Re: HTML Escaping JSON data?

2008-06-16 Thread joshuajonah
I'm not really catching what you're doing here. You want to escape html with javascript? Just use escape() On Jun 16, 11:31 am, Knifa <[EMAIL PROTECTED]> wrote: > Hello there. > > I'm using Serialization with JSON to pass data to jQuery. Everything > is working fine, except that the data for the

Re: Switched to Python2.5 now PIL has stopped working

2008-06-16 Thread joshuajonah
Are you testing with jpgs? if so, see the top paragraph here: http://www.agapow.net/programming/python/installing-and-using-pil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Switched to Python2.5 now PIL has stopped working

2008-06-16 Thread joshuajonah
Is this a local development installation? There were alot of people having issues with PIL on Mac OSX a while ago. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: modifying a queryset in a generic view wrapper

2008-06-16 Thread joshuajonah
I resolved this by making a custom filter template. --~--~-~--~~~---~--~~ 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

Re: modifying a queryset in a generic view wrapper

2008-06-15 Thread joshuajonah
even using a new list object as the queryset doesn't render it: def blog_post(request, year, month, day, slug): queryset = Post.objects.all() modifiedq = queryset from string import replace for item in modifiedq: item.body =

Re: modifying a queryset in a generic view wrapper

2008-06-15 Thread joshuajonah
I'm guessing the object_detail generic view does the actual lookup of the query, how would i extend that in this view? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

modifying a queryset in a generic view wrapper

2008-06-15 Thread joshuajonah
I need to format some data in a queryset before it's displayed in the view. It's a date_based.object_detail wrapper. I am trying to change some "[code]" tags into divs, the example is self-explainitory: def blog_post(request, year, month, day, slug): queryset = Post.objects.all()

Re: How to make a wrapper for date_based.object_detail

2008-06-15 Thread joshuajonah
Nevermind, found it in the generic view .py --~--~-~--~~~---~--~~ 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,

How to make a wrapper for date_based.object_detail

2008-06-15 Thread joshuajonah
Ok, just trying to do some extra work on the data before i output it to a date_based.object_detail generic view. I can't seem to make a simple wrapper for it so that it is handled with a view. I've tried alot of options, here's where I'm at right now: urls.py:

Re: How to filter a manytomany tag

2008-06-14 Thread joshuajonah
resolved. --~--~-~--~~~---~--~~ 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] For

How to filter a manytomany tag

2008-06-14 Thread joshuajonah
Ok, i have a model like this: class Tag(models.Model): tagname = models.SlugField() def __str__(self): return self.tagname class Admin: pass class Post(models.Model): title = models.CharField(max_length=200) slug =

Re: Date based URLconf condition not working

2008-06-14 Thread joshuajonah
On Jun 14, 8:51 pm, Jeff Anderson <[EMAIL PROTECTED]> wrote: > joshuajonah wrote: > > Is this not impossible? > > > 404 error: > > Using the URLconf defined in jj.urls, Django tried these URL patterns, > > in this order: > > >1. ^ad

Date based URLconf condition not working

2008-06-14 Thread joshuajonah
Is this not impossible? 404 error: Using the URLconf defined in jj.urls, Django tried these URL patterns, in this order: 1. ^admin/ 2. ^blog/$ 3. ^blog/(?Pd{4})/?$ 4. ^$ 5. ^(?P\w+)/$ The current URL, blog/2008/, didn't match any of these.