Re: CSRF failures for users that block all cookies. Is my planned solution stupid?

2011-11-07 Thread Kevin
art csrf_exempt the submission view, as it will be hidden from a bots prying eyes. You can also do the submission using javascript and place some sort of hash in the submission to verify the data being submitted is valid. Dajax has an example on submitting forms via AJAX to Django. - Kevin On

Re: Pyjamas in Django

2011-11-07 Thread Kevin
ueryUI, and it still allows me to use some really nice HTML5/CSS3 styling to the website. I found that the default themes with Pyjamas aren't very pretty, and Pyjamas is just gaining support for more HTML5/CSS3. Pyjamas still uses tables, the next version is suppose to change this. - Kevin On Nov

Why does Django create Postgres timestamp columns with time zones?

2011-11-11 Thread Kevin
I thought that Django created datetime columns that were time zone agnostic, but when I looked at my Postgres table I saw that the values recorded there have time zone information. Going further I found that the Postgres backend directs Django to create columns that use time zones. >From djang

Re: Why does Django create Postgres timestamp columns with time zones?

2011-11-12 Thread Kevin
>From >postgresql.org/docs/8.4/static/datatype-datetime.html: > "All timezone-aware dates and times are stored internally in UTC. They are converted to local time in the zone specified by the timezone configuration parameter befo

Django SOAP/WSDL and PowerShell

2011-11-18 Thread Kevin
://localhost:7789/?wsdl PowerShell loads it in, the problem occurs when I attempt to call the say_hello function: $hello.say_hello("Kevin",5) It shoots back this error: Cannot find an overload for "say_hello" and the argument count: "2". At line:1 char:17 + $h

Re: How to trace the raw executed sql in Django

2011-11-18 Thread Kevin
You can use the django-debug-toolbar for this: https://github.com/robhudson/django-debug-toolbar On Nov 18, 2:20 am, Kayode Odeyemi wrote: > Hello friends, > > I'm having a deep Django-MySQLDB error and I'm doing some debugging to > trace exactly where the problem is. It seems to me that this is

Limiting choices for ModelForm's ForeignKey/ManyToMany

2012-01-03 Thread Kevin
Hello, I have many models which have a foreign key to a main model. Eg: class MainModel: .. .. class VariousModels: main = ForeignKey(MainModel) .. .. Now, these VariousModels sometimes have links to each other in the form of ForeignKey or ManyToMany. I need to limit these ForeignK

Re: Users getting logged out frequently

2012-01-06 Thread Kevin
Which backend is storing the session data? If session data is being stored in the cache(which is normally the recommended way), what caching backend are you using? If you are using locmem cache backend, this might be your problem, change the cache backend to something more stable for production.

Re: Limiting choices for ModelForm's ForeignKey/ManyToMany

2012-01-06 Thread Kevin
key-... > in-a-django-modelform > > Altough having this stored in the model would be more elegant in your case, > perhaps anyone else has knows more.. > > Michael > > > > > > > > -Original Message- > From: django-users@googlegroups.com on

Web application in high demand

2012-01-13 Thread Kevin
I am getting ready to put together a Django web application portfolio, but first I am doing some research on which apps I will build for the portfolio itself to show off to possible employers. Is there an online resource which lists the top requests web applications? I did a google search and onl

Re: restricting choices of foreign key to objects owned by user

2012-01-13 Thread Kevin
You will need to alter the methods for the AdminModel: https://docs.djangoproject.com/en/1.3/ref/contrib/admin/#django.contrib.admin.ModelAdmin.queryset Your main focus will be the queryset method to limit what users can see, this should also limit drop down boxes as well. You may also want to l

Re: How many developers have moved to class-based views?

2012-11-11 Thread Kevin
Wow, the dev docs are much more informative and actually explains the best way to alter a form before saving it. I was using a different method, but the method mentioned in the dev docs are much more cleaner than what I was doing. Many thanks for this. On Sunday, 11 November 2012 12:54:45 UTC

Re: Trying to figure out ManyToManyField on a legacy database

