ImageField woes

2009-08-21 Thread Jon
I want to expand on the ImageField functionality of django. Mainly, I want to check the dimensions of the image the user is uploading, and resize / crop where appropriate. I would also like to set compression amount, and perhaps even allow for watermarking. I know there are several libraries out t

What data structure to use, and how?

2009-05-16 Thread Jon
{% block status_table %} {% for server in output_list %} {{ server }} {% for value in server %} {{ value }} {% endfor %} {% endfor %} {% endblock %} This prints each letter of the server name in differen

Re: user object in login.html

2009-05-19 Thread Jon
o go about doing the redirect. HTH Jon. On May 19, 10:43 am, Rok wrote: > But what if "user" specify login URL in the browser? He gets login > form regardless if he is logged in or not. > > For example I have ( r'^login/$', login ) in urls.py and if I > reques

Re: user object in login.html

2009-05-19 Thread Jon
Ah, and if you only want to display a message on the login page, that's possible too. In that case you don't use the redirect in the view, but use an if clause in your index.html template. Something like this: {% if logged_in %} You are logged in already. {% endif %} Jon. On May 2

Finding a form field's widget type from the template

2009-12-01 Thread Jon
I'm trying to figure out how to determine a model form field's widget type from the template. I would like to loop through the fields as opposed to writing out each field explicitly in the template, but in order to loop through them, I need to know the widget type so I can do something special wit

Re: Open source CMS (if based on Django better)

2010-05-08 Thread Jon
Right now i'm evaluating which technology learn to develope applications (web app). I'm thinking on CMS and lately in Flex (also pyjamas) or more interactive technologies, thinking in develope an application to monitoring remote systems through the Internet. I have to consider the most requested s

Model design graphically or UML

2010-05-23 Thread Jon
Hello, Trying to include some graph tool for managing and sharing data models visually. Testes mysql workbench, dia, graphivz and recently read some about argoUML.. ¿Do you know and recommend any visual tool for model design? Better if database independent thanks in advance !! -- You received

Re: Considering Django: How simple is customising django-admin?

2010-04-08 Thread Jon
1. Inlines http://docs.djangoproject.com/en/dev/ref/contrib/admin/#inlinemodeladmin-objects 2. Form media http://docs.djangoproject.com/en/dev/topics/forms/media/ 3. Your example does not require custom template overrides for the admin HTML, it is possible to simply include a function from your

Re: Django and Caching Pages

2008-02-05 Thread jon
boralyl wrote: > Jonathan, > > Thanks for your response. I first tested the site in firefox and > konqueror and had no problems. When using opera though I noticed it > wasn't requesting the page, as you had mentioned. The browser cache > was set to check every 5 hours on document requests. I c

Inherited models...

2008-04-15 Thread Jon
want or certainly just ignore it. However, it really shouldn't be created at all and the ideal thing would be to be able to declare an option for an abstract model class that would suppress the creation of any table for that class. Thanks! Jon Rosen --~--~-~--~~

Re: Inherited models...

2008-04-15 Thread Jon
Thank you! I read the doc and it looks like this is precisely what I want. I will look into updating to this latest release. Jon --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To po

Strange tutorial behavior...

2008-04-17 Thread Jon
ork and I can put new entries into the table. I just keep getting these tracebacks anytime there is a date/ time in the view. This does not appear on the Choices screen which has no date in the tutorial, but if I add a date/time field, it starts to happen there. Of course, the traceback indicates that

Re: Strange tutorial behavior...

2008-04-17 Thread Jon
-and-paste from the standard tutorial so unless I screwed something up, I don't see why I am getting the weird error. Thanks! Jon --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Strange tutorial behavior...

2008-04-17 Thread Jon
http://localhost:8000/admin/ to http://127.0.0.1:8000/admin/, the second exception that was occurring above disappears (only the first remains). And when I switch to Firefox, no problems at all. Any ideas? Jon On Apr 17, 1:27 pm, "Hernan Olivera" <[EMAIL PROTECTED]> wrote: > Ma

Re: Strange tutorial behavior...

2008-04-17 Thread Jon
n IE and FF So, problem appears to have been solved! Jon --~--~-~--~~~---~--~~ 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 unsubscr

