Re: Chaining Filters for many-to-many

2007-10-29 Thread Kevin
Ah, glad to know that it is a known issue at least and not a new problem. Thanks for the info. On Oct 29, 9:07 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2007-10-29 at 20:58 +0000, Kevin wrote: > > I'm trying to figure out how to chain filters for a many-

bulk modify in the admin?

2007-11-14 Thread Kevin
oo bad for each particular use case, but just thought it would be pretty neat if I there existed a way to extend/hack the admin interface to do something similar in a more generic fashion. Thanks! Kevin --~--~-~--~~~---~--~~ You received this message because you are su

Re: Search Engine for Python and Django

2006-07-25 Thread Kevin
On the recommendation that ljworld uses swish-e [1], I incorporated that into my django powered site. The Python interface I use is [2]. Here's the code my search view uses: handle = SwishE.new(SEARCH_INDEX_FILE) results = handle.query(terms) ids = [int(x.getproperty('swishdocpath')) for x in

Re: Search Engine for Python and Django

2006-07-27 Thread Kevin
I run django (and Swish-E) under linux so I can't provide any advise on how to compile it for windows. I do run swish-e with the -S prog option and I wrote a python script that reads all of the models from the database and writes out xml (actually html) that corresponds with the values that I'm i

Re: Using Swish-e with django...

2006-07-31 Thread Kevin
My use of swish-e is clearly different that yours. The indexer part of swish-e is run only periodically (say, nightly) with a `swish-e -S prog -i ./generate_index.py` this creates an index file that the SwishE python api queries --~--~-~--~~~---~--~~ You rec

Manipulator.save() not hitting the DB