2013-05-11 Thread kevin
Hi Brian, It seems like you don't really have an Many To Many relationship between your "Song" and "Played" objects. I can see how you would have multiple plays for one song, but considering that the Played model has a track_id, would you ever have multiple songs for a single Play?It appea

Re: Bus Error: 10 (Intro Tutorial)

2013-05-13 Thread Kevin
I had a similar issue with Bus error: 10 Turned out to be an infinite depth recursion loop like James says. My recommendation for anyone who encounters this it to create a unit test for the specific situation that causes it or play around with it using "./manage.py shell". You may be able to

Creating a "Django Course" and would like some feedback

2013-05-27 Thread Kevin
since around 2010 and have a large amount of experience with the framework that I can share with others. Best Regards, Kevin Veroneau PythonDiary.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group an

Re: Creating a "Django Course" and would like some feedback

2013-05-27 Thread Kevin
ll be placed in "Core Framework". Many people seem to be asking about jQuery and Django, and it's one of the top search terms coming to my blog, so expect this chapter to be extensive. On Monday, 27 May 2013 17:02:58 UTC-5, Kevin wrote: > > Hello everyone! > > I

Re: Creating a "Django Course" and would like some feedback

2013-05-28 Thread Kevin
first learning the framework. This was first built on Django 1.2 I believe, so it still does use function-based generic views. I do have it running currently on a website, and use it all the time to manage my personal financial data, such as bills and debt. Best Regards, Kevin Ver

Re: Creating a "Django Course" and would like some feedback

2013-05-28 Thread Kevin
s, so many people do not understand how to use it's numerous amount of options to deploy a successful multi-tier Django server farm. Best Regards, Kevin Veroneau PythonDiary.com On Tuesday, 28 May 2013 16:01:23 UTC-5, Subodh Nijsure wrote: > > This is all IMHO. > > One of t

Bootstrap and Django together at last!

2013-05-28 Thread Kevin
g bootstrap in Django so much easier and less stressful! The documentation is on my blog post announcing the app itself: http://www.pythondiary.com/blog/May.25,2013/django-bootstrap-theme-ready.html It explains all the available "base templates" you can extend, and the available t

Re: Creating a "Django Course" and would like some feedback

2013-05-28 Thread Kevin
here will be at least a couple chapters which provide a good basis for a successful deployment and how to troubleshoot issues along the way. Best Regards, Kevin Veroneau PythonDiary.com On Tuesday, 28 May 2013 16:37:06 UTC-5, Nikolas Stevenson-Molnar wrote: > > Deployment in general is

Re: Bootstrap and Django together at last!

2013-06-01 Thread Kevin
m to do what they want out of the box. It is entirely your choice which one of these bootstrap packages you use, I'm not going to force you to use any particular package. This is why open source is great, because we as developers have something called "choice". Best Regards, Ke

Announcing native Chameleon template engine support in Django

2013-11-08 Thread Kevin
e either of the following: - Or - Kevin Wonderful, isn't it? It makes working with Chamelon inside Django super simple and very Django-like. I hope to soon add the ability to add new expressions into the template engine using some sort of registry, similar to how Django's own te

Is there an official Django forum besides this mailing list?

2011-02-23 Thread Kevin
am currently using it on a website. I find that a forum is much more organized and easier to follow than a mailing list. Forums can have separate sections, whereas mailing lists are flat. Kevin. -- You received this message because you are subscribed to the Google Groups "Django users&q

Port mod_python.publisher and a Django svnclient

2011-02-23 Thread Kevin
. Subversion URL for the mod_python.publisher port: svn://zyrixhost.net/publisher/trunk Subversion URL for the Django subversion client: svn://zyrixhost.net/ajaxsite/trunk/svnclient Enjoy and any bugfixes or suggestions would be great! Kevin. -- You received this message because you are subscribed

Re: Is there an official Django forum besides this mailing list?

2011-02-23 Thread Kevin
to those who use the mailing list counterpart. Who ever is interesting in developing such a project with me, I have some server resources and access to a subversion server to assist in development efforts. Just putting that out there. Kevin. On Feb 23, 10:19 pm, Russell Keith-Magee wrote: >

GDAL_LIBRARY_PATH