Calling all Django / Python Developer

2007-10-10 Thread Jon
Hey all you Django Guru's! I'm a recruitment consultant working within the interactive sector in London. One of my clients has an excellent opportunity for an experienced Django / Python Developer. Suitable candidates ideally will have previously worked for a tier 1 type consumer internet compan

Re: django discarding MySQL results for "in" operator

2012-02-11 Thread Jon
Karen Tracey gmail.com> writes: > > > On Mon, Jan 5, 2009 at 3:37 PM, JonUK flinttechnology.co.uk> wrote: > > > > Apologies as this is a repost, but I'm completely stuck! > I'm using django 1.0.2 and the tagging app to retrieve a tag via a > database "in" query, and something is causing th

Re: Choosing a JS framework to go together with Django

2013-07-14 Thread Jon
ginal post was to NOT do two different views; one for search bots and one for browsers. I agree that providing a REST interface is the "right" way to provide data for both browsers and mobile apps. To that end, the project I was suppose to work on, used tastypie. // Jon On 14/07

'RegexURLResolver' object has no attribute 'default_args'

2016-12-23 Thread jon
I am a newbie to Django, coming from PHP/Yii. I have gotten to the part 4 of the official Django tutorial but can't seem to get by this error. I have looked online and in this forum but cannot find anything on this specific error. Error: AttributeError at /polls/1/vote/ 'RegexURLResolver' obj

Re: Django project beginner

2016-12-28 Thread jon
I would recommend the Django Girls tutorial. It is very well written and easy to follow. I covers most of the components that you will need to get started with Django and is a good starting point. https://tutorial.djangogirls.org/en/ On Monday, December 26, 2016 at 6:39:25 AM UTC-5, imed chaabo

Master-Detail Form help needed

2017-01-16 Thread jon
I have been struggling mightily with Master-Detail forms in Django. I have done a number of online tutorials but have yet to find a complete tutorial which completely explains models, views, templates, URL patterns related to master-detail forms. I use the Oracle toolsets where creating a maste

Foreign Key data not showing in formset

2017-02-08 Thread jon
I have the following view with an inlineformset for two models: 1. Orders, the master / parent model 2. LineitemInfo, the detail / child model. FormSet LineFormSet = inlineformset_factory(Orders, LineitemInfo, can_delete=True, exclude = ('ordernotes',)) The edit order_edit vie

Re: Foreign Key data not showing in formset

2017-02-08 Thread jon
, 2017 at 8:00:52 AM UTC-5, jon wrote: > > I have the following view with an inlineformset for two models: > >1. Orders, the master / parent model >2. LineitemInfo, the detail / child model. > > FormSet > > > LineFormSet = inlineformset_factory(Orders, Lin

Re: Updating path and filename of ImageFieldFile

2008-10-21 Thread Jon Biddle
This code should work with Django 1.0 : from django.db import models from PIL import Image class Photo(models.Model): related_entry_id = models.ForeignKey(MyBlogEntryModel) # Use your model object photo = models.ImageField(upload_to="my_upload_path/") # Point to your upload directory (No

Re: Does Django have a function that can be called by every view function ?

2008-12-01 Thread Jon Loyens
h the Django code to see how it's implemented. Don't be afraid of cruising through the code. As good as the documentation is, the code is also well organized and uses a lot of good pythonic idioms if you're new to the language. Jon. On Dec 1, 6:49 am, martyn <[EMAIL PROTECTED]&

Re: Where are all the Django jobs?

2009-01-11 Thread Jon Loyens
#x27;ll get to be the person who influences what gets used in various situations. It's in those situations that you'll get to grab your favorite tool: Django. Jon Loyens Thinktiv, Inc. On Jan 11, 1:14 am, Malcolm Tredinnick wrote: > On Sat, 2009-01-10 at 15:38 -0700, David Lindquis

Re: Quick question about switching to newforms-admin branch....

2008-07-15 Thread Jon Brisbin
I assumed that trunk would be moving in the newforms-admin direction, so I've switched already. I would rather do it now than have to backport stuff later... Thanks! Jon Brisibn http://jbrisbin.com On Jul 15, 2008, at 3:50 PM, Dan wrote: > Should I start with the nfa branch or wi

Re: legacy site in php

2008-07-15 Thread Jon Brisbin
create some internal strife in your mind, though, as you switch between worlds. Use the Force, though, and everything will magically turn out all right. ;) Thanks! Jon Brisibn http://jbrisbin.com On Jul 15, 2008, at 4:41 PM, garycannone wrote: > > I have what is a very naive question t