2005-11-03 Thread Kevin
I'm trying to use the manipulator framework to generate a multi-part form. It's for an online shopping engine where the customer goes through a few steps entering their shipping and credit card info, etc. Anyways, I created some model classes, eg ContactInfo (phone #, email, etc), Address and Cr

Re: Manipulator.save() not hitting the DB

2005-11-03 Thread Kevin
The base class, Manipulator, just throws a NotImplementedException for it's save() method. Is there a more concrete example I can view to see how to override storing to the database. PS. I'm converting an existing PHP site to django, it's so nice having all these validation/admin stuff just "ta

Re: Using API to bulk populate data

2005-11-07 Thread Kevin
I'm working on a similar script to convert a legacy database. Just a hint from a tough lesson learned, you work the opposite order that OO may teach you and you save() first, then aggregate. So example: class PhoneNumber(meta.Model): number = meta.CharField() class Contact(meta.Model):

FormField Length

2005-11-07 Thread Kevin
In my code, I have: zip_code = meta.CharField(maxlength=9) But when it's rendered as a form, it's always given a SIZE="30". Now I saw that sub-classes like USStateField override the length parameter in the TextField.__init__ method, but I really don't want to go creating all kinds of sub-classe

Re: Dictionary keys in templates

2005-11-09 Thread Kevin
Is there a reason you can't do this: {% for items in dictionary.items %} ... be able to use {{ items.0 }} and "{{ items.1 }}"... {% endfor %} this is equivalent to the python: for key, value in dictionary.items() but since for loops in the template language can only create one variable, you nee

Form Value Array

2005-11-21 Thread Kevin
I'm converting a PHP application over to django and one thing I took for granted was PHPs conversion of inputs with the name "input[]" into an array automatically. Since django nor python seem to support that conversion, what do people suggest for receiving 1 to N inputs on a request.POST? In my

Re: Form Value Array

2005-11-22 Thread Kevin
Unfortunately, I believe they're necessary. My exact code is a list of radio inputs, in template lanaguage and radio buttons use the input name as a way of grouping. My Models would be: class OptionSet(Model): name = CharField() class Option(Model): name = CharField option_set = Foreig

Re: Form Value Array

2005-11-22 Thread Kevin
I understand, and that's what I'm really doing at the moment, but I was just curious if there's a better way to retrieve these POST values than just: options = [] for name, value in request.POST.items(): if(name.startswith("option")): options.append(value)

Re: Form Value Array

2005-11-22 Thread Kevin
I decided to try writing a generic array converter as a middleware: import re class ParamsMiddleware: patt = re.compile("^([a-zA-Z_]\w*)\[\(d*)\]$") LARGE_INT = 2**30 def process_request(self, request): if(request.POST): post = requ

Re: ANN: new-admin branch merged to trunk

2005-11-25 Thread Kevin
Excellent, time to `svn switch` back to trunk

Re: is Django too powerful?

2005-12-14 Thread Kevin
I'd prefer to see a two stage approach to contributing applications to Django where newly contributed apps are in some sub-directory like django.extras instead of django.contrib that contains more standardized and popular applications like admin. I'm thinking of KDE as a model with there kdenonb

url hierarchy

2005-12-20 Thread Kevin
Hey guys, got myself stumped and I'm hoping you could help me figure this one out. In my code I've got a hierarchical category structure for my model that's intended to roughly analogize a filesystem, eg: class Album(meta.Model): location = meta.SlugField() name = meta.CharField() pa

Re: url hierarchy

2005-12-20 Thread Kevin
Yeah, after more experimenting, I came to the same conclusion and globbed the whole path and tokenized the names in the view. Thanks for the help.

SQL Injection

2005-12-20 Thread Kevin
Is there any builtin protection against SQL Injection in django? Let me present a common case I use: class Article(meta.Model): name = meta.SlugField() title = meta.CharField() text = meta.TextField() # my url conf (r'^articles/(?P.*)/$', 'mydomain.views.view_article') # my view d

Re: Django for eCommerce?

2005-12-22 Thread Kevin
I'm converting my custom PHP e-commerce site over to django. It's a dream writing in a true MVC framework with the python language and django's ORM and template language. I do all my payment processing offline, so I can't help on that topic. It's much easier to develop a product catalog with the

Search Functionality

2005-12-28 Thread Kevin
Could anyone provide some hints on how they have implemented search functionality on their web site? Did you do it django or use another middleware (eg, Lucene)? If you did it django, did you bypass the ORM and use direct SQL to take advantage of full text search? I'm currently trying to build

Re: Search Functionality

2005-12-31 Thread Kevin
That would be great. I think it would a strong benefit to many django users as search is such a common problem.

Re: making photo gallery

2006-01-05 Thread Kevin
For this exact use I created the following custom filter. It converts a list into a two-dimensional table: def tabularize(value, cols): """modifies a list to become a list of lists eg [1,2,3,4] becomes [[1,2], [3,4]] with an argument of 2""" try: cols = in

Re: making photo gallery

2006-01-06 Thread Kevin
Because without the map(None + ), your last row will be short elements if it doesn't divide pefectly. So, if you're cols was 3, you'd get: [(1,2,3), (4,)] and of course, that could create bad html: 1 2 3 4 So, now with the Map, the left over cells are set to None, so that's why the te

Validator across fields

2006-01-06 Thread Kevin
I'm sure this has been asked before, but googling didn't turn up a solution. I have the following class: class ContactInfo(meta.Model): name = meta.CharField() phone = meta.PhoneNumberField(blank=True) email = meta.EmailField(blank=True) And I'm trying to present a form to the user

Re: Managing static media urls

2006-01-20 Thread Kevin
I think the question at hand is not where to store and serve the media files, but how to write an app that can easily support accessing media files from different urls. I had this same issue between my development and production apache servers: Dev Site localhost/mysite/images/whatever.gif Prod

Re: Overthinking urls.py?

2006-03-29 Thread Kevin
I think the problem is that urlconf provides a url => view mapping. Really though, for creating the links, we need the reverse mapping. We usually know the view we want to display, but don't know it's URL. For example, you have a bulletin board app: urls.py: urlpatterns = patterns('' '^comm

Re: Manager overriding error

2006-05-09 Thread Kevin
I ran into this problem as well. The issue is that super() expects the child class not the parent class (the documentation is wrong), so try this: super(DahlBookManager, self).get_query_set().. instead of super(Manager, self).get_query_set() In addition, it wouldn't let me create the Manage

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

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

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

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

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

Json and django.contrib.auth.views.login

2011-07-19 Thread Kevin Anthony
rror was: 'module' object has no attribute 'json_command' this is my login URL: url(r'^accounts/login/$','django.contrib.auth.views.login', {'template_name': 'main/login.html', }), -- Thanks Kevin Anthony www.NoSideRacing.com -- You

Re: Json and django.contrib.auth.views.login

2011-07-19 Thread Kevin Anthony
rra wrote: > Kevin, > > Please open your views.py module located inside the rchip module and > you will see there is no view named json_send_command. > > Please refer to that app's documentation to find more about the > correct setup for your urls. > > Cheers, > AT

Re: import django models without runing the server

2011-07-21 Thread Kevin Anthony
I found the best way to do this is python manage.py < script.py On Jul 21, 2011 8:00 PM, "Gelonida N" wrote: > On 07/18/2011 04:33 PM, bruno desthuilliers wrote: >> On Jul 18, 3:33 pm, Alexander Crössmann >> wrote: >>> Hi Malcom, >>> >>> I am not sure the management commands are what I want >> >>

Re: Upload Multiple Images App ?

2011-08-08 Thread Kevin Monceaux
has the same href="https://github.com/jdriscoll/django-imagekit/issues/16";>bug > as django-stdimage. I suspect the above known bugs are related to a known bug in Django: https://Docs.DjangoProject.com/en/1.3/releases/1.2.5/#filefield-no-longer-deletes-files which many consider a featu

Django, Json and Android

2011-08-11 Thread Kevin Anthony
, is there any reading material on it? -- Thanks Kevin Anthony www.NoSideRacing.com -- 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, sen

Deleting a model object then returning it

2011-08-15 Thread Kevin Anthony
ter i delete it, i need to serialize the data to JSON Thanks Kevin Anthony -- 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 t

Re: Admin staticfiles stubbornly hiding behind 404s

2011-08-24 Thread Kevin Golding
jango/contrib/admin/media/ directly, after all I don't copy the templates over unless I want to override them (and yes, I realise that means I really should have spotted django had a default static directory). Basically static files is just an easier way to copy the admin css/js/etc. to the pr

<    1   2   3   4   5   >