2011-03-03 Thread Kevin
Hey All, I'm having a hell of a time getting GeoDjango working on Windows 7, and wondering if I could get a couple of pointers. With the newest FWTools, where should I be pointing GDAL_LIBRARY_PATH? My GDAL binaries would appear to be in C:\Program Files (x86)\FWTools2.4.7\bin. I have that dire

Easy to use graphical reporting tools for SQL

2015-07-20 Thread Kevin
In our office we have a Django application that uses a MySQL database. Often I am asked to produce various reports that can range from being basic dumps of query results or aggregate computations on query results. To do this I must connect to the Django shell to use the ORM or write the SQL dir

TypeError : Unable to save m2m relation modelform

2014-08-14 Thread kevin
Type Error : 'ExtendedTag' instance expected, got I had created m2m field (required false). When I tried to save form with parent select (from multiple choice field), It rises type error. When I tried to save it without selecting parent and category, it work fine. I couldn't able to figure out

Django CSRF protection and AJAX calls

2020-05-26 Thread Kevin
is set? Thanks -Kevin -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit

Re: Django CSRF protection and AJAX calls

2020-06-10 Thread Kevin
Thanks Boris & Allan, I was able to research the problem further and found that my header was being set entirely correctly, and the Django csrf middleware does in fact require both the cookie AND the header to be set. It's not an either/or, and there is an explicit error message for when either

Re: What do you use as a build tool (like Ant or make)

2008-09-09 Thread Kevin Teague
There is a list of all Python-based build tools on the python.org wiki: http://wiki.python.org/moin/ConfigurationAndBuildTools I haven't used any of them with Django, but for managing Zope, Plone and Grok based web apps, zc.buildout is the current preferred tool. It's a configuration-based build

Re: Help: Running 1.0 and 0.96 side by side?

2008-09-12 Thread Kevin Teague
On Sep 12, 10:06 am, "Matt Conrad" <[EMAIL PROTECTED]> wrote: > On Fri, Sep 12, 2008 at 11:15 AM, Jeff Anderson > > <[EMAIL PROTECTED]> wrote: > > You can influence what this list is, by setting the PYTHONPATH > > environmental variable. All you need to do is set your PYTHONPATH > > appropriatel

Re: Serving static file on Windows

2008-10-07 Thread Kevin wu
dont use MEDIA_ROOT, you can define a new label. e.g : mediaroot . On Oct 5, 3:19 am, mrsource <[EMAIL PROTECTED]> wrote: > I can upload images on the right place in the file system, but then > django don't serve them. > I'm using the development server and the current SVN version of > django. >

Upload to ImageField from PIL?

2008-10-13 Thread Kevin Leung
Hey everyone, Quick summary of what I'm trying to do: There are images stored in an ImageField. I need to be able to edit this image (I'm using ImageDraw from the PIL), put it into a separate ImageField in the same entry, so that it's also accessible from the front-end. I, however, am having pro

Re: Questions on packaging a project and naming conventions

2008-10-18 Thread Kevin Teague
I think there are two issues at play here: 1. Separate your site or application into multiple Python projects to promote re-usability, maintainability, extensibility. 2. Place your packages within a top-level package to prevent namespace collisions to increase re-usability. Note there is a di

Newbie question: first project can't connect to MySQL

2009-02-04 Thread Kevin Audleman
/mysql.sock' (2)") I'm not exactly sure what this socket is or why django can't find it. One thought is that I installed LAMP on my machine using XAMPP, which puts everything in the /Applications/xampp directory. Poking around, I managed to find a mysql.sock file here: /Applications

Re: Newbie question: first project can't connect to MySQL

2009-02-04 Thread Kevin Audleman
I found the solution in the archives: I changed DATABASE_HOST to 127.0.0.1 from '' Kevin On Feb 4, 9:41 am, Kevin Audleman wrote: > Hello everyone, > > I am running through the tutorial and setting up my first django > project. Quite exciting! However I have run into

Can I do this with django?

2009-02-06 Thread Kevin Audleman
Filemaker where I have the ability to auto-populate fields on creation through relationships, but django is a new world unto me. Thanks for your help, Kevin Audleman --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups &qu

