Re: Update a model using UpdateView

2012-10-10 Thread Kurtis Mullins
By the way, that 'owner' field would be something like this: owner = ForeignKey(User) And in my example, I use the Form to make sure the Owner is set properly. On Wed, Oct 10, 2012 at 7:14 AM, Kurtis Mullins wrote: > You've got it. I included an 'owner' field o

Re: A very basic question with Django

2012-10-10 Thread Kurtis Mullins
1. Django is perfectly suitable for handling Forms and content stored in a database. In a low to medium traffic site, serving static content is not a problem at all. In fact, that's the purpose of a Content Management System. Many of which have been built on or around Django. If you get to a point

Re: A very basic question with Django

2012-10-10 Thread Kurtis Mullins
On Wed, Oct 10, 2012 at 2:29 PM, Tomas Ehrlich wrote: > Common guys, this thread isn't about me and CGI :) I really don't care > what it is and know, when you've just told me what it is I don't care > even more :) > > If you know what's CGI, feel free to answer the original question: > "Could Djan

Re: Javascript encoding and python decoding and vice versa

2012-10-11 Thread Kurtis Mullins
If you use GET requests to transmit data, there is still a chance that the data might be intercepted by a DNS server or Proxy Server regardless of SSL. I'd keep everything contained in POST and just like the others have mentioned, simply go with SSL and Signed Certificates. On Thu, Oct 11, 2012 at

Re: Javascript encoding and python decoding and vice versa

2012-10-11 Thread Kurtis Mullins
; On Thu, Oct 11, 2012 at 10:04 AM, Kurtis Mullins > wrote: > > If you use GET requests to transmit data, there is still a chance that > the > > data might be intercepted by a DNS server or Proxy Server regardless of > SSL. > > I'd keep everything contain

Re: Display only model fields that are non-empty

2012-10-11 Thread Kurtis Mullins
There's a couple of ways, assuming you're talking about in the template. One example would simply be: {% if object.fieldname %} {{ object.fieldname }} {% endif %} Another example might be: {{ object.fieldname|default:"" }} But it doesn't allow for much formatting of an empty field. If you wan

Re: Image/Photo app

2012-10-12 Thread Kurtis Mullins
Hey Thomas, I'm not sure if you're on a deadline or what-not; but these are usually the kinds of apps I develop (personally) for fun. For example, you can extend your code-base to scan the images to pull in its EXIF data and what-not. If you're on a deadline, there's multiple Django Applications

Re: Create table and load data

2012-10-12 Thread Kurtis Mullins
On Fri, Oct 12, 2012 at 2:09 PM, Larry Martell wrote: > > > So my client decided to use xml. I created the file and put it in > fixtures/initial_data.xml. On my development machine, which is a Mac, > it worked fine - running syncdb loaded the data. But on my client's > machine, which is running Cen

Re: Create table and load data

2012-10-12 Thread Kurtis Mullins
PM, Kurtis Mullins > wrote: > > On Fri, Oct 12, 2012 at 2:09 PM, Larry Martell > > wrote: > >> > >> > >> So my client decided to use xml. I created the file and put it in > >> fixtures/initial_data.xml. On my development machine, which is a Mac, >

Re: Create table and load data

2012-10-12 Thread Kurtis Mullins
Whoops, sorry that was the master branch. Here you go: https://github.com/django/django/blob/1.4.1/django/core/management/commands/syncdb.py On Fri, Oct 12, 2012 at 4:24 PM, Kurtis Mullins wrote: > Good luck to you! The code is here if you want to start crawling through > it for a good po

Re: Strange behaviour after pressing on button

2012-10-26 Thread Kurtis Mullins
Just to give you a hint, you'll need to do 2 things: 1. Use {% csrf_token %} in your view to generate the CSRF Token Form Field 2. Include the value and name from that Form Field in your Javascript Request #2 is much more a Javascript issue; not specific to django. although someone here may help

Re: Django Development Model

2012-10-28 Thread Kurtis Mullins
Hey, I'm not sure there is a specific Project Management (which to me implies Software Engineering) style that people use with Django. In my experience, using agile methodologies work great; You can quickly prototype your idea and enhance your product as needed. The tutorial, as others have menti

Re: Scaling django (nginx + apache + mod_wsgi + postgresql)

2012-10-29 Thread Kurtis Mullins
The old rule of thumb is to avoid premature optimization. I'd build, profile, then scale or otherwise optimize as needed. This isn't a tutorial or really a discussion on all points of scaling a system; but identifying bottle necks will do wonders when it comes to deciding what, where, and how to sc