accessing site settings in templates

2008-07-16 Thread Jon Brisbin
e other feature of views I'm missing (I've read so much on Django lately, I'm starting to forget what I've read and what I haven't)? Thanks! Jon Brisibn http://jbrisbin.com --~--~-~--~~~---~--~~ You received this message because you a

OpenID support in contrib.auth

2008-07-16 Thread Jon Brisbin
e ASL (python-openid's license) *is* compatible with BSD, right? Thanks! Jon Brisibn http://jbrisbin.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, s

Re: Why 2 servers to serve dynamic and static content?

2008-07-17 Thread Jon Brisbin
Aliases or mod_rewrite won't work for me. In production, it'll be on a shared hosting provider, so I have to use rewrite rules running through an FCGI script and serve all other files and directories that actually exist through n

Re: accessing site settings in templates

2008-07-17 Thread Jon Brisbin
I was considering this option, but went with some custom middleware, which allows me to mix in some other things I was wanting to add to the context as well... Thanks for the suggestion! Jon Brisibn http://jbrisbin.com On Jul 17, 2008, at 4:16 PM, gordyt wrote: > > Jon I don't

Re: accessing site settings in templates

2008-07-17 Thread Jon Brisbin
he GWT hosted mode browser, desktop Firefox, and the iPod Touch, all at the same time. Thanks! Jon Brisibn http://jbrisbin.com On Jul 17, 2008, at 6:45 PM, [EMAIL PROTECTED] wrote: > > Look at these sample code , is this you want ? > > from django.template import loader, RequestC

Re: superuser has no rights with newforms admin

2008-07-19 Thread Jon Atkinson
registering my models using admin.site.register(Person), but I still get the permission error in the admin site. I've also tried flushing the database, but that doesn't seem to solve anything. FWIW, my user has is_superuser, is_staff and is_active all set to true in my database. The exa

Re: superuser has no rights with newforms admin

2008-07-20 Thread Jon Atkinson
ed admin.py files for my models and > registered the classes with admin.site.register(). Same here (having followed the earlier advice on the list). Is there any more useful information which I could post to help debug this? --Jon --~--~-~--~~~---~--~~ You rece

Re: superuser has no rights with newforms admin

2008-07-20 Thread Jon Atkinson
#x27;you don't have permission to edit anything' message in the admin application. Any help debugging this would be much appreciated - now that newforms-admin is in trunk, I can't justify continuing development without it, so I'd really like to solve this :-) --Jon [1] http://c

Re: superuser has no rights with newforms admin

2008-07-20 Thread Jon Atkinson
x27;s available at: http://jonatkinson.co.uk/static/junk/myproj.zip FWIW, I'm using SVN trunk at revision 7951. I realise that asking anyone to download and run my project just to help me fix a problem is quite a presumptious request, but I live in hope :-) --Jon --~--~-~--~~-

Re: superuser has no rights with newforms admin

2008-07-20 Thread Jon Atkinson
out on my machine, but it appears that I updated my nfa branch, and not my trunk, but then went ahead and installed my (old) trunk code. PEBKAC. Sorry for wasting your time, but thanks a lot for your help anyway, Karen. --Jon --~--~-~--~~~---~--~~ You received t

Re: superuser has no rights with newforms admin

2008-07-20 Thread Jon Atkinson
> You can't really be using trunk 7951 -- that's from before newforms-admin > merge which was 7967?? Try updating to latest trunk? So I feel slightly ... foolish :-) --Jon --~--~-~--~~~---~--~~ You received this message because you are subscrib

I posted a new template tag for forever-caching resources...

2008-08-18 Thread Jon Brisbin
is and I'd be interested in hearing how to do that. I hope you find this useful. Comments are welcome! Thanks! Jon Brisbin http://jbrisbin.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Djang