Re: Can I do this with django?

2009-02-06 Thread Kevin Audleman
rking across the relationship? Cheers, Kevin On Feb 6, 9:46 am, Alex Gaynor wrote: > On Fri, Feb 6, 2009 at 12:43 PM, Kevin Audleman > wrote: > > > > > > > I'm building a simple time tracker. It has a table Clients and a table > > Projects and there is a one

Re: Can I do this with django?

2009-02-06 Thread Kevin Audleman
Wow, that is very cool. I implemented it and it works! Django is definitely a very impressive framework. Thanks for your help! Kevin On Feb 6, 10:31 am, Alex Gaynor wrote: > On Fri, Feb 6, 2009 at 12:58 PM, Kevin Audleman > wrote: > > > > > > > Thanks Alex! >

How do I display the human readable name of a choice?

2009-02-10 Thread Kevin Audleman
when I view it, I see AL. How do I get django to display the human readable name? I would prefer to do this on the template level, as I'm using a view from a contributed app that I can't modify. Thanks, Kevin --~--~-~--~~~---~--~~ You received thi

Re: How do I display the human readable name of a choice?

2009-02-10 Thread Kevin Audleman
Thanks Alex, however this is a solution at the View level, and I'm using a view that I didn't write. Is there also a way to do this at the template level? Thanks again, Kevin On Feb 10, 1:24 pm, Alex Gaynor wrote: > On Tue, Feb 10, 2009 at 4:23 PM, Kevin Audleman > wrote:

Re: How do I display the human readable name of a choice?

2009-02-11 Thread Kevin Audleman
I could've swore I tried that before posting my question and it didn't work, but I tried it this time and it did. Anyhow, a long winded way of apologizing for asking a simple question. Thank you for taking the time to answer! Kevin On Feb 10, 3:41 pm, Alex Gaynor wrote: > On Tue,

Re: Trying to retrieve dynamically generated session key in template

2009-02-11 Thread Kevin Audleman
I have the same session. Django has been so slick so far I would imagine it has a way to access session variables from a template. Have you found the solution? Kevin On Jan 17, 1:15 pm, dahpgjgamgan wrote: > Hi, > > A simple scenario: >    - A generic object detail view, on whic

Can I overwrite the ModelAdmin for User

2009-02-16 Thread Kevin Audleman
ilter = ('is_staff', 'is_superuser') inlines = [ProfileInline] admin.site.register(User, UserAdmin) Is there a way to do this? Thanks, Kevin Audleman --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

Re: Can I overwrite the ModelAdmin for User

2009-02-16 Thread Kevin Audleman
ay to add a related field to the list_display or list_filter sets for the User object? Cheers, Kevin On Feb 16, 3:45 pm, Alex Gaynor wrote: > On Mon, Feb 16, 2009 at 6:27 PM, Kevin Audleman > wrote: > > > > > > > I've created a custom profile per the instructions in

Re: Can I overwrite the ModelAdmin for User

2009-02-16 Thread Kevin Audleman
eturn self.myprofile_set.all()[0].payment_status However I am working with the core User object which I didn't write. Am I SOL, or is there some way I can do this. Thanks, Kevin On Feb 16, 4:02 pm, Alex Gaynor wrote: > On Mon, Feb 16, 2009 at 6:59 PM, Kevin Audleman > wrote: > > > > > &g

Re: Can I overwrite the ModelAdmin for User

2009-02-16 Thread Kevin Audleman
'display_profile_status', ) On Feb 16, 4:15 pm, Alex Gaynor wrote: > On Mon, Feb 16, 2009 at 7:13 PM, Kevin Audleman > wrote: > > > > > > > Alex, > > > I feel like I'm one step closer to getting this to work. From the > &g

Re: Can I overwrite the ModelAdmin for User

2009-02-17 Thread Kevin Audleman
Hey, that's great! I did indeed discover that the change password page didn't work but didn't know what to do about it. Thanks for your excellent and thorough help =) Kevin On Feb 16, 6:30 pm, Karen Tracey wrote: > On Mon, Feb 16, 2009 at 8:19 PM, Kevin Audleman >

