Re: how do designers create content

2008-04-19 Thread Kenneth Gonsalves
On 20-Apr-08, at 12:16 PM, James Bennett wrote: > On Sun, Apr 20, 2008 at 1:33 AM, lee <[EMAIL PROTECTED]> wrote: >> designers. Do the designers use text base editting like ultraedit or >> or graphics based software like dreamweaver? Most of the artist I >> know >> don't do much coding and

Re: how do designers create content

2008-04-19 Thread James Bennett
On Sun, Apr 20, 2008 at 1:33 AM, lee <[EMAIL PROTECTED]> wrote: > designers. Do the designers use text base editting like ultraedit or > or graphics based software like dreamweaver? Most of the artist I know > don't do much coding and are into photoshop, illustrator and > dreamweaver. Most of

Re: how do designers create content

2008-04-19 Thread Kenneth Gonsalves
On 20-Apr-08, at 12:03 PM, lee wrote: > Do the designers use text base editting like ultraedit or > or graphics based software like dreamweaver? Most of the artist I know > don't do much coding and are into photoshop, illustrator and > dreamweaver. On sites like lawrence.com where there are lot

how do designers create content

2008-04-19 Thread lee
I am new to django, but I think it is really cool. I have used other web dev systems before like zope/plone and php. I am a little new to the template type system of django and I was wondering how most web designer create therir content when there are seperate programmers and designers. Do the des

Leopard and Mod_Python.

2008-04-19 Thread Lee Hinde
This is more venting than anything. As a long-time Mac fan boy I'm hugely disappointed at how much trouble it's been to get Apache/MySQL/Mod_Pythyon/django all working together on an Intel Mac running Leopard. This post: http://www.modpython.org/pipermail/mod_python/2008-March/024954.html (which

Re: Post_save signal gets triggered twice

2008-04-19 Thread Malcolm Tredinnick
On Sat, 2008-04-19 at 22:29 -0700, meppum wrote: > Has anyone noticed that the post_save signal gets triggered twice? Under what circumstances? With what version of Django? It doesn't happen all the time, so you're going to have to provide some details. Malcolm -- Honk if you love peace and

Re: Basic ModelForm operation question

2008-04-19 Thread Malcolm Tredinnick
On Sat, 2008-04-19 at 13:18 -0700, John wrote: > If you have code like this using a form that subclasses ModelForm: > > if request.method == 'POST': > form = MyModelForm(request.POST, instance=some_instance) > form.is_valid(): >form.save() > > Does MyModelForm first fill it's fi

Dream Home

