Re: Email notification on updates?

2008-10-29 Thread Brian Rosner
oaded to their own background process for processing as well. > > Advice? If you want more direct feedback, check out the #pinax channel on freenode. :) -- Brian Rosner http://oebfare.com --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: Using raw_id_fields with a many-to-many field

2008-10-29 Thread Brian Rosner
rather be 'group' if anything. > The resulting admin tool generates a separate Membership ID field > (table row) with a spyglass next to it. Each spyglass sets or replaces > the single ID in that row. I presume you are asking a question here? That extra row is technica

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   > me

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: 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 locally.

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 switched,

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 b

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 /home/dev/djpr

Re: Creating formsets through AJAX

2008-11-19 Thread Brian Rosner
ying to shove a square object through a round hole. Why are you using a model formset when there is "real" queryset? Model formsets are simply a thin layer over formsets. It sounds like you need to those to cleanly write your code and not resort to hacking a model formset to work without a

Re: Creating formsets through AJAX

2008-11-19 Thread Brian Rosner
On Wed, Nov 19, 2008 at 8:59 PM, Brian Rosner <[EMAIL PROTECTED]> wrote: > On Wed, Nov 19, 2008 at 8:43 PM, Luper Rouch <[EMAIL PROTECTED]> wrote: >> For django to save the formset correctly when it is submitted, I have to >> manually set INITIAL_FORMS to 0 in javascri

Re: Creating formsets through AJAX

2008-11-19 Thread Brian Rosner
On Wed, Nov 19, 2008 at 9:14 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > On 20 nov, 05:01, "Brian Rosner" <[EMAIL PROTECTED]> wrote: >> On Wed, Nov 19, 2008 at 8:59 PM, Brian Rosner <[EMAIL PROTECTED]> wrote: >> > On Wed, Nov 19, 2008

Re: Creating formsets through AJAX

2008-11-19 Thread Brian Rosner
I have written some information on that ticket that may be of use to you. -- Brian Rosner http://oebfare.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send emai

Re: Creating formsets through AJAX

2008-11-19 Thread Brian Rosner
On Wed, Nov 19, 2008 at 10:23 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > On 20 nov, 06:01, "Brian Rosner" <[EMAIL PROTECTED]> wrote: >> On Wed, Nov 19, 2008 at 9:53 PM, [EMAIL PROTECTED] >> >> <[EMAIL PROTECTED]> wrote: >

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: 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 integrate

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 subscrib

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: 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 > m

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 o

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: inline forms/subforms: how to use inlineformset_factory ?

2008-11-29 Thread Brian Rosner
nce is passed to the template. Also, don't call a FormSet class or instance 'form'. That is just going to be confusing. It is better named FormSet (or some variant depending on the models) for a class and formset for instances. This will help you see the differences and when you are

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 clien

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 form.i

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 t

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 for

Re: Index page using flatpages

2008-12-10 Thread Brian Neal
On Dec 10, 11:48 am, Nuno Machado <[EMAIL PROTECTED]> wrote: > > My urls.py WAS like this: > > urlpatterns = patterns('', >     (r'^admin/(.*)', admin.site.root), >     (r'', include('django.contrib.flatpages.urls')), > ) This is your problem. Did you read this: http://docs.djangoproject.com/en/

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 sc

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 > > - Nove

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 PIL

Re: FormSet issue. Pre-populating from queryset

2008-12-11 Thread Brian Rosner
ides model formsets that know how to deal with this internally. Go read up on inline formsets which is a layer on top of model formsets. http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#inline-formsets -- Brian Rosner http://oebfare.com --~--~-~--~~~---~--

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 apache user. --~--~---

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 uploads # chmod 775 uploads

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! http://www.djangosnippets.org/snippets/773/ --~--

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 gets called > everyt

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. > {% endif %] > > In an acc

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 > -http://rkutti.wordpress.com/2008/01/31/display-textarea-content-w

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: {{ comment.text|markdown:"saf

Re: Markdown filter piped into custom filter

2009-01-11 Thread Brian Neal
On Jan 11, 11:27 am, Brian Neal 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. Seems to work great. > >

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 my search of the docs. > T

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}} currently r

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

2009-01-12 Thread Brian Neal
On Jan 12, 6:45 pm, Brian Neal wrote: > 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

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 have everything working fine

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 you read through that, pay