Re: Scaling django (nginx + apache + mod_wsgi + postgresql)

2012-10-30 Thread Kurtis Mullins
The easiest thing I've found to use is simply uWSGI with Nginx. It's easy to just create new Django servers on the fly. You simply include the IPs in a list and it will use various algorithms (optional) to distribute the requests appropriately. As a lot of applications are IO bound, you could also

Re: compiler

2012-11-05 Thread Kurtis Mullins
You could use Lint to check your code for syntax errors. On Mon, Nov 5, 2012 at 4:18 PM, Nikolas Stevenson-Molnar < nik.mol...@consbio.org> wrote: > I tried copy/pasting the code you linked into PyCharm and it worked fine. > Gotta be spacing/indentation somewhere. > > > _Nik > > On 11/5/2012 1:

Re: How to crop image ?

2012-11-08 Thread Kurtis Mullins
I've used JCrop in combination with a custom Django Form and PIL before. I had good results. On Thu, Nov 8, 2012 at 8:09 AM, Gink Labrev wrote: > How to crop image before upload ? > I found this project: > https://github.com/jonasundderwolf/django-image-cropping, but it does not > work well. >

Re: How to crop image ?

2012-11-08 Thread Kurtis Mullins
(However, I don't know of any ways to crop images before upload ... except maybe with Flash or Java) On Thu, Nov 8, 2012 at 1:25 PM, Kurtis Mullins wrote: > I've used JCrop in combination with a custom Django Form and PIL before. I > had good results. > > > On Thu, Nov

Re: How to call a database function from Django?

2012-11-08 Thread Kurtis Mullins
I usually create management commands and call that. Here's the docs: https://docs.djangoproject.com/en/dev/howto/custom-management-commands/ On Thu, Nov 8, 2012 at 2:41 PM, Andre Lopes wrote: > Hi all, > > I need to run a script once a day. The script basically will call a > postgresql function

Re: How to crop image ?

2012-11-09 Thread Kurtis Mullins
The only thing I didn't like about easy-thumbnails is that it relied on generating them on the fly and caching them, if I remember correctly. While that's not totally horrendous, I was using a CDN and didn't want to use my Django Application to serve media. Note: I might be thinking of something el

Re: google app engine suggestion

2012-11-10 Thread Kurtis Mullins
Well for development purposes, I just recommend using Django's built-in "runserver" command. It will launch a relatively full-featured HTTP Server for testing on your own computer. The command is "python manage.py runserver" and you should be able to access it using localhost:8000 Otherwise, I thi

Re: Implementing a List of Foreign Keys in a Model

2011-09-12 Thread Kurtis Mullins
me. Plus, they didn't really show how to call it from a command line which would be important to me. On Sun, Sep 11, 2011 at 4:32 AM, Daniel Roseman wrote: > > On Sunday, 11 September 2011 00:18:28 UTC+1, Kurtis wrote: >> >> Hey Guys, >> >> I have a very si

Re: Class-based views or "Traditional" Views for Django 1.3?

2011-09-14 Thread Kurtis Mullins
ocumentation as well. Agreed, and fwiw both you Kurtis, and anyone else can feel free to ping me > directly in #django if they need help getting the hang of CBV's, if i'm > around (which I am most the day typically) I'll be more then happy to help. > > OTOH, getting th

Re: User Registration -> Password not saving

2011-09-22 Thread Kurtis Mullins
assword must include at least \ one letter and at least one number.') On Thu, Sep 22, 2011 at 4:15 AM, Daniel Roseman wrote: > > > On Wednesday, 21 September 2011 23:42:02 UTC+1, Kurtis wrote: > >> Hey, >> >> I've cr

Re: User Registration -> Password not saving

2011-09-22 Thread Kurtis Mullins
, things will be working great. On Thu, Sep 22, 2011 at 11:56 AM, Daniel Roseman wrote: > On Thursday, 22 September 2011 15:18:15 UTC+1, Kurtis wrote: >> >> Sorry, I guess I should've posted that as well :) >> >> import string >> class PasswordField(forms.Cha

Re: User Registration -> Password not saving

2011-09-22 Thread Kurtis Mullins
I was wrong. There wasn't any issue with the unicode. Your fixed worked perfectly. I just had to change my comparison from password is not password_confirm to password != password_confirm and it's working great now. Thanks a lot! On Thu, Sep 22, 2011 at 12:04 PM, Kurtis Mul

Re: Handling file uploads in a clustered application server environment

2011-09-23 Thread Kurtis Mullins
too heavily. On Fri, Sep 23, 2011 at 11:40 AM, Tom Evans wrote: > On Fri, Sep 23, 2011 at 4:24 PM, Kurtis wrote: > > Hey guys, > > > > We have an Nginx front-end with a cluster of Django application > > servers. What are some methods of handling user uploads in

Re: Model Validation

2011-09-25 Thread Kurtis Mullins
Looks like you want to use this field: https://docs.djangoproject.com/en/dev/ref/models/fields/#positiveintegerfield On Sat, Sep 24, 2011 at 11:54 PM, jenia ivlev wrote: > I have a model M that has a field num=models.IntegerField() > I have a modelform called 'F' for model 'M'. > I want to ensur

Re: Cloudfiles Storage Backend

2011-09-26 Thread Kurtis Mullins
; http://code.welldev.org/django-storages/ > > I'm currently using this and it works great with Mongo's GridFS and S3. > > -- > Alex > > > On Mon, Sep 26, 2011 at 8:33 AM, Kurtis wrote: > >> Hey, >> >> I really want to build a storage back-end fo

Re: Python Weekly

2011-09-26 Thread Kurtis Mullins
Thanks! I'm joining as well. On Mon, Sep 26, 2011 at 1:52 PM, Arthur Gouveia wrote: > Nice one. I'm in. > > -- > Arthur Gouveia > Web Developer > > http://arthurgouveia.com > > > > On Mon, Sep 26, 2011 at 1:46 PM, Cal Leeming [Simplicity Media Ltd] < > cal.leem...@simplicitymedialtd.co.uk> wrote:

Re: Question about losing port number.

2011-09-26 Thread Kurtis Mullins
Umm, I'm kinda new here so I'm not sure if this is the right place for that kind of a question. But, you could easily include $_SERVER['SERVER_PORT'] in there Source: http://php.net/manual/en/reserved.variables.server.php On Mon, Sep 26, 2011 at 3:30 PM, Chen Xu wrote: > I have a general qu

Re: Python Weekly

2011-09-26 Thread Kurtis Mullins
There is a privacy policy right on the page where you subscribe. We respect your privacy, and we take it very seriously. We won't share your > email address with anyone, and you'll only receive Python Weekly newsletter > as scheduled. > > On Mon, Sep 26, 2011 at 3:42 PM, Sonny wrote: > Would be

Re: Using exists() on queryset for a User

2011-09-26 Thread Kurtis Mullins
That worked perfectly and makes a lot more sense. Thanks! On Mon, Sep 26, 2011 at 4:05 PM, Shawn Milochik wrote: > if User.objects.filter(email = data['email']).exists() > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this g

Re: You -- yes, you -- should contribute to Django.

2011-09-28 Thread Kurtis Mullins
Thanks Shawn. And nice speech! I didn't realize there were so many open tickets -- especially any as trivial as that. I'll try to do my part. Like you said, it's a great way to learn more about Django anyways. On Wed, Sep 28, 2011 at 1:53 PM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simpli

Re: Using IGNORABLE_404_URLS

2011-09-28 Thread Kurtis Mullins
Hey, I don't think I'll be able to help you much with figuring this out in Django-land. I do have one suggestion though. You could manually block these using your front-end server (Nginx, Apache, etc...) so that way it doesn't even reach Django. Not only would this be a hypothetically easy fix, you

Re: Help with forms (really struggling)

2011-09-29 Thread Kurtis Mullins
Hey, I'm still half asleep so I apologize if this is a dumb question. Is the "Person" the User using this? If so, you should have access to the User object from the session. If not, you could probably do a query with the Primary Key to grab the Person object. e.g. person = Person.objects.get(pk

Re: Cloudfiles Storage Backend

2011-10-03 Thread Kurtis Mullins
hierarchy just fine. > > On Sep 26, 11:33 am, Kurtis wrote: > > Hey, > > > > I really want to build a storage back-end for cloudfiles. The snag is > > that cloudfiles containers do not allow for a hierarchical directory > > structure. Everything must be i

Re: (argh!!) Fwd: Undelivered Mail Returned to Sender

2011-10-05 Thread Kurtis Mullins
+1 Thanks for the fix :) On Tue, Oct 4, 2011 at 9:13 PM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > Nice one - thank you for sorting this out Russell, was driving me a bit > nuts! > On Oct 5, 2011 1:26 AM, "Russell Keith-Magee" > wrote: > > On Wed, Oct 5,