SuspiciousOperation exception on ImageField upload

2008-08-19 Thread Jon Atkinson
in my home folder: '/home/username/projectname/media/', and this folder has it's permissions set to 777. I'm currently using the ./manage.py webserver, which (I assume) runs as the same user which starts the process; this is the same user as owns the folder specified above.

Re: SuspiciousOperation exception on ImageField upload

2008-08-19 Thread Jon Atkinson
Marty, That was the problem, thank you for you help. --Jon On Tue, Aug 19, 2008 at 2:13 PM, Marty Alchin <[EMAIL PROTECTED]> wrote: > > On Tue, Aug 19, 2008 at 8:47 AM, Jon Atkinson <[EMAIL PROTECTED]> wrote: >> I'm trying to work with a model which accepts

Using ETags with Django

2008-08-19 Thread Jon Brisbin
ble to be reused with any views I want ETags for...but not *every* view) way? I'd like hear how others have solved this before I spend a lot of time hitting dead ends. Thanks! Jon Brisbin http://jbrisbin.com --~--~-~--~~~---~--~~ You received this mess

Composite Forms? Are widgets the right thing to use?

2008-08-22 Thread Jon Loyens
Hi all, I have a sight where I need to generate forms that are made up of two or three other forms. For example I have New User sign up form that accepts user information (user name, name, password), a shipping and a billing address (with the same usual field) and credit card info. Sometimes, I

Re: Is it possible to use Django + Postgresql on leopard?

2008-08-23 Thread Jon Brisbin
. I use Postgres 8.3 and I had to make sure my CFLAGS and LDFLAGS were set such that /Library/PostgreSQL8 was found by psycopg's configure. It's called py25-psycopg2. Thanks! Jon Brisibn http://jbrisbin.com On Aug 23, 2008, at 1:08 PM, Theme Park Photo, LLC wrote: > > I have

Re: Composite Forms? Are widgets the right thing to use?

2008-08-24 Thread Jon Loyens
Thanks guys! Using multiple forms + prefixes is exactly what I need! Would be nice if there was some global wrapper though so you could do validation amongst the forms but beggars can't be choosers. On Aug 23, 2:28 am, Daniel Roseman <[EMAIL PROTECTED]> wrote: > On Aug 23, 2:33 am, Jeff Anderso

Schema Evolution Choices?

2008-09-01 Thread Jon Loyens
hadn't updated it to the 1.0 branch yet. Any options or opinions are appreciated. Thanks, Jon. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: OT: Google Chrome

2008-09-02 Thread Jon Brisbin
rite to work on IE. I think that's why I've gravitated to the iPhone. Closed platform or not, it's great to have some stability and predictability as a developer. I've never really had that before and it's kind of nice. Thanks! Jon Brisibn http://jbrisbin.com On Sep 2, 20

Re: Connecting to AS400

2008-09-11 Thread Jon Brisbin
ng the ORM, AFAIK. If I'm wrong about that, I'd love to hear it because I could use that as well! :) Thanks! Jon Brisibn http://jbrisbin.com On Sep 11, 2008, at 3:50 PM, Jason Sypolt wrote: > > Is it possible to connect to an as400 database using django > (preferably) or

Re: troubles with mod_python on Leopard

2008-09-11 Thread Jon Brisbin
/django, which is found by Apache launched by launchd. From there, the basic mod_python directions seemed to work for me. I'm not using Apache any more, though, as I've moved to lighttpd. Thanks! Jon Brisibn http://jbrisbin.com On Sep 11, 2008, at 2:37 PM, [EMAIL PROTECTED] wrote:

Deleting a Model with ForeignKey relationship where null=True in Admin causes IntegrityError