Re: Don't see form errors in template

2008-07-15 Thread Brian Luft
, the biggest problem with your code is that you are not using your Registration form to validate the data. Your template is rendering the Registration form, however you have never populated it with data or called is_valid() on it. Also, form_for_model is being deprecated - use ModelForms if y

newforms-admin branch has been merged into trunk

2008-07-18 Thread Brian Rosner
branch is now closed. Onward to 1.0! [1]: http://code.djangoproject.com/changeset/7967 [2]: http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges Brian Rosner http://oebfare.com --~--~-~--~~~---~--~~ You received this message because you are subscribe

Re: newforms-admin branch has been merged into trunk

2008-07-19 Thread Brian Rosner
On Jul 18, 2008, at 6:22 PM, Ariel Mauricio Nunez Gomez wrote: > BTW: Bryan, you've gotta redo the commits visualization[1] for > another big explosion!! I plan on updating the visualization right after we release 1.0. :) --~--~-~--~~~---~--~~ You received thi

Re: superuser has no rights with newforms admin

2008-07-19 Thread Brian Rosner
e app you would also keep around register calls for the default AdminSite instance for the user common case. Brian Rosner http://oebfare.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users&qu

Re: formset and __init__

2008-08-20 Thread Brian Rosner
> extra=5). > question is: where do I set path_server & path? You must subclass django.forms.formsets.BaseFormSet and override _construct_form to pass in your parameters. Then you can pass your FormSet subclass as the base of the FormSet returned by formset_factory like so: formset_fa

Re: formset and __init__

2008-08-20 Thread Brian Rosner
"my_own_argument"] = "my value" return super(MyBaseFormSet, self)._construct_form(i, **kwargs) > > On Aug 20, 5:21 pm, "Brian Rosner" <[EMAIL PROTECTED]> wrote: >> On Wed, Aug 20, 2008 at 9:10 AM, patrickk <[EMAIL PROTECTED]> wrot

Re: Inline models in the admin interface not re-savable

2008-08-22 Thread Brian Rosner
of the save() methods? > Looks like you are hitting http://code.djangoproject.com/ticket/7888. I am working on a fix today actually. Keep an eye out there. -- Brian Rosner http://oebfare.com --~--~-~--~~~---~--~~ You received this message because you are su

Bug in ImageFieldFile.save() ?

2008-08-26 Thread Brian Morton
The docs (and an analysis of the code) indicate that the second argument to save should be the content. http://docs.djangoproject.com/en/dev/ref/files/file/#ref-files-file I am assuming this is binary or text content to be written to the file in question. ImageFieldFile calls get_image_dimensio

Re: Bug in ImageFieldFile.save() ?

2008-08-27 Thread Brian Morton
Thanks for the clarification. I will definitely look forward to having file-like objects work this way. I'll keep my eye out for the commit. On Aug 27, 7:23 am, "Marty Alchin" <[EMAIL PROTECTED]> wrote: > On Wed, Aug 27, 2008 at 12:37 AM, Brian Morton <[EMAIL PROT

Marking form field label as safe?

2008-08-27 Thread Brian Morton
I am trying to do raw HTML output in a form field's label. I've tried using mark_safe on the string being passed as the label argument, but it is still escaped. Can anyone point me in the right direction please? --~--~-~--~~~---~--~~ You received this message beca

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

2008-09-15 Thread Brian Neal
27;gpp.core', 'gpp.accounts', 'gpp.legal', 'gpp.contact', 'gpp.weblinks'] Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.mid

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 "web

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: Can anyone tell me how the hell to get url tags to work?

2008-09-16 Thread brian mckinney
I'm having a very similar problem. This code worked fine pre-Django 1.0, now I am really struggling to find the problem. url.py : url(r'^(?P\d{4})/$', blog_views.post_archive_year, name = "blog_archive_year"), views.py def post_archive_year(request, year): return date_based.archive_year(

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: Can anyone tell me how the hell to get url tags to work?

2008-09-16 Thread brian mckinney
Thanks for checking the code Malcolm, you were right on, I was overlooking a line of code in my templates. Thanks again. On Sep 16, 7:27 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Tue, 2008-09-16 at 14:33 -0700, brian mckinney wrote: > > I'm having a very simila

Re: Can anyone tell me how the hell to get url tags to work?