Re: Beginner a bit lost - need some pointers please

2011-10-05 Thread Kurtis Mullins
I just wanted to put my 2 cents in. #django on Freenode is a great place to get real-time help with simple questions. On Oct 5, 2011, at 6:02 PM, Chris G wrote: > On Wed, Oct 05, 2011 at 04:35:49PM -0400, Peter Herndon wrote: >> >> On Oct 5, 2011, at 3:55 PM, Chris G wrote: >>> >>> However tw

Re: Django image upload

2011-10-06 Thread Kurtis Mullins
ImageField uses PIL (Python Imaging Library) to verify if it's a valid image, if I understand it correctly. On Thu, Oct 6, 2011 at 6:21 PM, Ian wrote: > Ah! Got it working! How do I make sure the files are only images? Is > there a way to check the extension? Also, how would I rename the > fil

Re: Alternative to Decorators for Class-Based View

2011-10-11 Thread Kurtis Mullins
m/en/dev/topics/class-based-views/#decorating-the-class > > Good luck! > > On Oct 5, 11:42 am, Kurtis wrote: > > Hey, > > > > What's the best way to go about doing things for class-based views > > such as requiring logins? In the function-based views

Re: Django - how to create a private subpage?

2011-10-11 Thread Kurtis Mullins
Check out this page: https://docs.djangoproject.com/en/dev/topics/auth/#handling-object-permissions Also, you may want to check out decorators if the user only has to be logged in. Another method you could use are groups. On Tue, Oct 11, 2011 at 1:56 PM, Petey wrote: > I am trying to do a privat