2008-10-09 Thread Jon Loyens
See the following set of models: class Mom(models.Model): name = models.CharField(max_length=80) def __unicode__(self): return self.name class Dad(models.Model): name = models.CharField(max_length=80) def __unicode__(self): return self.name class Child(models.M

Re: Deleting a Model with ForeignKey relationship where null=True in Admin causes IntegrityError

2008-10-09 Thread Jon Loyens
As a note... I've worked around this for the time being by setting cascade on delete explicitly in db. That said, I'd still like to know if this is a bug or if I'm doing something wrong with my models. Jon. On Oct 9, 11:28 am, Jon Loyens <[EMAIL PROTECTED]> wrote: >

Re: Deleting a Model with ForeignKey relationship where null=True in Admin causes IntegrityError

2008-10-09 Thread Jon Loyens
1.1 feature. I'll shut up now as this discussion clearly belongs in django-dev being discussed by people with more in-depth knowledge than myself ;) Thanks Malcolm. Jon. In the interim, for this project, I'll continue to explicitly set cascading deletes in the db. On Oct 9, 8:12 p

Django 1.0.2 runfcgi fails to start on Windows

2009-01-17 Thread Jon Prater
Hi, all. For various reasons, I prefer to use python 2.6 on my computer. Since mod_python and mod_wsgi won't work on Python 2.6, I have to use FCGI or switch to Python 2.5. I have flup installed without any problems. However, when I try to run this command: manage.py runfcgi method=threaded host

Re: Django 1.0.2 runfcgi fails to start on Windows

2009-01-17 Thread Jon Prater
16 pm, Daniel Roseman wrote: > On Jan 17, 6:44 pm, Jon Prater wrote: > > > > > Hi, all. > > For various reasons, I prefer to use python 2.6 on my computer.  Since > > mod_python and mod_wsgi won't work on Python 2.6, I have to use FCGI > > or switch to

Re: Django 1.0.2 runfcgi fails to start on Windows

2009-01-17 Thread Jon Prater
I don't have one, but if mingw would do I know where I can get it. On Jan 17, 5:19 pm, Graham Dumpleton wrote: > On Jan 18, 6:31 am, Jon Prater wrote: > > > There are no precompiled binaries for mod_wsgi with Python 2.6.  In > > order to use it, I would have to download

Re: Displaying Data from Multiple Tables

2009-02-03 Thread Jon Loyens
Alex, would you mind posting your complete template at dpaste.org for us to look at? It might clarify how you're trying to do the output. Thanks, Jon. On Feb 2, 11:37 pm, Alexiski wrote: > > On Mon, 2009-02-02 at 21:21 -0800, Alexiski wrote: > > > Hi Malcolm, > > &g

Re: Displaying Data from Multiple Tables

2009-02-03 Thread Jon Loyens
Oops... I meant dpaste.com On Feb 3, 8:54 am, Jon Loyens wrote: > Alex, would you mind posting your complete template at dpaste.org for > us to look at?  It might clarify how you're trying to do the output. > > Thanks, > > Jon. > > On Feb 2, 11:37 pm, Alexiski wrot

Re: [slightly offtopic] Which Python are people using on OSX?

2009-02-05 Thread Jon Dufresne
On Thu, Feb 5, 2009 at 1:07 PM, cjl wrote: > 1. Use the stock Python, slightly outdated 2.5.1, with weird and > incomplete modules. > 2. Compile Python myself from source. > 3. Use MacPorts Python. Anyone know why the nearly all of Xorg gets > built as a dependency? > 4. Use the macpython .dmg >

extending admin change_form template

2009-03-03 Thread Jon Reck
r = 920) it works. I can't figure out how to code this so the current record number is inserted by the program. Is there some sort of template variable that I can use for this? Or can you suggest a better approach? thanks , Jon {% extends "admin/change_form.html" %} {% load i18n %}

Re: extending admin change_form template

2009-03-04 Thread Jon Reck
Thank you so much. Works like a charm. Print Labels -Jon On Wed, Mar 4, 2009 at 1:18 PM, AmanKow wrote: > > On Mar 3, 10:50 am, Jon Reck wrote: > > I'm a novice Python and Django programmer so please don't assume a lot of > > knowledge here. > > I'm tr

Re: Very bad experience in Django...

2009-06-25 Thread Jon Raphaelson
could get confused about using them _without a checkbox widget_. I'm going to open a ticket against the doc here and submit a first pass at a documentation patch. Confusion is worth fixing IMO. - Jon --~--~-~--~~~---~--~~ You received this message because you are s

Re: Using Django other-than as web framework.