2008-09-16 Thread brian mckinney
ad of blog.blog_index like it should be. On Sep 16, 8:23 pm, brian mckinney <[EMAIL PROTECTED]> wrote: > Thanks for checking the code Malcolm, you were right on, I was > overlooking a line of code in my templates. Thanks again. > > On Sep 16, 7:27 pm, Malcolm Tredinnick <

Re: Can anyone tell me how the hell to get url tags to work?

2008-09-16 Thread brian mckinney
:06 -0700, brian mckinney wrote: > > One more question. > > > How does reverse decide which directories to look in for the named url > > match? > > > I've got my main app (myapp) in one location and basic apps like a > > blog installed on elsewhere on my pyth

Re: Can anyone tell me how the hell to get url tags to work?

2008-09-16 Thread brian mckinney
e given month (Only available if make_object_list argument is True) """ return date_based.archive_year(request, year = year, queryset = Post.objects.published(), date_field = 'publish', make_object_list = True) ###Template By month {% for month in date_list

Re: Context Processor in Admin

2008-09-17 Thread Brian Rosner
o differentiate between the two you can put a conditional around kwargs["add"] and/or kwargs["change"] which will be True in their respective cases. -- Brian Rosner http://oebfare.com --~--~-~--~~~---~--~~ You received this message because you are su

Re: HttpResponseRedirect or render_to_response

2008-09-19 Thread Brian Victor
t URL. It might be useful to look at, e.g., create_object here: http://code.djangoproject.com/browser/django/trunk/django/views/generic/create_update.py You'll notice that it renders the template in every circumstance except when the method is POST and the form is valid, in which case it

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 frustrated.

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/$', >                            vi

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: 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: 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 ex

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 issues

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 wi

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: > > I

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: 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 admin

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-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: 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, y

Re: Django + tiny_mce

2008-10-07 Thread Brian Jones
is unbelievably annoying that I had to spend so many hours to get it to work, but I thank you for your clue! brian On Tue, Oct 7, 2008 at 10:00 AM, Brian K. Jones <[EMAIL PROTECTED]> wrote: > > Sorry for the mix up. The log messages I pasted in are from yet > another test config,

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 > > Traceb

Forwarding emails through django

2009-01-16 Thread Brian Victor
ssage that preserves everything like that. (For all I know, I'd be breaking RFCs to do so, anyway.) Is there another approach I could take? -- Brian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Dja

Re: Forwarding emails through django

2009-01-17 Thread Brian Victor
CLIFFORD ILKAY wrote: > Brian Victor wrote: >> I'd like to forward incoming emails to a distribution list defined by >> querying the User table. > In our hosting operation, we store virtual domain, virtual user, and > forwarder data for Postfix in PostgreSQL. The follow

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 cus

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: http://docs.djangoproject.com/en/dev/topics/forms/media/#topics-forms-media I've i

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 my_tags

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, it is very nice and it

Re: Where can i get a wiki formatting widget?

2009-01-24 Thread Brian Neal
On Jan 24, 10:23 am, Brian Neal wrote: > 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! &

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 facing form, check out t

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, unique=True) >         >    

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 recall, PIL out of the box onl

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 still run into django url

Automatically printing display of model object's data

2009-01-27 Thread Brian Ray
xcept: atr =getattr(res,instr) print "%s: %s" % (instr,atr) It sort of prints out an easy to read representation of any model object. Is there a better way to do this? I am sure there was something already in Django to do this, but I am having a hard way of finding. I

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 > > under apache. > > > The settings and http

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 surprised you don't get an error on lin

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 field in MemberProfile

Getting uploaded file content type in model save

2009-02-04 Thread Brian Morton
I am working with PIL to resize and thumbnail images during a model save method. I am using SimpleUploadedFile as a wrapper to facilitate the thumbnail field's save method. SimpleUploadedFile requires that the proper content type be passed in as an argument. The trouble is, I may be working wit

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: 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 t

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 been done to date. But af

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 a template (i.e. index.html

Re: Formsets issue

2009-02-18 Thread Brian Rosner
dictToSend, > context_instance=RequestContext(request)) One thing I am noticing here is that if the formset fails to validate you are not putting the formset in the dictToSend to be rendered with the error messages. The best way to do this is just simply unindent the formset assignment t

<    1   2   3   4   5   6   7   8   9   10   >