Re: Sample Custom Decorator

2011-10-11 Thread Kurtis Mullins
>results = func( *args, **kwargs) > #record.StopTime = datetime.datetime.now() >#record.save() >return results >print 'done' >return wrapped > > > @decorate >

Re: Storing data from frequently changing forms

2011-10-11 Thread Kurtis Mullins
I don't know how to go about integrating Django with an RDF Store, but from my academic experience RDF Stores were pretty popular to use when you have constantly changing data. I'd be interested in a RDF Store project for Django if you end up going that route. On Tue, Oct 11, 2011 at 5:53 PM, Mich

Re: Sample Custom Decorator

2011-10-11 Thread Kurtis Mullins
code.com/hg/decorator/documentation.html - A > handy module and discussion of preserving function signatures > -- > Steven > > > > On Tue, Oct 11, 2011 at 4:59 PM, Kurtis Mullins > wrote: > >> Thanks Fred! I tried to look through your code and understand what's going &

Re: Ajax replacement in django

2011-10-12 Thread Kurtis Mullins
You could also use Javascript to just hide and display information as you need it. No Ajax involved -- just need to give all of the data to the browser up front. On Wed, Oct 12, 2011 at 11:38 AM, Javier Guerra Giraldez wrote: > On Wed, Oct 12, 2011 at 9:39 AM, lankesh87 wrote: > > I mean if we

Re: configuring

2011-10-12 Thread Kurtis Mullins
If you're sure you've called the MySQLDb correctly in your settings file, as described by the documents, then you may simply be missing the Python-MySQL package. On Wed, Oct 12, 2011 at 5:59 PM, Mike Dewhirst wrote: > Yeah > > The last line of the traceback indicates a problem with your MySQL set

Re: Create a modular application

2011-10-13 Thread Kurtis Mullins
I tend to split mine up based upon URLs. For example, all User-Authentication stuff I may put into a 'user' app. All misc. things that don't seem to have a proper place might go into a 'core' app. Some times this is especially helpful as you can just include an entire App in your main urls.py and w

Re: custom table for django authentication possible

2011-10-13 Thread Kurtis Mullins
Django's User Authentication Module is pretty dependent upon it's set of assumption, including that the User data would be stored in a specific table. Without any experience in this matter, I would assume it'd be a difficult task to try to modify it to use your own table. However, you can write you

Re: Python Contractor - urgent!

2011-10-13 Thread Kurtis Mullins
I wish I could come work for you guys. I'd love to see London, haha. Good luck to you! On Thu, Oct 13, 2011 at 3:29 AM, Tim Abbott wrote: > Morning guys, > > i will cut right to it - I need a Python developer ASAP for a contract on > client site in London. I know this is a Django mailing list bu

Re: Getting into professional django development

2011-10-18 Thread Kurtis Mullins
I recommend South as well. Also, if you're interested -- I *might* be able to connect you with some part-time work on a current project. Contact me privately if want to know more. I need to talk it over with the big-man who signs the pay-check but I could definitely use the help. On Tue, Oct 18, 2

Re: custom table for django authentication possible