2009-07-02 Thread jon michaels
What do you get when you type 'python manage.py dbshell'? On Thu, Jul 2, 2009 at 10:25 AM, Harsha Reddy wrote: > > I using Django from past one week. > > On the Django web site, I read that it is a high-level python web > framework. Inspite of knowing this I am trying to use a Django > applicati

A simple use for multidb... is this possible yet?

2009-07-19 Thread Jon Loyens
Hi everyone (particularly those working on multidb), I have a pretty simple use case that involves use of multidb support and I was wondering if the code base for multidb is far enough along to help me out on this. Basically, I have a legacy enterprise db that I've created working models for usi

Re: Can i add initial admin user?

2009-08-01 Thread Jon Atkinson
ut the management commands ./manage.py sqlreset and ./manage.py reset. These commands drop the tables for a single app and re-creates them, but will leave your auth tables intact, so you don't need to re-create your superuser. --Jon --~--~-~--~~~---~--~~ You receive

Passing an object between views

2009-08-02 Thread Jon Renaut
I would like to use a form to collect a billing address, pass this address to a new form where I collect credit card info, and then pass the whole thing to the credit card processor. The only thing I want to save to the database is a shipping address. Is there a best practice for doing this? Be

Re: Passing an object between views

2009-08-02 Thread Jon Renaut
And that's it? I guess I've always been afraid of the session due to working on web apps with non-traditional architecture (A web app built entirely in PL/SQL, for example). Thanks for the help. On Aug 2, 9:13 pm, Steve Schwarz wrote: > On Sun, Aug 2, 2009 at 6:58 PM, Jon

Django job in Manchester, UK

2009-08-10 Thread Jon Atkinson
Hello, We're a 70% Django, 30% PHP shop in Manchester, in the UK. We're looking to recruit a Django developer in the near future. This might be of interest to some people on this list. Job description and application information: http://bit.ly/qlguI Chee

Emacs/yasnippet bundle for Django 1.0

2009-04-16 Thread Jon Atkinson
for Textmate[1]. They've available on github at: http://github.com/jonatkinson/yasnippet-djangotree/master ... and I've made the first release, a tarball is available here: http://cloud.github.com/downloads/jonatkinson/yasnippet-django/yasnippet-django-1.0.zip I hope someone finds this us

Re: Emacs/yasnippet bundle for Django 1.0

2009-04-16 Thread Jon Atkinson
Hello, > http://github.com/jonatkinson/yasnippet-djangotree/master Somehow I managed to make a typo :-) The correct link to the github page is: http://github.com/jonatkinson/yasnippet-django/tree/master Cheers, --Jon --~--~-~--~~~---~--~~ You received t

Re: What data structure to use, and how?

2009-05-16 Thread jon michaels
Works like a charm. Thanks a lot Alex, it saves me a lot of searching and trying. On Sun, May 17, 2009 at 2:37 AM, Alex Gaynor wrote: > > > On Sat, May 16, 2009 at 4:52 PM, Jon wrote: > >> >> >> Hi all. >> >> I think django really rocks, but i have a

How to save the data from a form to my db.

2009-05-18 Thread jon michaels
27;'. I used this statement: cursor.execute("insert cr into editor.conffile values('%s')", cd['cr']) The following failed with "global name 'cr' is not defined" cursor.execute("insert cr into editor.conffile values('%s')", cr)

Re: user object in login.html

2009-05-18 Thread jon michaels
>From the documentation it seems that it is not only possible, but required too.. login_required() does the following: * If the user isn't logged in, redirect to settings.LOGIN_URL (/accounts/login/ by default), passing the current absolute URL in the query string as next or the value of red

How to pass variables from a different file to via a view to a template?

2009-05-25 Thread jon michaels
Hi list, In an attempt to follow the DRY principle and keep environment specific variables separate from my application code, i decided to put a number of application specific variables in a different file. So i have a file like this: --- u...@host:~/program$ more appenv.py ## # app environ

Re: How to pass variables from a different file to via a view to a template?

2009-05-28 Thread jon michaels
Django has great documentation. One remaining question for people who have vast experience creating reusable django applications, is if the appenv.py file is a good approach if my goal is to write django applications with reuse in mind. Thanks in advance for your response. On Mon, May 25, 2009