Re: Access extra parameters in forms.py

2009-02-17 Thread Kevin Audleman
You should probably change the order of operations in the __init__function to call the super classes __init__ function first. Kevin On Feb 16, 8:49 am, peterandall wrote: > Hi all, > > I'm trying to access a list of users in forms.py I'm creating two > lists and m

Re: Extract values from form fields in templates

2009-02-18 Thread Kevin Audleman
Passing both the form and the object is the solution I use. It may not be completely DRY, but I can't see how it's bad. You need access to the data in an object so you pass the object. Much more sensible than trying to extract those values from a more complicated data structure. Kevin

Re: Any way to show progress during a short process job?

2009-02-18 Thread Kevin Audleman
} else { document.getElementById("pleasewait").style.display = "block"; } } //--> And your HTML code looks like this: Please wait while your request is being processed... Cheers, Kevin Audleman On Feb 18, 2:52 pm,

Re: Query that grabs objects before and after object

2009-02-18 Thread Kevin Audleman
this in your request show_range = (current_show - 4, current_show + 4) shows = Show.objects.filter(show_order__range=show_range) FYI I haven't tested this and my Python is not good enough that I can guarantee my syntax. Kevin Audleman On Feb 18, 4:06 pm, Sean Brant wrote: > Is there a simple

Re: login in django via plone

2009-02-19 Thread Kevin Audleman
Django. Hopefully somebody out there has a more flushed out idea. Kevin On Feb 19, 2:20 am, Alan wrote: > Hi There, > > We have Plone/Zope site for CMS and users registration. It came before > django for us. But now we are developing portal applicatons done with django > (much be

Simplest way to do this?

2009-02-23 Thread Kevin Audleman
ques. Is there another, simpler way of doing it? Thanks, Kevin Audleman --~--~-~--~~~---~--~~ 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@googlegroup

Re: Simplest way to do this?

2009-02-23 Thread Kevin Audleman
Great idea, I'll do that. Thanks! Kevin On Feb 23, 11:30 am, Daniel Roseman wrote: > On Feb 23, 7:19 pm, Kevin Audleman wrote: > > > > > Hello, > > > I am using the excellent django-profiles module provided by > > Ubernostrum which gives my site the

InlineModelAdmin objects question

2009-02-24 Thread Kevin Coyner
dels.Model): username = models.OneToOneField(User, parent_link=False) address = ... etc -- Any pointers would be appreciated. Thanks. -- Kevin Coyner GnuPG key: 1024D/8CE11941 --~--~-~--~~~---~--~~ You received this message because

Re: InlineModelAdmin objects question

2009-02-25 Thread Kevin Audleman
t. This is preferrable over rolling your own as django will automatically populate request.user with the fields from your profile module. The previous response identifies how to get it to show up in the admin. Namely, you overwrite the User object to display the related record. Cheers, Kevin On Feb 2

Re: optional parameter url

2009-02-25 Thread Kevin Audleman
27;, {'document_root': '/mesa'}), Mind you, I don't know if this will fix anything... Kevin On Feb 25, 4:26 am, Adonis wrote: > Hello, > I am having some trouble serving static files when i try to pass an > optional parameter. > For url: appname.mainpage/,

Re: Searching a list of Q

