Re: Customizing admin form

2009-04-10 Thread Brian Neal
On Apr 10, 4:46 pm, Oleg Oltar wrote: > Hi! > > I have a model which contains several TextFields and CharFields. I want to > make all char fields longer and wider. How to do it? > > Thanks, > Oleg You can supply your own form that is using customized widgets to construct

Re: Help! PNG file upload error...

2009-04-10 Thread Brian Neal
On Apr 9, 12:45 am, higer wrote: > When I upload a PNG file and use PIL to handle it,there will be an > error occured: > 'NoneType' object is unsubscriptable > > I do not know why and other formats(BMP GIF JPG JPEG) are all ok. I don't know if this is your problem, but

Re: How to widen the text fields in the admin pages for editing records

2009-04-07 Thread Brian Neal
On Apr 7, 3:04 pm, Mac wrote: > Any pointers to the documentation for getting the text fields larger > for CharField data?  They're kinda puny for columns that are defined > to have up to 255 characters.  Thanks! You do it by supplying your own widget to the form field. See:

Re: widget=forms.HiddenInput doesn't work

2009-04-01 Thread Brian Neal
On Apr 1, 10:19 pm, "Michael Rose Jr." wrote: > > Brian. Thanks for responding. I mean to post "name". I've been > experimenting with other field types, which why I accidentally pasted > "last". Here is the HTML for "name". > Name: type="text" name="name" maxlength="45"

Re: widget=forms.HiddenInput doesn't work

2009-04-01 Thread Brian Neal
On Apr 1, 10:19 pm, "Michael Rose Jr." wrote: > > Brian. Thanks for responding. I mean to post "name". I've been > experimenting with other field types, which why I accidentally pasted > "last". Here is the HTML for "name". > Name: type="text" name="name" maxlength="45"

Re: widget=forms.HiddenInput doesn't work

2009-04-01 Thread Brian Neal
On Apr 1, 8:16 pm, rizzoo wrote: > How do I make a field hidden when using ModelForm?  I tried > HiddenInput but it appears to be ignored. > > code:http://dpaste.com/22290/ > Line 9 > > Here's what View Source shows for that line in the browners: > Last: name="last"

Re: Time lookup

2009-03-31 Thread Brian Neal
On Mar 31, 5:31 am, LD wrote: > OK, but Django do not provide 'time' lookup so my problem is 'how to > retrieve time part of datetime field in a query' Ok, then why are you storing date and time together when all you care about is time? To me, when you have a

Re: Time lookup

2009-03-30 Thread Brian Neal
On Mar 30, 10:12 am, LD wrote: > Hi, > > I don't have idea how to do simple task. > I have model with DateTimeField and I want to retrieve all objects > that have time for example lower than 2pm. > > I know about Django queryset lookup like year, month, day. Is there >

Re: Date Filtering in Django-Sphinx