2011-10-19 Thread Kurtis Mullins
Ahh okay. Yeah -- you'll most likely need to write your own custom authentication backend to use the existing table. https://docs.djangoproject.com/en/1.3/topics/auth/#writing-an-authentication-backend Good luck! On Wed, Oct 19, 2011 at 2:36 AM, Jisson Varghese < jisson.vargh...@dexetra.com> wro

Re: Templates available to a cluster

2011-10-19 Thread Kurtis Mullins
e to store it somewhere else as well. > > On Wednesday, October 19, 2011 at 5:48 PM, Kurtis wrote: > > I'm working on a project where I will eventually need to be able to > add/delete/manage templates on the fly. Our Django Application Servers > are setup as a cluster behind

Re: Templates available to a cluster

2011-10-19 Thread Kurtis Mullins
em in a fast document db. > > On Wednesday, October 19, 2011 at 5:54 PM, Kurtis Mullins wrote: > > Very true, I could definitely implement it as a pluggable loader. I'll try > to find the DB Template Loader too. I'm mainly concerned with this being a > large bottle neck

Re: Date and time picker in Django

2011-10-20 Thread Kurtis Mullins
No problem. I honestly haven't had to use a time picker, yet. But a quick google search brought this up: http://trentrichardson.com/examples/timepicker/ It seems to work w/ the Jquery-ui Datepicker. On Thu, Oct 20, 2011 at 4:05 PM, Mario Gudelj wrote: > Thanks Kurtis. What do you use a

Re: Date and time picker in Django

2011-10-20 Thread Kurtis Mullins
ahh okay, haha sorry! On Thu, Oct 20, 2011 at 4:13 PM, Mario Gudelj wrote: > Yeah, that's the one i mentioned that doesn't work for me for some reason > > On 21/10/2011 7:10 AM, "Kurtis Mullins" wrote: > >> No problem. I honestly haven't had to us

Re: automatic models.py generation

2011-10-20 Thread Kurtis Mullins
I don't think it would be easily possible to do this with Django's ORM... but of course that depends on how your database is setup in the first place. Depending on your data-size, you might have better luck just building new Models and migrating your data. On Thu, Oct 20, 2011 at 8:51 PM, Sebastia

Re: Radio button with nested widget

2011-10-20 Thread Kurtis Mullins
You could just create a form with two upload fields and a char field. And then use Javascript w/ Radio buttons to disable/enable those fields. On Thu, Oct 20, 2011 at 12:02 PM, Leonardo Giordani < giordani.leona...@gmail.com> wrote: > Hi all, > > I'm trying to implement the following form: a firs

Re: Login problems under heavy load

2011-10-21 Thread Kurtis Mullins
Are you having any errors in your log? And when you say unable to login -- does it display a message to them? What authentication backend are you using? The more information you can provide, the easier it will be for people to try to help you out. On Fri, Oct 21, 2011 at 12:30 PM, Alpesh Gajbe wro

Re: Field.Choices in Template

2011-10-21 Thread Kurtis Mullins
Bump On Thu, Oct 20, 2011 at 3:37 PM, Kurtis wrote: > Hey, > > I'm trying to build a custom template for my ModelForm. My ModelForm > contains several M2M fields. If I run the ModelForm.as_view and then > in my template print {{ form.as_p }} it'll automagically display

Re: Django 1.3.1 - Form on multiple pages

2011-10-21 Thread Kurtis Mullins
https://docs.djangoproject.com/en/1.3/ref/contrib/formtools/form-wizard/ I don't believe it's deprecated in 1.3.1 but I could be wrong... On Fri, Oct 21, 2011 at 6:04 PM, youpsla wrote: > Hello, > I like to know wich is the best splution to manage one form on > multiple pages with Gjango 1.3.1.

Re: Django 1.3.1 - Form on multiple pages

2011-10-21 Thread Kurtis Mullins
mwizard" package from > djangopackages. > > I think it will work now > > Thanks > > Alain > > > > On 22 oct, 00:27, Kurtis Mullins wrote: > > https://docs.djangoproject.com/en/1.3/ref/contrib/formtools/form-wizard/ > > > > I don't believe it&#x

Re: Django 1.3.1 - Form on multiple pages

2011-10-21 Thread Kurtis Mullins
wrote: > Hi again, > in this link: > https://docs.djangoproject.com/en/dev/ref/contrib/formtools/form-wizard/ > > the "/dev/" means that I'm reading the development docs ? > > Regards > > Alain > > On 22 oct, 01:22, Kurtis Mullins wrote: > >

Re: Storage Backend for MediaTemple's ProCDN?