2009-02-25 Thread Kevin Audleman
What about the following? qset = Q(author__in=[u"Foo", u"Bar"]) Kevin On Feb 25, 10:03 am, Peter Bengtsson wrote: > This works: > >  >>> from django.db.models import Q >  >>> qset = Q(author__iexact=u"Foo") | Q(author__iexact=u"

Re: Searching a list of Q

2009-02-25 Thread Kevin Audleman
Ah, gotcha. Maybe django should include a iin function =) Kevin On Feb 25, 10:37 am, Alex Gaynor wrote: > On Wed, Feb 25, 2009 at 1:34 PM, Kevin Audleman > wrote: > > > > > > > What about the following? > > > qset = Q(author__in=[u"Foo", u"

Re: Versioning/revisioning content (a la Mediawiki)

2009-02-25 Thread Kevin Teague
On Feb 25, 3:33 pm, Horst Gutmann wrote: > Or you could leave the versioning to dedicated tools like bzr and git > and use django-rcsfield :-) > > http://code.google.com/p/django-rcsfield/ > I'm not sure what you gain from using a VCS for storing versions? They're designed for a pretty differe

Re: Location of files that are part of my application

2009-03-03 Thread Kevin Teague
The __file__ attribute of a module can be used as a starting point for getting at data files within a python package. However, packages can be installed in zipped format, so if you need to account for this you can use the pkg_resources module in setuptools: http://peak.telecommunity.com/DevCenter

Re: Three Physical Tiers

2009-03-05 Thread Kevin Teague
On Mar 4, 12:21 pm, ruffeo wrote: > Does anyone know how to develop a complex django project in a 3 tiered > network environment, still using the MCV architecture? > > I.E. Web Server (view and control code), App Server (model code), and > Database Server You have to distinguish between "archi

Re: Error trying to add a new user in the admin site

2009-06-21 Thread Kevin Audleman
exist. If the value is simply blank, the page will work. If, however the name of the variable is printed it won't work. See this ticket for more info: http://code.djangoproject.com/ticket/3579 The solution was to comment out those two settings and like magic it works. Kevin On Jun 8, 6:32 

Re: Hard linking an image

2009-06-25 Thread Kevin Teague
Presumably you already have all of the data required to generate a chart on the server? If so, then store the chart data in a model, and just reference it by id. e.g. (or w/ a pretty URL: ) And create a Chart object and store it before sending out the HTML response. Then update your chart view

Re: Automated Functional Testing

2009-07-10 Thread Kevin Teague
Yes, how many times have you followed the practice of: 1. write some new code 2. (re)start dev server and/or update dev database 3. tab over to your browser and click away 4. tab back to terminal to see the traceback when you hit an error With a functional test suite, it becomes sooo much

SQL Admin & Email app?

2009-03-25 Thread Kevin Ar18
exptend it in Python as I need)? like a CMS? Would it help if I explained the concept in more detail or if I asked this in a different Python mailing list? Thanks, Kevin _ Windows Live™ SkyDrive: Get 25 GB of free online s

Trying to wrap my head around nested regroups or other ways to handle ordered ForeignKey stuff

2009-04-14 Thread Kevin Cole
Hi, First let me say I've looked at documentation, but feel a bit dyslexic when it comes to this stuff. The situation: I have three tables: a service provider table with city, state abbreviation and country abbreviation (among other other info), a states table with state names, abbreviations, an

Re: Trying to wrap my head around nested regroups or other ways to handle ordered ForeignKey stuff

2009-04-14 Thread Kevin Cole
And... Never mind. Not sure how I missed it before, but it appears select_related() gets me what I want. I think... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send em

Re: Trying to wrap my head around nested regroups or other ways to handle ordered ForeignKey stuff

2009-04-15 Thread Kevin Cole
On Apr 14, 6:32 pm, Daniel Roseman wrote: > On Apr 14, 6:11 pm, Kevin Cole wrote: > > Hi, > > > First let me say I've looked at documentation, but feel a bit dyslexic > > when it comes to this stuff. > > > The situation: I have three tables: a servi

Can I use the django test server for this?

2009-04-21 Thread Kevin Audleman
a or no there are serious drawbacks to this approach -- greatly appreciated! Cheers, Kevin --~--~-~--~~~---~--~~ 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@g

Re: conventions for adding pluggable apps to Django