Python 2.6.2 + Django 1.1 fails to install..

2009-09-22 Thread Jon Cage
I have Python installed and working but when I try and install Django using: python setup.py install ..it chunters through a load of stuff and then fails: creating C:\Python26\Lib\site-packages\django\contrib\localflavor\sk copying build\lib\django\contrib\localflavor\sk\forms.py -> C: \Python

syntax error what am i doing wrong???

2009-10-26 Thread jon...@cox.net
SyntaxError at / ('invalid syntax', ('c:\\Users\\Vincent\\Documents\\django_bookmarks\ \..\\django_bookmarks\\bookmarks\\views.py', 15, 20, 'return Http Response(output)\n')) SCRIPT FROM VIEWS.PY from django.http import HttpResponse def main_page(request) : output = ''' %s

Django job at the Alliance for Climate Protection

2009-11-03 Thread Jon Lesser
Hello, I'm looking for a Django programmer to work with me full-time at the Alliance for Climate Protection. If you're in DC, or want to be, check out the job posting below. Best, Jon Lesser Lead Developer, repo...@home - Web Developer @ Alliance for Climate Protec

Dynamic Form Widget [django admin]

2010-07-14 Thread Jon Walsh
nces (i.e. "data_type" value) are needed to decide what field the form should have... Any help would be greatly appreciated! thanks, Jon -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to d

Re: Managing static content / basically handling images best practices

2010-07-14 Thread Jon Walsh
I solved this issue by making the FileField (or ImageField) save the files into an Apache (or other web server) served directory. Though obviously this has security implications so I only do this for the password protected admin. Hope that helps cheers, Jon On Jul 15, 12:33 am, reduxdj wrote

Static files ...

2010-11-13 Thread Jon Snidal
n upgrade. I'm really only trying to add a little Django functionality to an existing static site, so dealing with my vast number of static files easily is crucial. Of course, my plan is to generate more of my site dynamically over time. I just can't get past this point! Thanks for a

Template and Form Question

2010-02-05 Thread Jon Loeliger
Folks, I would appreciate some help figuring out how to create a templated form scenario. The quick form of the question is either: How do I iterate over two form field list simultaneously in my template using {% for f in form %}, sort of like {% for f,g in form1,form2 %}? or

[ANSWER] Re: Template and Form Question

2010-02-10 Thread Jon Loeliger
> Folks, > > I would appreciate some help figuring out how to create a > templated form scenario. The quick form of the question is > either: > > How do I iterate over two form field list simultaneously > in my template using {% for f in form %}, sort of like > {% for f,g in form1,fo

State of the Django MPTT Art?

2010-02-10 Thread Jon Loeliger
Folks, I'd like to add a few MPTT manged data-sets to my projects so I am wondering what the current state of the MPTT art is. I'm using Danjgo 1.1.1 right now, and would like to slap down an MPTT manager in my project that is BSD-ish licensed, allows multiple, different sets of nodes, and hopefu

Re: Getting uploaded images to show

2010-02-13 Thread Jon Loeliger
> 2010/2/13 holger : > > I am new to django and I am trying to get an image upload to work. > > > > My media url is > > MEDIA_URL =3D 'http://127.0.0.1:8000/media/' > > > > and my media_root is > > MEDIA_ROOT =3D os.path.join(PROJECT_ROOT, 'media') > > > > where project_root points to the root fold

AJAX Autocompletion Field

2010-02-13 Thread Jon Loeliger
Folks, For likely the umpteenth time, can someone recommend a good AJAX auto completion tutorial or example that I might use to crib-together a text-field selection that would otherwise be a very large drop-down selection field? My use case would be essentially like having a table full of say, re

Slugify() and Clean form data Questions

2010-02-18 Thread Jon Loeliger
Folks, Quick question or two: Is there a canonical definition or even a reference implementation of a slug = slugify(str) function somewhere? Yeah, I could go grep through the sources and maybe find one? And yes, I see: http://docs.djangoproject.com/en/dev/ref/models/fields/#slugfield But

Re: Slugify() and Clean form data Questions

2010-02-18 Thread Jon Loeliger
> > > Is there a canonical definition or even a reference implementation > > of a slug =3D slugify(str) function somewhere? Yeah, I could go > > grep through the sources and maybe find one? And yes, I see: > >=20 > >http://docs.djangoproject.com/en/dev/ref/models/fields/#slugfield > >=20 > >

Re: Slugify() and Clean form data Questions

2010-02-18 Thread Jon Loeliger
> Some places say underscores are valid, others say they removed: > > http://docs.djangoproject.com/en/dev/ref/templates/builtins/ > > slugify > > Converts to lowercase, removes non-word characters > (alphanumerics and underscores) and converts spaces to > hyphens. Als

Re: Slugify() and Clean form data Questions

2010-02-18 Thread Jon Loeliger
> > from django.template.defaultfilters import slugify > > Every filter you see listed in > http://docs.djangoproject.com/en/dev/ref/templates/builtins/ lives in > django.template.defaultfilters. Awesome! Thanks! And with that in hand, the only place I can find the string "django.template.defa

Re: Slugify() and Clean form data Questions

2010-02-20 Thread Jon Loeliger
> Folks, A few days ago I asked: > Is there a canonical definition or even a reference > implementation of a slug = slugify(str) function somewhere? Thanks for taking the time to answer that for me! We pretty much beat the answer into my thick skull: Use the slugify() function as per "from dj

Re: Slugify() and Clean form data Questions

2010-02-22 Thread Jon Loeliger
> > Is there a reason why you can't use Form.is_valid()? It's pretty nice. > > http://docs.djangoproject.com/en/dev/ref/forms/api/#accessing-clean-data > > Example: > http://gist.github.com/311192 I get is_valid() and the notion of cleaned data. I *think*, though, that I am asking for somethin

Re: Slugify() and Clean form data Questions

2010-02-22 Thread Jon Loeliger
> > Hope this better answers your question, > Matt Matt, Indeed it does. Thank you! I guess a bit of the frustrating part of learning Django here is stumbling across the sites that explain how to do various tidbits of functionality, and then slide in some variant [*1*] of "But one would never

Re: Problem with views and urls

2010-02-23 Thread Jon Loeliger
> Hello, > > I'm having a problem with views and url's. If I have a url called > "people" that has a callback to "index" works fine, but if I add a > url for parameters, let's say "people//" it does call the > index function, instead of the defined one. If I change it, for > example to "pp

Django advocacy in a commercial environment

2007-07-19 Thread Jon Atkinson
em with us. Thanks, --Jon --~--~-~--~~~---~--~~ 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

Re: Django advocacy in a commercial environment

2007-07-19 Thread Jon Atkinson
Oops, a quick edit - that last sentence should of course read: ...'benefits *over* PHP'... --Jon On 7/19/07, Jon Atkinson <[EMAIL PROTECTED]> wrote: > Hello, > > Having just finished a couple of large projects in PHP4, our > department (of 5 programmers) is looking

Re: Django advocacy in a commercial environment

2007-07-20 Thread Jon Atkinson
difficulty hiring into Python/Django roles at your company (compared to PHP)? Do you get less applicants? A better quality of applicant? Cheers, --Jon On 7/19/07, Rob Hudson <[EMAIL PROTECTED]> wrote: > > On Jul 19, 1:19 am, "Jon Atkinson" <[EMAIL PROTECTED]> wrote: > &

Re: Custom primary key using Oracle 10g

2007-08-14 Thread Jon Atkinson
y_key=True' in the model. A simple model with a custom primary key: class Employee(models.Model): employee_code = models.CharField(max_length=10, primary_key=True) first_name = models.CharField(max_length=20) last_name = models.CharField(max_length=20) I hope this helps. --Jon

Questions regarding contrib.sitemaps

2007-08-14 Thread Jon Atkinson
tied to the sites framework. Has anyone else come across this issue before? Thanks, --Jon [1] http://www.djangoproject.com/documentation/sitemaps/#location --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou

Re: Questions regarding contrib.sitemaps

2007-08-14 Thread Jon Atkinson
On 8/14/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > On Tue, 2007-08-14 at 10:29 +0100, Jon Atkinson wrote: > [...] > > > As you can see, the locations generated includes 'example.com', which > > is not correct. According to the documentation, the

  1   2   3   4   >