2011-10-23 Thread Kurtis Mullins
though the > app they plan on launching is movie streaming service, and that's > where it get complicated... I will need to judge more than just > pricing and API, Bandwidth is also a big one, especially for the > initial buffering of the stream. > > On Oct 22, 4:32 pm, Kurtis

Re: Image Field Issue

2011-10-23 Thread Kurtis Mullins
Django relies on Python Imagine Library to check if an image is valid or not. Make sure that PIL was compiled w/ the libjpeg. I'm not sure on exact directions on how to do that, but you can find them available online. When you compile PIL, it will tell you what extensions are supported or missing d

Re: Help w/ optimization

2011-10-24 Thread Kurtis Mullins
as a premature optimization, > I always use it. :) > > []'s > > > On Mon, Oct 24, 2011 at 9:17 AM, Tom Evans wrote: > >> On Mon, Oct 24, 2011 at 11:59 AM, Kurtis >> wrote: >> > Hey guys, >> > >> > I have some custom context in a view. I

Re: Field.Choices in Template

2011-10-26 Thread Kurtis Mullins
land in the form_invalid land. I'd like to be able to use this same technique to make sure I properly display what the user has selected thus-far. Thanks! On Tue, Oct 25, 2011 at 8:05 AM, Andre Terra wrote: > I remember trying to help you with this on IRC, Kurtis. I've had the >

Re: Long usernames in auth_user?

2011-10-26 Thread Kurtis Mullins
Check out userena as well. But a custom authentication back-end was the approach I originally took. And to answer your question, yes -- your chances of finding people w/ email addresses longer than 75 chars are less than finding people w/ 30 chars -- but still a limitation none-the-less as there is

Re: CAS and Django cache

2011-10-26 Thread Kurtis Mullins
umm, I'm not sure if "check-and-set" is some cache-specific lingo or not. But if you want to see if a value isn't set, check to see if it's None type... example: if cache.get('key') is None: cache.set('key', 'value', cache_seconds) Sorry if that's not at all what you're talking about :) On W

Re: No module named django after upgrade to os x Lion

2011-10-27 Thread Kurtis Mullins
Good luck with installing MySQL-python. You'll probably see an error at some point that the Module MySQLdb is missing if you use MySQL and don't install it. Last time, with Snow Leapord, I had to install "Mac Ports" to get it working. If you don't want to use the complexity of the virtual environm

Re: Reg: Displaying the contents of the file at a dynamic location

2011-10-27 Thread Kurtis Mullins
You would probably save these files just like any other User Uploaded Media. For example, in Django 1.3 this the Media Path setup in your settings.py. You would store a reference to the path in your database. Look up Storage Backends documentation for more information on this. As a side note, be

Re: Accuracy of GeoIP?

2011-10-27 Thread Kurtis Mullins
I just tried the demo and it put me about 2,500 miles away in Texas. Good luck! On Thu, Oct 27, 2011 at 7:31 AM, Ilya wrote: > Alan, try out our geolocation solution: Geobaza. We recently updated our > Python API and make Django app. > > High accuracy level for US & exUSSR. > > Install from PyPi

Re: No module named django after upgrade to os x Lion

2011-10-28 Thread Kurtis Mullins
28, 2011 at 6:13 AM, angelika wrote: > >> Thank you all for your help and suggestions. Last time I installed >> Django it took a full two days and I was nearly in tears at the end. >> Most of the time was spend trying to solve the problems that Kurtis is >> talking about, with

Re: CBV "Router"

2011-10-28 Thread Kurtis Mullins
n my function -- but I'm sure you get the point :) On Fri, Oct 28, 2011 at 7:09 AM, Kurtis wrote: > Hey Guys, > > I'm trying to create a "router" as recommended in IRC for several > different views. My Views are UpdateViews, so they are the new CBVs. I > don'

Re: django request.POST data caching

2011-10-30 Thread Kurtis Mullins
I apologize if this answer doesn't help much -- I'm confused by your question. request.POST doesn't cache anything. It's simply filled with data submitted by the browser on that specific request. If you click "Back" on your browser, many times the browsers will simply re-fill those form fields in

Re: variables in a dict in a template

2011-10-30 Thread Kurtis Mullins
One way to go about it is to create multiple, nested objects. For example: Score - Rounds Holes Then in your template, you'd do something along the lines of: {% for round in game.rounds %} {% for hole in round.holes %} {{ hole.score }} {% endfor %} {% endfor%} Hopefully that helps a little

Re: new formwizard - how to pass data between forms