2008-04-19 Thread lz25u
Round up the relatives and get ready for new trivia rounds in Family Feud 3. Make Mom and Dad proud as you score points to customize their dream home. One hundred people were surveyed in the latest sequel to give sometimes surprising, often hysterical answers. What`s your design style? Build the n

Re: best practice for creating featured field

2008-04-19 Thread Merrick
Oops my featured_place actually reads: featured_place = models.ForeignKey(Place, null=true, blank=true) On Apr 19, 9:57 pm, Merrick <[EMAIL PROTECTED]> wrote: > I updated the City model: > > class City(models.Model): > state = models.ForeignKey(State) > featured_place = models.Foreig

Re: best practice for creating featured field

2008-04-19 Thread Merrick
I updated the City model: class City(models.Model): state = models.ForeignKey(State) featured_place = models.ForeignKey(Place, related_name=places) city = models.CharField(max_length=100, unique=True) but now I get another error when running syncdb: NameError: name 'Place' is not de

Re: best practice for creating featured field

2008-04-19 Thread Merrick
Thank you, I originally had featured_place as a foreign key and ran into a problem: null value in column "featured_id" violates not-null constraint That is because before there is a place there has to be a city. On Apr 19, 9:37 pm, Doug B <[EMAIL PROTECTED]> wrote: > > What is the best practice

Re: best practice for creating featured field

2008-04-19 Thread Doug B
> What is the best practice for making it so when I toggle is_featured > to on for Balboa Park the admin enforces a rule that only one place > can be featured for a city. Hope that makes sense, thank you. You could override save on Place and unset the other places. Although I think it might be b

best practice for creating featured field

2008-04-19 Thread Merrick
I am using the admin to do all of my data input. I have the following models: class City(models.Model): city = models.CharField(max_length=100, unique=True) class Place(models.Model): city = models.ForeignKey(City) title = models.CharField(max_length=255) is_featured = models.Bo

Django and DataBase Views

2008-04-19 Thread Narso
Hi, I am asking for help. I made a DataBase View and a Model to join some models/tables for use Admin Site filters. In the interactive shell (python manage.py shell) it work ok, but in the browser take a inaceptable long long time to get response. The example models is shown in the message "mod_

Re: A modeling/implementation quiz

2008-04-19 Thread Juanjo Conti
andy baxter escribió: > Is there a strong reason why the count should depend on the type? Yes, I am creating a system for a real state business where this code schema is used for the different type of houses. Juanjo -- mi blog: http://www.juanjoconti.com.ar --~--~-~--~~--

Re: Need help loading template

2008-04-19 Thread Brandon Taylor
Changing my urls.py to this: from django.conf.urls.defaults import * from rdk.training.views import * urlpatterns = patterns('', (r'^$', list_seminars), (r'^([\w-]+)/(\d{4})/(\d{1,2})/(\d{1,2})/(?P \d+)/$', find_seminar_occurrence), ) fixed the prob

Re: Is there a better way to strip CharFields?

2008-04-19 Thread Peter Rowell
On Apr 18, 9:52 pm, "Rishabh Manocha" <[EMAIL PROTECTED]> wrote: > You could just write a clean_mycharfield() and just return > self.cleaned_data['mycharfield'].strip(). True. I guess what bothers me about that technique is that if the data is *not* passing through a Form you have subclassed, the

Re: Javascript GUI Editor that works with Django templates

2008-04-19 Thread blis102
My favorite is FCKeditor. Its formatting of source code is really clean and semantic. I have come to hate TinyMCE because it jumbles source code and uses too many tags at times. Try it out, you may like it a lot. On Apr 19, 6:28 pm, Peter Rowell <[EMAIL PROTECTED]> wrote: > > > > gets butchered

"Simple" Model/relationship Question

2008-04-19 Thread Matt Franz
I've written a quick django app (mostly using the wonderful admin interface) to store content for some courses I'm developing. I have a number of models defined already: Modules, Objectives, Questions, Labs, etc. Basically a content module consists of multiple objectives (define X, list Y, Use Z

Re: Javascript GUI Editor that works with Django templates

2008-04-19 Thread Peter Rowell
> > gets butchered to > Just did a quick check with TinyMCE: Blank textarea, into HTML mode, entered your text, update, save-and- continue-editing, HTML mode. The only thing it did was wrap everything in , but I think that's a configurable behavior. I.e., ==>> HTH, Peter --~--~---

Re: MOD_PYTHON ERROR - but appears more related to MySQLdb

2008-04-19 Thread jmat
This was probably because I didn't read enough at: http://www.djangoproject.com/documentation/modpython/ Following the instructions for: Using eggs with mod_python sorted out the issue. I had to add the PythonInterpreter and the PythonImport directives and set them to my site. On Apr 19, 11:

Javascript GUI Editor that works with Django templates

2008-04-19 Thread Doug B
I have need of a WYSIWYG editor that won't screw up django templates. I've been trying to make Innovaeditor work, but it has a bad habit of breaking the template code by adding entities or throwing it out altogether. Does anyone have a suggestion for a similar textarea replacement that might be

Re: A modeling/implementation quiz

2008-04-19 Thread andy baxter
Juanjo Conti wrote: > Hi all, > > I am worried about how to model the next scene (this is an example, but > an appropriated one): In the model we have People, and there are > different kind of people, let's say: Professors, Students and Other. > Each People object has a 'type' attribute. Type c

Re: Displaying user names on all pages

2008-04-19 Thread chiefmoamba
Hi there, Thanks for this - it worked :-) For any who may read this and need a little extra help, the html page contained: {% if user.is_authenticated %} Welcome, {{ user.username }}. Thanks for logging in. {% else %} Welcome, new user. Please log in. {% endif %} And views.py also nee

Threadedcomments works on Mac, but not on Debian

2008-04-19 Thread Manuel Meyer
Hey, as described here [1] I get an NoReverseMatch error on debian when using django-threadedcomments, while everything works well an mac. In both cases I use 0.97-pre-SVN-7436. Does anybody know this behaivior? Thanks, Manuel [1] http://groups.google.com/group/django-threadedcomments/ bro

A modeling/implementation quiz

2008-04-19 Thread Juanjo Conti
Hi all, I am worried about how to model the next scene (this is an example, but an appropriated one): In the model we have People, and there are different kind of people, let's say: Professors, Students and Other. Each People object has a 'type' attribute. Type can be P, S or O. So far, all r

Basic ModelForm operation question

2008-04-19 Thread John
If you have code like this using a form that subclasses ModelForm: if request.method == 'POST': form = MyModelForm(request.POST, instance=some_instance) form.is_valid(): form.save() Does MyModelForm first fill it's fields with data from some_instance, and then override with the da

Re: Displaying user names on all pages

2008-04-19 Thread Raisins
Add context_instance=RequestContext(request) to your render_to_response for your views render_to_response('mainpage.html', {'stuff' : stuf }, context_instance=RequestContext(request)) On Apr 19, 1:36 pm, chiefmoamba <[EMAIL PROTECTED]> wrote: > Hello, > > I am hoping this will be a very simple q

Displaying user names on all pages

2008-04-19 Thread chiefmoamba
Hello, I am hoping this will be a very simple question for many of you. I have built simple Django login function. When I log in, my log in page will say "Welcome, username" etc. It works beautifully. However, on subsequent pages, eg /nextpage/ even though I have the same code in the page, the

MOD_PYTHON ERROR - but appears more related to MySQLdb

2008-04-19 Thread jmat
I have been able to get django working with the development server. I'm pulling my hair out trying to get it working on my osx 10.4 box with apache/mod_python/mysqldb I have confirmed that apache works, mod_python works, and mysqldb work stand alone. I was following the django book and created t

Apache processes locked when using locmem cache

2008-04-19 Thread yish
Hi, I am having a problem with Apache (prefork), mod_python, Django (trunk- version 6410) and python 2.5.1. I am currently testing my site with 5 apache processes and haven't yet set up memcached (on the list but had some issue with some of my cache keys not being valid for memcached). Every cou

Re: Admin page doesn't show calendar popup

2008-04-19 Thread [EMAIL PROTECTED]
I believe this was a Safari issue that was fixed at some point post-. 96.1(if you guys aren't using safari feel free to post again). On Apr 19, 2:42 pm, Polat Tuzla <[EMAIL PROTECTED]> wrote: > I got the same problem with the version 96.1 on Mac. > Then switched to trunk and everything went OK. >

Re: Admin page doesn't show calendar popup

2008-04-19 Thread Polat Tuzla
I got the same problem with the version 96.1 on Mac. Then switched to trunk and everything went OK. Unfortunately can't tell you why this happened, as I did not bother to investigate the problem further. Just switch to using trunk if that suits you, and you will have the calendar pop ups. On Mar

Re: Does request.is_ajax() really work?

2008-04-19 Thread Alex Koshelev
What is `is_ajax` method? On Apr 19, 4:06 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I have made up a view to check a request is ajax or not, but the > function is_ajax() always return false. I used prototype to fire the > ajax request and I confirmed it with Firebug. The request header

Re: Django en Dreahost

2008-04-19 Thread book4e
> Yeap, my typo error. So If Django works with Python >= 2.3, why Python > 2.5 should be installed at DH to run Django? It's NOT necessary. If you use sqlite as backend, Python 2.5 ships with an sqlite wrapper in the standard library, so you don't need to install anything extra in that case. --~

Need help loading template

2008-04-19 Thread Brandon Taylor
Hi everyone, In my urls.py, I'm matching: a slug from a foreign key / the year / month / day / pk of the record as such: from django.conf.urls.defaults import * from rdk.training.views import * urlpatterns = patterns('', (r'^$', list_seminars), (r'[

mod_python problem

2008-04-19 Thread Narso
Hi, everybody. In my appication ("nude") I have 4 models (really I have some more), something like this: class State(models.Model): name:models.CharField(CharField(max_length=30) class Admin: pass class WorkCenter(models.Model): State=models.ForeignKey(State) phone=

Re: 'HttpResponse' object has no attribute 'rindex' error on 0.96

2008-04-19 Thread Ryan Vanasse
I should have known it was something that simple. Thank you Malcolm. ryan On Apr 19, 1:44 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Fri, 2008-04-18 at 23:15 -0700, Ryan Vanasse wrote: > > [...] > > > My urls.py looks like this (I'm just getting started on this project.) > > > from

Does request.is_ajax() really work?

2008-04-19 Thread [EMAIL PROTECTED]
I have made up a view to check a request is ajax or not, but the function is_ajax() always return false. I used prototype to fire the ajax request and I confirmed it with Firebug. The request header really contains "X-Requested-With" and its value is "XMLHttpRequest". I tried it many times on diff

Re: Session is new every time

2008-04-19 Thread Martin Kaffanke
Am Donnerstag, den 17.04.2008, 17:17 +0200 schrieb Martin Kaffanke: > I use django behind apache using the wsgi like described here: > > http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango Just for those who are interested: It does not work with python2.4 but it works with python2.5 Ma

Re: custom form on admin interface page

2008-04-19 Thread Kevin Monceaux
André, On Sat, 19 Apr 2008, apm wrote: > so i figured out the following (in admin/change_list.html): > > {% ifequal cl.opts.verbose_name "poll" %} > > Import from file > value="import" type="submit"> > > {% endifequal %} > > is th

Re: custom form on admin interface page

2008-04-19 Thread apm
hi again so i figured out the following (in admin/change_list.html): {% ifequal cl.opts.verbose_name "poll" %} Import from file {% endifequal %} is this the way to go or are there better options? thanks for your help

Re: OS X install help --I think I broke something...

2008-04-19 Thread siudesign
This is a common problem on osx when people simply to a python setup.py install. On OSX it doesn't copy the admin templates from the source to site-packages. So, from wherever you are running python setup.py install copy django/contrib/admin/templates into /Library/ Python/2.x/site-packages/djang

Re: Sending emails with special characters

2008-04-19 Thread Malcolm Tredinnick
On Sat, 2008-04-19 at 00:43 -0700, Julien wrote: > Thanks for the hints. > > I'm maintaining the code done by another developer: [... snipped ...] > > As you see, after your comments I added the force_unicode function > call, but it didn't fix the problem. I tried to look into Django code > bu

Re: Sending emails with special characters

2008-04-19 Thread Julien
Thanks for the hints. I'm maintaining the code done by another developer: from django.conf import settings from django.template import Context, Template from django.utils.encoding import force_unicode from email.MIMEMultipart import MIMEMultipart from email.MIMEText import MIMEText from email.