2009-03-30 Thread Brian Neal
On Mar 30, 6:11 am, Alfonso wrote: > > And in my search view I have a simple filter (which is where I think > the problem lies): > > if date == "next30": >        results = queryset.filter(date_time>=(datetime.datetime.now)) > > (Attempting to pull future dates just to

Re: django.contrib.auth.models.User User model can't be saved

2009-03-28 Thread Brian Neal
On Mar 28, 7:02 am, Joshua Partogi wrote: > Yes you're right. In my template I only have username, first_name, > last_name, email and password. I also print out the errors too. Probably what is happening is that some of the other fields you are excluding are required

Re: Django wont display images on my CSS file

2009-03-27 Thread Brian Neal
On Mar 27, 7:33 am, Gath wrote: > Guys, > > Am having a problem in displaying images in my CSS file. > > I have a css file with the following class > > .header > { >  margin-left: auto; >  bla bla >  bla bla >  ... > background: url(/site_media/header_background.gif)

Re: Including username in FileField upload_to path

2009-03-26 Thread Brian Neal
On Mar 26, 3:56 pm, Rajesh D wrote: > On Mar 26, 3:21 pm, IanSR wrote: > > > I've spent the last few hours trying variations on upload_to for my > > FileField path generator get_file_path(instance,filename) that will > > allow me to include

Re: need a multiselect list box for a static list of options

2009-03-26 Thread Brian Neal
On Mar 26, 9:59 am, Adam Fraser wrote: > hrm, I think I'm _finally_ starting to understand how django is meant > to be used. > > Question: Why can't I just specify the widget used by a particular > field from my model in the admin interface. > > stains =

Re: need a multiselect list box for a static list of options

2009-03-24 Thread Brian Neal
On Mar 24, 8:55 am, Adam Fraser wrote: > Still doesn't work.  Maybe I should be more specific. > > I'm editing projectprofiler/projects/models.py which hasn't needed to > import forms for anything, and when I do I get very strange errors. > > Here's what it looks like

Re: need a multiselect list box for a static list of options

2009-03-23 Thread Brian Neal
On Mar 23, 3:36 pm, Adam Fraser wrote: > I found the SelectMultiple widget here: > > http://docs.djangoproject.com/en/dev/ref/forms/widgets/ > > But I still don't know how to hook that up to a model like > CommaSeparatedIntegerField. > > help? > Did you try something

Re: need a multiselect list box for a static list of options

2009-03-23 Thread Brian Neal
On Mar 23, 1:49 pm, Adam Fraser wrote: > Hello, > > This should be a pretty simple question.  I have a list of options: > > STAIN_CHOICES = ( >     (1, 'DNA - DAPI'), >     (2, 'DNA - Hoechst'), >     (3, 'DNA - other'), >     (4, 'Actin - Phalloidin'), >     (5,

Re: django ORM not compatible with postgres

2009-03-22 Thread Brian Neal
On Mar 22, 2:56 pm, Mike Ramirez <gufym...@gmail.com> wrote: > On Sunday 22 March 2009 09:25:42 am Brian Neal wrote: > > > > But from what you posted, I'm guessing that line needs to read: > > > obj.user = User.objects.get(username=request.user) > > I think

Re: Additional Javascript include in ModelAdmin

2009-03-22 Thread Brian Neal
On Mar 22, 11:15 am, Roy wrote: > That would require the extra files be hosted on my media url though. I > want to be able to link js externally so I can use stuff like YUI, > etc. without having to host it. No, not if you use a fully qualified string like

Re: django ORM not compatible with postgres

2009-03-22 Thread Brian Neal
On Mar 22, 8:15 am, Joshua Partogi wrote: > Dear all, > > I just encounter this error using pyscopg2 as my db adapter > Exception Type:         ProgrammingError > Exception Value:        can't adapt > Exception Location: >        

Re: How to say Hello "Somebody" in a Django form. Displaying data context values as non-input.

2009-03-16 Thread Brian Neal
On Mar 16, 2:14 pm, NoviceSortOf wrote: > > So perhaps a better question would be is > > in view.py... > --- > thisusername = str(request.user.username) > data = {'thisusername':username,} > form = form_class(data) > > Why is it form_class(data) does not accept

Django and Python Warnings

2009-03-06 Thread Brian Neal
I updated my working copy of Django after a long period and was browsing the source and noticed it was taking advantage of the Python warnings module. What is the best way to "see" such warnings when doing development? Is it possible to configure Python or the Django development server to display

Re: ModelAdmin get_urls w/ invalid literal for int() with base 10

2009-03-05 Thread Brian Neal
On Mar 4, 10:06 pm, Brian Neal <bgn...@gmail.com> wrote: > On Mar 4, 9:11 pm, Brian Neal <bgn...@gmail.com> wrote: > > > I'd like to make my own custom view. In the past I did this by > > following the django book and added a URL to my main urlpatterns above > &

Re: ModelAdmin get_urls w/ invalid literal for int() with base 10

2009-03-04 Thread Brian Neal
On Mar 4, 10:06 pm, Brian Neal <bgn...@gmail.com> wrote: > On Mar 4, 9:11 pm, Brian Neal <bgn...@gmail.com> wrote: > > > > > I'd like to make my own custom view. In the past I did this by > > following the django book and added a URL to my main urlpatterns

Re: ModelAdmin get_urls w/ invalid literal for int() with base 10

2009-03-04 Thread Brian Neal
On Mar 4, 9:11 pm, Brian Neal <bgn...@gmail.com> wrote: > I'd like to make my own custom view. In the past I did this by > following the django book and added a URL to my main urlpatterns above > the '^admin/(.*)' pattern. But I noticed a new get_urls function on > th

ModelAdmin get_urls w/ invalid literal for int() with base 10

2009-03-04 Thread Brian Neal
I'd like to make my own custom view. In the past I did this by following the django book and added a URL to my main urlpatterns above the '^admin/(.*)' pattern. But I noticed a new get_urls function on the ModelAdmin class in the docs. I'm on trunk, and just did an svn update to 9975 to try this

Re: Is safe unsafe?

2009-02-24 Thread Brian Neal
On Feb 23, 10:51 pm, Jacob Kaplan-Moss <jacob.kaplanm...@gmail.com> wrote: > On Mon, Feb 23, 2009 at 7:49 PM, Brian Neal <bgn...@gmail.com> wrote: > > Interesting, I've also come across this: > > >http://codespeak.net/lxml/lxmlhtml.html#cleaning-up-html &g

Re: Is safe unsafe?

2009-02-23 Thread Brian Neal
On Feb 23, 4:59 pm, Jacob Kaplan-Moss wrote: > On Mon, Feb 23, 2009 at 3:50 PM, Andy Mckay wrote: > > You want to use a script to only allow certain HTML tags and enforce a > > whitelist. Don't be naive and just use string or regular expression to

Re: Add views to admin interface

2009-02-15 Thread Brian Neal
On Feb 15, 1:06 pm, Robert wrote: > Hi, > > how can I add views to the admin interface that > 1. they are also so 'well-integrated' in the admin interface like > models > 2. I can also define permissions for them like for a model > > I know that it's possible to change

Re: Documentation for Download?

2009-02-12 Thread Brian Neal
On Feb 11, 10:11 pm, Will Hardy wrote: > Hi all, > > Should the release tarball maybe contain pre-build html and pdf documentation? > That might be handy for those who don't want to install sphinx/latex etc. > > Cheers, > > Will See the recent thread on why this hasn't

Re: Serialization

2009-02-05 Thread Brian Neal
Russ said it better than me. You simply return the serialized JSON string as the HttpResponse. You then deserialize it somehow in the client's Javascript code (perhaps with an "eval" statement or by the assistance of a Javascript library like jQuery, etc.). You then have a nice Javascript object

Re: Serialization

2009-02-04 Thread Brian Neal
Hi - I'm working on a very similar problem (displaying data on a Google map). I haven't totally implemented this yet, but my way forward is to use AJAX to request the map data from my Django application, which will serve it as JSON (by serializing it). You then "deserialize" it in the Javascript

Re: Form Data is not saving to database

2009-02-04 Thread Brian Neal
On Feb 3, 11:02 pm, Praveen wrote: > Oops... yeah Brian that i forgot to make it as a foriegn key to the > user table and that might be surprised without making foriegn key i > did not get any error even though my settings.DEBUG is true. but now i > made user

Re: Form Data is not saving to database

2009-02-03 Thread Brian Neal
On Feb 3, 6:36 am, Praveen wrote: > http://dpaste.com/116096/ The user field in your MemberProfile is a CharField (I was expecting it to be a ForeignKey to the User table). I think the problem is you can't assign request.user to a CharField (line 31). I'm

Re: media files apache/modpython windows

2009-01-28 Thread Brian Neal
On Jan 28, 3:51 pm, Karen Tracey wrote: > On Wed, Jan 28, 2009 at 3:39 PM, May wrote: > > > Hello, > > > I have the admin templates with CSS working under local server windows/ > > apache/modpython.  Now I would like to get my site css files to work > >

Re: http links without using URLs.py

2009-01-27 Thread Brian Neal
On Jan 27, 11:06 am, May wrote: > Hello, > > The tutorial suggests not serving the static pages with this method on > a permanent basis.  Are you using this method for your production > server?  I'm using windows/apache/modpython and I've tried using the > IP address and

Re: image upload problems (sorry for yet another one)

2009-01-26 Thread Brian Neal
On Jan 26, 11:51 am, PeteDK wrote: [...] > The thing is. Now it still doesn't work through my website, however it > now works through admin. > Well it only works with .bmp pictures. Maybe my PIL is broken? could > that be the reason for my problem from before? As I

Re: image upload problems (sorry for yet another one)

2009-01-26 Thread Brian Neal
On Jan 26, 9:16 am, PeteDK wrote: > Hi there :) > > first the code: > > forms: > class ProfileForm(forms.Form): >         ... >         image = forms.ImageField(required = False) > > models: > class Profile(models.Model): >         user = models.ForeignKey(User,

Re: Django and WMD editor

2009-01-26 Thread Brian Neal
On Jan 26, 7:40 am, Gath wrote: > Good people! > > How can i hook up WMD editor on my django form? > > http://wmd-editor.com > > Paul You just have to get your page to include the correct CSS and Javascript files, just like any other editor like this. If this is a public

Re: Where can i get a wiki formatting widget?

2009-01-24 Thread Brian Neal
On Jan 24, 10:23 am, Brian Neal <bgn...@gmail.com> wrote: > On Jan 24, 9:44 am, Gath <pgath...@gmail.com> wrote: > > > Guys > > > Where can i get a wiki formatting widget for django? > > > I have enough notes fields in my models and i would wan

Re: Where can i get a wiki formatting widget?

2009-01-24 Thread Brian Neal
On Jan 24, 9:44 am, Gath wrote: > Guys > > Where can i get a wiki formatting widget for django? > > I have enough notes fields in my models and i would want a nice wiki > widget for entering data! > > Paul I'm using the markItUp! javascript editor to enter Markdown syntax,

Style Question: Template tag or include?

2009-01-23 Thread Brian Neal
I have an object that I display on multiple pages. Initially I created a little template .html file for it, and I simply {% include 'my_object.hml' %} every where I need it. I have since discovered inclusion tags. Would it be better, worse, or just different to do this instead? {% load

Re: JavaScript Slider in Django Form

2009-01-23 Thread Brian Neal
On Jan 23, 2:43 pm, oboedude wrote: [...] > How do I create a custom widget and what do I have to do to use my > custom widget in a form? Read the documentation on forms, then checkout the section on form media:

Re: template tag not rendered - why not?

2009-01-17 Thread Brian Neal
I ran into this also. I need to do a {% get_comment_form for story as form %} early on in the template so I can do {{ form.media }} inside a block. I found that I had to call get_comment_form twice, once in a block for CSS and once in the block for content. {% extends 'base.html' %} {% block

Re: How to add tinyMCE to django 1.0.2 admin

2009-01-13 Thread Brian Neal
On Jan 13, 3:43 pm, "Oleg Oltar" wrote: > Hi! > > I want to add tinyMCE to my project's admin site. You didn't list any admin.py code. Check out the docs on the admin interface: http://docs.djangoproject.com/en/dev/ref/contrib/admin/#module-django.contrib.admin After

Re: Extending Admin Interface - Image Manipulation After Upload

2009-01-13 Thread Brian Neal
On Jan 13, 12:06 pm, Ty wrote: > I've started creating a photo blog project to get familiar with Python > and Django. I'm using Python 2.6.1 and Django 1.0.2. I'm working on > the models and the administration first, before I tackle the front end > side of the site. I

Re: new django user - no images appear on my site :(

2009-01-12 Thread Brian Neal
On Jan 12, 6:45 pm, Brian Neal <bgn...@gmail.com> wrote: > On Jan 12, 4:58 pm, jazztpt <annacalla...@gmail.com> wrote: > [...] > > > Brian, you understood me perfectly -- when I was asking about a tag, I > > was simply asking if django used a shortcut the wa

Re: new django user - no images appear on my site :(

2009-01-12 Thread Brian Neal
On Jan 12, 4:58 pm, jazztpt wrote: [...] > > Brian, you understood me perfectly -- when I was asking about a tag, I > was simply asking if django used a shortcut the way rails does, and > {{MEDIA_URL}} is what I was looking for.  Duh.  :P > > However, {{MEDIA_URL}}

Re: new django user - no images appear on my site :(

2009-01-12 Thread Brian Neal
On Jan 12, 2:59 pm, jazztpt wrote: > > That page in the docs doesn't say anything about how to call this from > the view.  Are these files automatically accessed by an tag?  I > didn't see any special image tag (like the image_tag in rails) in the > template tags or in

Re: Markdown filter piped into custom filter

2009-01-11 Thread Brian Neal
On Jan 11, 11:27 am, Brian Neal <bgn...@gmail.com> wrote: > I wrote a filter that searches for patterns in text and replaces them > with tags: > > {{ comment.text|smilify }} > > It does various silly things like replace :-) with an actual smiley > face image. Seem

Markdown filter piped into custom filter

2009-01-11 Thread Brian Neal
I wrote a filter that searches for patterns in text and replaces them with tags: {{ comment.text|smilify }} It does various silly things like replace :-) with an actual smiley face image. Seems to work great. When I combine it with the markdown filter, like this: {{

Re: What is Django/python equivalent of this - Display textarea content with line breaks in html page?

2009-01-10 Thread Brian Neal
On Jan 10, 8:13 pm, zweb wrote: > Javascript: > document.getElemnetById(’textareacontent’).value.replace(/\n/ > g,’’); > PHP: > preg_replace(”/\n/”,””,$_REQUEST['t1']); > Ruby: > (teaxtareacontent).gsub(/\n/,””) > > ( reference >

Re: How does django.contrib.auth.views.login work?

2009-01-09 Thread Brian Neal
On Jan 9, 11:06 am, scelerat wrote: > Hi, I'm new to Django and am trying to figure out how to make > authentication work in any view. > > First off, I have a base template which has a conditional like this: > > {% if user.is_authenticated %} > Yay! > {% else %} > Boo. > {%

Re: Process file after upload

2009-01-07 Thread Brian Neal
On Jan 7, 7:32 am, dmishe wrote: > Hey. > > I have FielField in my model for user to upload ZIP-archives. I want > to unpack that zip, place some files in some dirs and delete it just > after user uploaded it in admin. > > How can i do this? Model's save won't work because it

Re: Pagination Suggestions

2008-12-24 Thread Brian Neal
On Dec 24, 3:54 pm, kev wrote: > Hello, > Im trying to create a digg type pagination. Is there a decent > pagination app already out there that works for 1.0? I tried looking > but havent succeeded. > > Thanks, > Kev I'm using this. Works great!

Re: setting the proper file permisions chmod

2008-12-15 Thread Brian Neal
On Dec 15, 10:53 am, garagefan wrote: > how would i make the group include apache? > Not sure what you are asking. I look in /etc/group to see what groups apache belongs to. On my system, apache belongs to a group called apache. So I did something like: # chgrp apache

Re: setting the proper file permisions chmod

2008-12-15 Thread Brian Neal
On Dec 15, 9:51 am, garagefan wrote: > Just wondering if anyone else has experience with setting the write > permissions for apache using mod_python w/ django. > Instead of 0777 I use 0775. I chgrp on the uploads directory, making the group be a group that includes the

Re: image uploading via admin, and an error...

2008-12-10 Thread Brian Neal
On Dec 10, 2:20 pm, garagefan <[EMAIL PROTECTED]> wrote: > getting this error: > > "Upload a valid image. The file you uploaded was either not an image > or a corrupted image." > > tried with a gif and with a jpg. I've got PIL installed..." You may not have the correct libraries installed for

Re: Generate a simple news archive list?

2008-12-10 Thread Brian Neal
On Dec 10, 2:31 pm, David Lindquist <[EMAIL PROTECTED]> wrote: > Hello, > I am building a simple news app for my employer's website. I am using > Django's date-based generic views for the various pages. I want to > have a sidebar listing the archive by year and month like this: > > 2008 > > -

Re: Index page using flatpages

2008-12-10 Thread Brian Neal
On Dec 10, 1:58 pm, Nuno Machado <[EMAIL PROTECTED]> wrote: > Hi Brian. Thank you. > > I've read the documents you pointed out. But the issue is not on > 404/500 html templates, but in the DEBUG setting. No, it isn't. > > I've started a project from scratch to reproduce my error. I used the >

Re: More User/Profile troubles

2008-12-04 Thread Brian Neal
On Dec 4, 11:08 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I apologise for spamming everyone, here i stuck it up at dpaste with > the comments which makes it a bit clearer-http://dpaste.com/96128/ > You are almost there. You are assigning a form instance to your custom profile's user

Re: No module named MySQLdb

2008-12-03 Thread Brian Neal
On Dec 3, 5:54 pm, Udbhav <[EMAIL PROTECTED]> wrote: > > Whenever I point my browser at twinsistermusic.com/mysite/ I get the > following error: > > ImproperlyConfigured: Error loading MySQLdb module: No module named > MySQLdb > > Now, I'm pretty sure I installed MySQLdb correctly, as I was able

Re: More User/Profile troubles

2008-12-03 Thread Brian Neal
On Dec 3, 12:22 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > ... > And here is my view for my signup page - > > def signup(request): >     if request.method == 'POST': >         form = UserCreationForm(request.POST) >         extraform =  CustomProfileForm(request.POST) >         if

Re: Django 1.0 no longer prints higher ASCII?

2008-11-30 Thread Brian Neal
On Nov 30, 9:56 am, Log0 <[EMAIL PROTECTED]> wrote: > Hi all, > > This string : > > data = ''.join( [ chr(i) for i in xrange(256) ] ) > > In Django 0.96, this string prints well. > In Django 1.0, this string simply disappears before going to Apache, > and the data is never transmitted to the

Re: hidden fields in forms

2008-11-25 Thread Brian Neal
On Nov 25, 6:24 pm, ChrisK <[EMAIL PROTECTED]> wrote: > > Well..you aren't passing auth_id to the template, you are passing > > form. auth_id is a field inside your template. Can you post your > > template? > > Oh, sorry - my oversight. Template is > > > id="id_auth_id" /> > Reminder String: >  

Re: hidden fields in forms

2008-11-25 Thread Brian Neal
On Nov 25, 5:06 pm, ChrisK <[EMAIL PROTECTED]> wrote: > I'm just not getting this. I've looked at many examples and can't seem > to pass a hidden value into a form. > > The problem is that I initially get to the form with GET, and then > instantiate the form with PUT. The key that I need is part

Re: django documentation

2008-11-25 Thread Brian Neal
On Nov 25, 8:44 am, ReneMarxis <[EMAIL PROTECTED]> wrote: > Hello Brian > > i allready saw those hints on the djangoproject/djangobook homepage > and that was the reason i was writing this post. > Imagine i am new to django, i read "i have to add those lines to my > model and do some stuff on the

Re: django documentation

2008-11-24 Thread Brian Neal
On Nov 24, 5:18 pm, ReneMarxis <[EMAIL PROTECTED]> wrote: > hi > > as mentioned earlyer today i am very new to django and againe have > some question, this time reguarding the documentation. > > I started django by duing the tutorial, and now i started building my > own little project from ground

Re: Is it possible to display multiple forms in a single template file?

2008-11-20 Thread Brian Neal
On Nov 20, 4:50 pm, ayayalar <[EMAIL PROTECTED]> wrote: > And I do that. Here is my template: > No, you are not. Check the dictionary you are passing into your render_to_response() calls again. --~--~-~--~~~---~--~~ You received this message because you are

Re: Django development approach

2008-11-20 Thread Brian Neal
On Nov 20, 3:54 pm, eldonp2 <[EMAIL PROTECTED]> wrote: > I've spent some time getting comfortable with Django. I would like to > try writing my first real app. I'd like to know whether I should go > ahead to write everything from scratch, or whether... > 1. Using pluggables can be easily

Re: Is it possible to display multiple forms in a single template file?

2008-11-20 Thread Brian Neal
On Nov 20, 4:03 pm, ayayalar <[EMAIL PROTECTED]> wrote: > VIEW: > > def add_product(request): >     if not request.method == 'POST': >         form1 = ProductForm() >         return render_to_response('index.html', {'form1' : form1}) >     else: >         form1 = ProductForm(request.POST) >      

Re: admin's media on apache

2008-11-12 Thread Brian Neal
On Nov 12, 3:32 pm, prem1er <[EMAIL PROTECTED]> wrote: > Still having a problem from the other day.  I can't get the media (css > + images) to show up on my admin pages after I moved it over to > Apache.  I tried a sym link from /home/dev/Django-1.0/django/contrib/ > admin/media/ to

Re: Django newbie observation

2008-11-12 Thread Brian Neal
On Nov 12, 1:12 pm, ayayalar <[EMAIL PROTECTED]> wrote: > I've been using Django for about 1-2 weeks now. I must say it is one > of the most exciting > web frameworks I ever worked with. It is clean, elegant, easy, and > most importantly makes sense. > I've tried to use many other MVC frameworks

Re: django not reading css after switch to apache

2008-11-11 Thread Brian Neal
On Nov 11, 1:15 pm, prem1er <[EMAIL PROTECTED]> wrote: > This is the location of my css files.  /home/dev//Django-1.0/django/ > contrib/... > > On Nov 11, 1:49 pm, prem1er <[EMAIL PROTECTED]> wrote: > > > > > Just got django to work on apache thanks to everyone on this group. > > After I

Re: In Django 1.0, is there a settings that filters out characters from dynamically generated string?

2008-11-11 Thread Brian Neal
On Nov 11, 10:14 am, Log0 <[EMAIL PROTECTED]> wrote: > Hi all, > > So I am using a Django 0.97 for local testing, and shipped a django > script to a production server on WebFaction with Django 1.0. It spits > html that consists of random characters from ascii value 0 to 256. > Works great

Re: An interesting URL dispatcher problem

2008-11-04 Thread Brian Neal
On Nov 4, 10:50 am, redmonkey <[EMAIL PROTECTED]> wrote: > > My problem is with the URL writing. I first wrote some unit tests to > find the regular expressions that worked but Django doesn't seem to > like the '?' in URL configurations. ? is a special character in regular expressions, just like

Re: How to setup django-apache-mod_wsgi without killing existing php site?

2008-10-30 Thread Brian Neal
On Oct 30, 6:14 pm, Håkan Waara <[EMAIL PROTECTED]> wrote: > Hi folks, > > I'm in the process of for the first time deploying a django site that   > (unfortunately) needs to share its Apache with an existing PHP site. > > I've been reading a bunch about mod_wsgi and in many places there are   >

Re: Donation Application

2008-10-28 Thread Brian Neal
On Oct 27, 8:03 pm, unklbeemer <[EMAIL PROTECTED]> wrote: > I did some searching and found nothing. I was wondering if anyone knew > of any django applications out there for receiving donations and/or > tracking those donations (capital campaign progress, pledges donated, > etc.) > > Thanks I'll

Re: tinymce help

2008-10-26 Thread Brian Neal
On Oct 25, 8:47 pm, Bobby Roberts <[EMAIL PROTECTED]> wrote: > hi.  I'm using django 1.0 over at webfaction.  I have the following > setup > > /static   (serves js, css, flash, images etc) > /www   (my django app) > > I have tiny_mce loaded to /static/js/tiny_mce/ > > I have followed the steps at

Re: Cannot get user profile working.

2008-10-24 Thread Brian Neal
On Oct 24, 3:01 pm, kylewild <[EMAIL PROTECTED]> wrote: > thanks brian, good call > > I had read that and somehow not parsed it! > > However, I'm still having the issue after changing it to: > > AUTH_PROFILE_MODULE = 'chat.userprofile' > > (i tried myproject.userprofile as well) > > 'NoneType'

Re: Cannot get user profile working.

2008-10-24 Thread Brian Neal
On Oct 24, 2:23 pm, kylewild <[EMAIL PROTECTED]> wrote: > I'm having this same issue and the fix here, as best I can attempt to > apply it, didn't work for me > > I had AUTH_PROFILE_MODULE set to "myproject.UserProfile" > > After reading this thread, I changed it to "chat.UserProfile" -- to no >

Re: Making queries guide, incomplete code.

2008-10-14 Thread Brian Neal
On Oct 14, 11:35 am, KillaBee <[EMAIL PROTECTED]> wrote: > I was reading the Making queries guide on the the > website.http://docs.djangoproject.com/en/dev/topics/db/queries/#topics-db-que... > It said: > > >>> Blog.objects > > >>> b = Blog(name='Foo', > tagline='Bar') > >>> b.objects > >

Re: Intensive Computations

2008-10-06 Thread Brian Neal
On Oct 6, 5:53 pm, puzzler <[EMAIL PROTECTED]> wrote: > That's why I'm asking now, ahead of programming, for more info about > how hard it is to incorporate an intensive computation into the Django > framework.  It could very well affect my choice of language. It is just python, really. So yes,

Re: installing tiny mce for flatpages

2008-10-06 Thread Brian Neal
On Oct 5, 10:12 pm, Bobby Roberts <[EMAIL PROTECTED]> wrote: > > So you did this > > part?http://code.djangoproject.com/wiki/AddWYSIWYGEditor#UsingTinyMCEwithf... > > > Do you have MEDIA_URL and MEDIA_ROOT setup correctly in settings.py? > > Are you using the development server? Do you have that

Re: installing tiny mce for flatpages

2008-10-05 Thread Brian Neal
On Oct 5, 9:35 pm, Bobby Roberts <[EMAIL PROTECTED]> wrote: > > Did you see this: > > >http://code.djangoproject.com/wiki/AddWYSIWYGEditor > > yeah i saw that and tried to follow it.  Here's what i did: > > 1.  d/l tinymce > 2.  uploaded to /static/admin/js/tiny_mce   (i have static setup as an >

Re: installing tiny mce for flatpages

2008-10-05 Thread Brian Neal
On Oct 4, 3:34 pm, Bobby Roberts <[EMAIL PROTECTED]> wrote: > hi group.  I need some help getting tinymce installed for flatpages in > admin.  I'm serving static content from an application called /static/ > with tinymce located in /static/js/tiny_mce/.  I have read the docs on > creating an

Re: recommended method for administrative scripts?

2008-09-26 Thread Brian Neal
On Sep 26, 2:50 pm, ssam <[EMAIL PROTECTED]> wrote: > Hello > > I have just made my first django site for my uncles wedding photos. It > is very simple, just photos and tags, with a ManyToMany relationship. > I have only made views for viewing the photos and am using the django > admin system for

Re: Concept Q: Extra model fields for clean templates sake

2008-09-25 Thread Brian Neal
On Sep 25, 4:33 am, Gerard Petersen <[EMAIL PROTECTED]> wrote: > Hi All, > > I'm finding myself creating more and more fields in a model to keep my > templates clean. Since it's merely temporary calculated data, and not data to > store permanently it feels like the wrong place. An example: > >

Re: A question about spaces and passing variables...

2008-09-24 Thread Brian Neal
On Sep 24, 7:23 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Wed, Sep 24, 2008 at 6:37 PM, djandrow <[EMAIL PROTECTED]> wrote: > > > So after messing around a for a couple of minutes I discovered the > > urlencode changes About Me to About%20Me, (if you are using firefox 3 > > or above it

Re: Anti-spam suggestions (strange case)

2008-09-24 Thread Brian Neal
On Sep 24, 9:11 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > We have a simple form that allows site visitors to request a free > issue of the magazines we publish. The form simply writes to the > database, and the info is later pulled by the circulation people so > they can send the

Re: ModelChoiceField - remove empty-value

2008-09-22 Thread Brian Neal
On Sep 5, 11:19 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Fri, 2008-09-05 at 03:11 -0700, mwebs wrote: > > Hello, > > > I use amodelchoicefieldand want to remove the entry that represents > > "no item selected"(--), because in my > > scenario I will only allow to select between

Re: Just a note: django web app in django-non-friendly hosting environment

2008-09-20 Thread Brian Neal
On Sep 19, 3:04 pm, "n00m" <[EMAIL PROTECTED]> wrote: > @Brian Neal > > But I think that all your points are not specific to > django per se. Sorta this. Huh? They were just as specific to django as yours were. > + > Does not "my note" make a questi

Re: Just a note: django web app in django-non-friendly hosting environment

2008-09-19 Thread Brian Neal
On Sep 19, 1:40 pm, "n00m" <[EMAIL PROTECTED]> wrote: > You need no at all to ask the hoster to install Django > on his machine. > Apache (etc) + installed mod_python is quite enough to > get your django app running. > > The django package (and e.g. PIL) can be copied to there > along with your

Re: Problem with url tag (Caught an exception while rendering: Reverse ...)

2008-09-19 Thread Brian Neal
On Sep 19, 12:45 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > That's annoying: now *I* have a (named) pattern that won't reverse with > the URL tag: specifically, the edit profile URL from the Google code > profiles app: > >                        url(r'^edit/$', >                            

Re: How do I set up a python web server on Windows XP?

2008-09-19 Thread Brian Neal
On Sep 19, 10:45 am, Jason <[EMAIL PROTECTED]> wrote: > I have read through that. It has taken me around and around in > circles. I have spent a day on this and haven't typed a line of code. > The guide seems to be written for OSX or Linux. As a Windows user I > feel lost, confused and

Re: Problem with url tag (Caught an exception while rendering: Reverse ...)

2008-09-16 Thread Brian Neal
On Sep 16, 4:09 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > Brian Neal wrote: > > I might have found my answer. I was looking at the list of > > incompatible changes and found this: > > >http://code.djangoproject.com/changeset/8760 > &g

Re: Problem with url tag (Caught an exception while rendering: Reverse ...)

2008-09-16 Thread Brian Neal
I might have found my answer. I was looking at the list of incompatible changes and found this: http://code.djangoproject.com/changeset/8760 Which led me to this: http://docs.djangoproject.com/en/dev/topics/http/urls/#reverse I quote from the docs: "The reverse() function can reverse a large

Re: Problem with url tag (Caught an exception while rendering: Reverse ...)

2008-09-16 Thread Brian Neal
On Sep 15, 10:44 pm, Ross <[EMAIL PROTECTED]> wrote: > Check out the description of the {% url %} tag in the Django > documentation: > > http://docs.djangoproject.com/en/dev/ref/templates/builtins/#url > > It does not expect the project name to be in the URL. Try dropping > "gpp" and just use

Problem with url tag (Caught an exception while rendering: Reverse ...)

2008-09-15 Thread Brian Neal
This is my urls.py for an app (notice the two that start with ^category/, they both vector to my function view_links): from django.conf.urls.defaults import * urlpatterns = patterns('gpp.weblinks.views', (r'^$', 'link_index'), (r'^add/$', 'add_link'), (r'^category/(?P\d+)/$',

<    1   2