2011-10-30 Thread Kurtis Mullins
I haven't read that particular back ports docs but when I looked at the dev docs for the new form wizard a little while back, I believe that it stores all previous data as hidden fields throughout the process. So I would think form.cleaned_data should contain everything. Hopefully that helps a l

Re: I can't activate the admin site

2011-10-31 Thread Kurtis Mullins
hmm, I suspect that the part of the error message you posted *may* not be completely clear on where the indentation problem is actually occurring. Anyways, if you want to be sure then I would try using Django 1.3 since it's thoroughly tested. Im' still half asleep so I could be overlooking some

Re: Dynamic URLs or creating querysets from your URL paths.

2011-10-31 Thread Kurtis Mullins
Sure you could do that. It's called using XML Transformations (XSLT), Javascript Templatating Engines, or a number of other approaches. Django does this with its Template Engine. The reason this isn't completely ran on the Client-Side is because it would be slower, difficult to cache, and dependen

Re: new formwizard - how to pass data between forms

2011-10-31 Thread Kurtis Mullins
Awesome! Let me know how it works out for you. I'll probably be giving it a try shortly as well. Thanks for sharing the good information. On Mon, Oct 31, 2011 at 6:43 PM, andreas wrote: > Hey Kurtis, > > thanks for your answer. > > I think hidden fields were used in the old

Re: django model forms validation and error display

2011-11-01 Thread Kurtis Mullins
I recommend using Class Based Views if you're running Django 1.3. I tried to go over your app and re-create a prototype using CBVs. I didn't spend a lot of time on the actual logic or field types. I also didn't even try running this. You'll need to fill in a couple of blanks but hopefully you get t

Re: Can't locate Django source code path

2011-11-01 Thread Kurtis Mullins
To grab the entire source package, follow the instructions on this page: https://code.djangoproject.com/#Browsingthecodeonline To grab just that single HTML file, it can be found here: https://code.djangoproject.com/browser/django/trunk/django/contrib/admin/templates/admin Note, that there's di

Re: Suggestions on "Loading" for possible long load-times?

2011-11-01 Thread Kurtis Mullins
Thanks a lot Russel! It sounds like a pretty reasonable approach to me. On Tue, Nov 1, 2011 at 7:54 PM, Russell Keith-Magee wrote: > On Wed, Nov 2, 2011 at 7:37 AM, Kurtis wrote: > > Hey, > > > > I've got a part of my site that is just prototyped at the moment.

Re: Onchange event on Choicefield in django formset

2011-11-02 Thread Kurtis Mullins
Try changing your success_url to this same page. On Wed, Nov 2, 2011 at 11:00 AM, asif.jama...@rezayat.net < asif.jama...@rezayat.net> wrote: > How can i access the form fields in django views. > > Suppose i have modelform called > > > class QuestionForm(forms.ModelForm): > > > answer = forms.Ch

Re: Onchange event on Choicefield in django formset

2011-11-02 Thread Kurtis Mullins
on' in request.POST: > return render_to_response('results.html') > elif 'form-0-answer' in request.POST: > > answer = request.POST.get('answer','') > values.append(answer) > return render_to_response('succes

Re: django and profile pictures creation

2011-11-03 Thread Kurtis Mullins
One option is to check out userena. If you don't want to use a third party application, then I would go about creating a UserProfile that has a one-to-one relationship with each User. And in that UserProfile Model, create an ImageField for the avatar. Here's some links to help get you started. ht

Re: Abstract FormView

2011-11-04 Thread Kurtis Mullins
s MyViewWithMixin(MyFormMixin, FormView): > pass > > # end example.py > > Hope that helps! Let us know if you have any other questions. > > > Cheers, > AT > > > > On Wed, Nov 2, 2011 at 6:47 PM, Kurtis wrote: > >> Hey, >> >> I have a cou

Re: Django class based views - not keen - anyone else??

2011-11-04 Thread Kurtis Mullins
Hey Cal, Yeah the documentation is a bit lacking. It's kinda difficult to put the pieces together. But once you learn how to use them -- they're pretty awesome and powerful. It does seem a little difficult to deviate away from the box at first, but once you understand how they work -- it's pretty

Re: Using the same storage backend for media and static files.

2011-11-05 Thread Kurtis Mullins
Hey Ian, I actually talked with Rich Leland about this. He gave me a pretty informative reply. Basically, he mentioned that he subclassed S3BotoStorage and just specified another bucket on init. I'm not sure on any specific implementation details there. He said "It's not pretty, but it works". T

Re: How do I define a default (override-able) primary key field on an abstract model?