2009-04-21 Thread Kevin Teague
To answer the question in terms of Python packaging (typically consuming Django apps isn't going to differ from consuming any other python package) ... On Apr 21, 11:44 am, Bryan Wheelock wrote: > I have a question about using Pluggable apps with Django. > > My question is about best practices.

Re: Can I use the django test server for this?

2009-04-21 Thread Kevin Audleman
n't find a solution, I'll look into lighthttpd. Cheers, Kevin On Apr 21, 12:46 pm, Oli Warner wrote: > You could, but as you say you would have to script it to daemonise. > > If resources are what's putting you off running something like Apache, you > should know th

Re: url template tag help

2009-04-29 Thread Kevin Audleman
king for, after all: the error: "Reverse for 'proyName.view_aboutPage' with arguments '()' and keyword arguments '{}' not found." I have solved most of my URL problems this way. Cheers, Kevin --~--~-~--~~~---~--~~ You received t

Re: Dynamic form and template rendering

2009-04-29 Thread Kevin Audleman
As is often the case in django, they have already provided a mechanism for what you are trying to do the hard way: Formsets. http://docs.djangoproject.com/en/dev/topics/forms/formsets/ Cheers, Kevin On Apr 29, 7:18 am, MarcoS wrote: > Hi all, >    I post a problem, hoping someone can h

Re: FileField uploading into an user-specific path

2009-04-29 Thread Kevin Audleman
ase directory appended to MEDIA_ROOT; you might want to rename that. Then in your model, define your image field as so: photo_1 = models.ImageField(upload_to=upload_location, blank=True) Cheers, Kevin On Apr 29, 8:12 am, Julián C. Pérez wrote: > thanks... > but... > how can i make that attri

Re: Forms vs Formsets vs Sessions vs FormWizard ??

2009-04-29 Thread Kevin Audleman
reate back buttons on each page, which you might find more difficult if you are trying to pass form data (I think you'd have to write extra code to pass the form backwards). Cheers, Kevin On Apr 28, 5:40 pm, TheCorp wrote: > As a note, I found this post which basically describes

Re: url template tag help

2009-04-30 Thread Kevin Audleman
somewhere else. Kevin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to dj

Re: Configuration help. Multiple projects.

2009-04-30 Thread Kevin Audleman
quirements correctly). This way the logic for each "project" would be contained in its own directory complete with views, models, etc. They will live in the same Django project and share a settings.py file, urls.py file and can easily talk to each other. Kevin On Apr 30, 7:47 am, "eric.f

Re: url template tag help

2009-05-01 Thread Kevin Audleman
a Django app and these reverse url's will no longer plague me. Cheers, Kevin --~--~-~--~~~---~--~~ 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@

Re: url template tag help

2009-05-01 Thread Kevin Audleman
s a challenge to put all the pieces together myself. Kevin On May 1, 11:28 am, Malcolm Tredinnick wrote: > On Fri, 2009-05-01 at 11:13 -0700, Kevin Audleman wrote: > > > > I can't explain any of this, but I've been thinking about your > > > question since

Re: User Profile in Admin

2009-05-01 Thread Kevin Audleman
about-users Kevin On May 1, 8:20 am, CrabbyPete wrote: > I created the following: > > class Profile(models.Model): >     user        = models.ForeignKey(User, unique=True) >     phone       = models.CharField(max_length=15,  blank = True, null > = True, unique = True) >

Need help with URL rewrites

2009-05-25 Thread Kevin Audleman
django to append a /directory/ to the beginning of each url it creates? Kevin --~--~-~--~~~---~--~~ 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@googleg

Re: Need help with URL rewrites

2009-05-25 Thread Kevin Audleman
Hi Alex, I did exactly as you suggested with no luck. Any other suggestions? Kevin On May 25, 12:27 pm, Alex Koshelev wrote: > Hi, Kevin. > > You can try to set FORCE_SCRIPT_NAME = '/directory' [1] settings > variable. Or setup your web server to provide valid SCR

How to use next with comments?

2009-05-27 Thread Kevin Fullerton
here. If I submit a correctly formed comment, it brings up the "Thank you for your comment" template but doesn't redirect back to the original object. I've tried removing the hidden field and doing and have the same problem - is this a known problem, or is it d

Re: How to use next with comments?

2009-05-28 Thread Kevin Fullerton
On Thu, May 28, 2009 01:50, Eric Abrahamsen wrote: > > On May 28, 2009, at 4:02 AM, Kevin Fullerton wrote: > >> >> I'm working with django.contrib.comments at the moment, and so far >> most >> things are working as expected. > > It's a known p

Re: How to use next with comments?

2009-05-28 Thread Kevin Fullerton
9 The code I'm using to submit the comment looks similar to {% get_comment_form for object as form %} http://blog.kenwa-solutions.co.uk/"; method="POST"> So I'm not sure why the default preview form isn't picking it up Many thanks Kevin --~--~--

Re: Need help with URL rewrites

2009-06-01 Thread Kevin Audleman
on2.5'] + sys.path" SetEnv DJANGO_SETTINGS_MODULE CasaCasa.settings SetHandler python-program PythonOption SCRIPT_NAME PythonOption django.root "/directory" On May 25, 1:02 pm, Kevin Audleman wrote: > Hi Alex, > > I did exactly as you suggested with no luck. Any

Bug in admin related to django.root

2009-06-03 Thread Kevin Audleman
in the admin section for edit pages. I can click on a model to see a list of its records, I can click on a record to edit it, but when I click Save it takes me to a URL that is missing the django.root (of course the page doesn't exist on the server so I get a 404). This seems like a django bu

Error trying to add a new user in the admin site

2009-06-08 Thread Kevin Audleman
) with base 10: 'add/form_url' I wondered if it might have to do with any of the changes I had made though defining an admin.py in my app, so I removed it and went back to the stock admin site. The error persists. The full trace is below. Any he

Re: Update an object with a dictionary

2009-06-10 Thread Kevin Teague
On Jun 10, 9:27 am, Paolo Corti wrote: > Hi > is it possible to update an object with a dictionary? > > I tried something like this: > myobject.save(force_update=True, **my_dict) > > getting an error, though: > TypeError at ... > save() got an unexpected keyword argument 'myfieldname' > > I wou

Re: Update an object with a dictionary

2009-06-10 Thread Kevin Teague
__dict__ is an attribute of every Python object. It's typically only an internal detail, and generally not accessed directly. One area where __dict__ modification would differ from attribute access is with an attribute that's a property. Modifying the __dict__ would ignore the property getter/sett

Breakpoints in NetBeans

2009-09-21 Thread Kevin Bache
se and look around every now and again without having to splice my code with print statements. Thanks in advance for the help. Best, Kevin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: Breakpoints in NetBeans

2009-09-21 Thread Kevin Bache
e a big time drain. This seems like a problem that most developers must hit from time to time. How has the community approached it in the past? Thanks again, everyone, Kevin On Mon, Sep 21, 2009 at 5:18 AM, Joshua Russo wrote: > On Mon, Sep 21, 2009 at 10:15 AM, Joshua Russo wrote: >

Confirming GeoDjango OSMAdmin Bug

2009-09-22 Thread Kevin Systrom
Hey all, I've been having an issue using the filter on a GeoQuerySet with Django 1.1. I have a "Locations" table that looks more or less like this: class Location(models.Model): pnt = models.PointField() name = models.CharField(max_length=255) To query, I look for an object like this:

Re: where to place import statements

2009-09-24 Thread Kevin Teague
imports don't usually take up too much memory. I'd guess that even importing a very large number of modules isn't going to grow your process size by more than 10 MB. imports are only evaluated once. So if you nest the import into a view, your process will be smaller until the first time that view

Re: are django applications portable?

2009-09-25 Thread Kevin Teague
On Sep 25, 9:59 am, dijxtra wrote: > Hi everybody, > > Django applications, as I understood them should be pluginable on > project basis. That is, I should be able to install them to my > *project*, not to my django installation. So I downloaded django- > tagging and run the python setup.py ins

Re: How do I create project independent apps.

2009-10-05 Thread Kevin Teague
On Oct 5, 6:45 am, Johan wrote: > Actually the TEMPLATE_DIRS does nothing. In order to get my apps to > work outside of the project directory I edited the manage.py file and > added : > > import sys > sys.path.append('..\\..\\..\\django-apps\\trunk') > > This allows me to reference my applicati

Re: Designing django projects.

2009-10-05 Thread Kevin Teague
On Oct 5, 3:53 pm, nbv4 wrote: > Also, once I do find a designer, how are they going to submit their > work? The django template was designed to be ultra simple and designer > friendly, but that whole philosophy is underminded by the fact that in > order to get the system up and running, you h

<    1   2   3   4   5   >