2011-11-05 Thread Kurtis Mullins
I don't think the problem is overriding the Primary Key. I could be wrong, but I think the actual problem here is that you can not use OneToOneFields, ManyToManyFields, or ForeignKeys as primary keys. I'm not sure how it would work on a database level. Like I said, I could be wrong -- but that's my

Re: How do I define a default (override-able) primary key field on an abstract model?

2011-11-05 Thread Kurtis Mullins
nes > a and a primary key. You cannot have multiple primary key fieds, hence > "table B has more than one primary key." > > Furbeenator > > On Sat, Nov 5, 2011 at 3:48 PM, Kurtis Mullins > wrote: > >> I don't think the problem is overriding the Primary

Re: Is there a standard way to implement the top level of my site?

2011-11-07 Thread Kurtis Mullins
I'm not exactly clear on the question, but I'll share with you what I've done on my site. For pages like the "Home Page", I've created an application called "core". Then I just call my .core.views.HomePageView.as_view() from the "urls.py" file under my main project directory. The regular expressio

Re: admindocs app - almost, but not, working

2011-11-07 Thread Kurtis Mullins
Hmm, I just tried it and it seems to work fine for me. I'm not sure on the directions -- as I just uncommented the stuff in my code and installed docutils. Maybe the dev docs are not in sync with the version of django you are running? On Mon, Nov 7, 2011 at 5:31 PM, Brett Epps wrote: > If this i

Re: formset_factory: "extra" param doesn't work? (Django version 1.2.5)

2011-11-09 Thread Kurtis Mullins
Just wanted to clarify -- returning in a loop is an okay thing to do. It saves you from wasting cycles in a given loop. I suppose you could simply "break" out of it as well. I'm sure that could be a matter of opinion. But glad to hear you fixed your specific problem :) On Wed, Nov 9, 2011 at 4:13

Re: MVP--an open source repository for libraries and modules

2011-11-13 Thread Kurtis Mullins
Im assuming he means Model View Presentation because of the Django Context. On Nov 13, 2011 8:53 AM, "Stuart Laughlin" wrote: > http://www.acronymfinder.com/MVP.html ? > > On Nov 12, 9:04 am, skier31415 wrote: > > I'm a coder, but I don't code for the majority of my time. What I do > > is ident

Re: Which Linux distro to use on EC2?

2011-11-13 Thread Kurtis Mullins
I don't have a recommendation on a specific distribution -- that's really a matter of personal taste and experience. However, try to go with a free-tier instance until you really need to upgrade. There are only certain images that can be used with that free-tier. It's a pretty good deal! I've used

Re: Mysql + Unicode + username curiosity

2011-11-14 Thread Kurtis Mullins
Hey, I'm not sure on what the problem is here. I just wanted to let you know that I did the same test on my setup. And it appears to be returning the username as a unicode string. >>> a = User.objects.get(id = 1) >>> a.username u'admin' I don't have any default-character-set option in my my.cnf

Re: django.conf.urls.defaults.url documentation

2011-11-14 Thread Kurtis Mullins
https://code.djangoproject.com/browser/django/tags/releases/1.3.1/django/conf/urls/defaults.py On Mon, Nov 14, 2011 at 11:59 PM, Mike Thon wrote: > I recently started working on a new Django project using the latest > release, and I found the function django.conf.urls.defaults.url being used > i

Re: MVP--an open source repository for libraries and modules

2011-11-15 Thread Kurtis Mullins
a term popularized by (so says wikipedia) > Eric Ries (with whom I am also unfamiliar). > > > --Stuart > > On Nov 13, 2:56 pm, Kurtis Mullins wrote: > > Im assuming he means Model View Presentation because of the Django > Context. > &g

Re: Looking for my replacement (Lead Developer at a Start-up)

2011-11-23 Thread Kurtis Mullins
reviewing applicants. Please let me know if your'e still interested. Thanks, - Kurtis Mullins On Nov 23, 2011, at 12:12 PM, Hussein Ahmed wrote: > Hi Kurtis, > Are they giving equity as part of this or is it just a hourly pay? > > On Nov 22, 4:41 pm, Kurtis wrote: >&g

Re: Looking for my replacement (Lead Developer at a Start-up)

2011-11-23 Thread Kurtis Mullins
erned! On Wed, Nov 23, 2011 at 1:08 PM, Kurtis Mullins wrote: > Hello Hussein, > > Thanks a lot for messaging me. At this time, I would only expect hourly > pay. There may be an option of equity in the future but honestly I can't > make that decision or give you any guaran

<    1   2   3   4   5   >