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
I'm glad to hear you're having better luck with Rackspace than we did! Cumulus worked great for things like User Uploaded Media -- but when it came to things like Static Media (specifically using django's collectstatic feature) we had issues. Given, we could have just spent more time on the situati

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
Thanks guys! I appreciate the great answers! On Mon, Oct 24, 2011 at 7:30 AM, Flavia Missi wrote: > Looks like a genre has a genre group associated with it, right? You could > use select_related [1] method when selecting all genres, so, when Django > executes the query, all the relation comes in

Re: Field.Choices in Template

2011-10-26 Thread Kurtis Mullins
Hey Guys, I hate to bother you again. But -- is there a way to get the currently selected data from this set? For example, a user hits the page and all choices are displayed fine. But, they pick some choices. They haven't finished editing the form or maybe they made a mistake, anyways they land in

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
I'd give PostgreSQL a shot and see if it magically works for you. It's an awesome database. If you have any problems with it though, here's the "easy way out" I took. I just installed Mac Ports and never had another problem. Of course, you'll have to make sure you're using the Mac Ports tools you i

Re: CBV "Router"

2011-10-28 Thread Kurtis Mullins
Nevermind! Thanks to FunkyBob, I have a solution. I didn't realize you could do this so easily, so I'll share it with others. # views.py def my_router(request): view = MyCBV.as_view(template_name = 'foo.html') return view(request) Of course, I actually have logic in my function -- but I'm

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
/master/test_project/testapp2/views.py#L20) i found > what i was looking for: > get_cleaned_data_for_step() > > It does exactly what i need :-) > > On 31 Okt., 03:07, Kurtis Mullins wrote: > > I haven't read that particular back ports docs but when I looked at the > dev

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. It's > > not particularly optimiz

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
Great answer. Thanks a lot! On Thu, Nov 3, 2011 at 8:08 AM, Andre Terra wrote: > All you have to do is create a MyFormMixin class and add all those methods > you want to override. Usually you will want to call super() on the class so > that the normal behavior is also present in your final class

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

Re: djangopeople.net

2011-12-05 Thread Kurtis Mullins
http://www.networksolutions.com/whois-search/djangopeople.net On Mon, Dec 5, 2011 at 5:48 PM, Vitaliy wrote: > Hi, > > seems http://djangopeople.net gone, anyone know if going to be up or > who is running it ?.. > I just lost one contact that I definitely know exist on that site :( > > -- > You

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

2012-11-11 Thread Kurtis Mullins
I use them! On Sun, Nov 11, 2012 at 2:05 PM, Kevin wrote: > 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 > doin

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

2012-11-12 Thread Kurtis Mullins
John, My argument (or reason for switching) is it's DRY. Saves a lot of time and repetition in the long run ... at least in my experience. On the other hand, there are still perfectly good purposes for "function based views". On Mon, Nov 12, 2012 at 11:07 AM, John DeRosa wrote: > On Nov 11, 20

Re: how to get data from other website after login on other sites through my site?

2013-03-15 Thread Kurtis Mullins
I am going to assume that you do not own, or otherwise have access to Coursera as a developer. After a quick search, I see they offer no API. Therefore, I don't believe there would be any "ethical" way of doing this. You could have a user login through your site as a sort of gateway but I don't bel

Re: Goodbye, Malcolm

2013-03-20 Thread Kurtis Mullins
R.I.P. On Wed, Mar 20, 2013 at 8:16 PM, Ray Loyzaga wrote: > Hi Jacob, > > Would you be able to email me regarding the future funeral arrangements for > Malcolm. > So far the family are looking at 4th April, in Sydney, but the time (and > the date), haven't been totally settled. > It would be g

Re: Doubt regarding JSON/SQL in Django

2013-03-30 Thread Kurtis Mullins
If you don't use the ORM, Forms, and even the templating system you're losing quite a bit with Django. In my opinion, it's not worth using Django for those sorts of projects. While not a Python project, I found NodeJS & node-restify a good candidate for these types of applications. That's not a co

Re: Need Advice: Sending Emails

2013-04-12 Thread Kurtis Mullins
Check out sendgrid. If you use Rackspace I think they even give you a good discount. You could also just configure everything to use Google's SMTP. I've done that for quite a few projects. On Fri, Apr 12, 2013 at 12:19 PM, Tom Evans wrote: > On Fri, Apr 12, 2013 at 5:01 PM, Venkatraman S wrote

Re: How many workers do you run on one machine using django celery?

2013-04-20 Thread Kurtis Mullins
Both Michael and Shawn are spot-on in terms of scaling and using the queuing. However, I'd like to add that 5 seconds to complete a single task like this seems way too slow to me. I don't have much experience with sending SMS but if you're using an external SMS API, it should be extremely quick. I

Re: FW:

2013-05-03 Thread Kurtis Mullins
Phishing Web Site (SPAM) On Sat, Apr 6, 2013 at 9:10 PM, Ian Foote wrote: > http://kyokushin-aoki.sakura.ne.jp/www/tvojdi.php > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails fro

Re: Accessing django development server from internet!

2013-05-07 Thread Kurtis Mullins
You would need to make port 80 accessible from the internet. As mentioned, that's out of the scope of the Django User Group. To give you a little bit of help, I suggest searching for the terms "web server from home". That should get you started. On Tue, May 7, 2013 at 4:19 PM, Nikolas Stevenson-M

Re: Disable "Password Upgrading"?

2013-05-16 Thread Kurtis Mullins
It took some digging but I believe I found the answer, just in case anyone else comes across this problem. I'll post again after I've tested this. https://github.com/django/django/blob/1.5.1/django/contrib/auth/hashers.py#L20 On Tue, May 14, 2013 at 6:05 PM, Kurtis wrote: > As per this documen

Re: Disable "Password Upgrading"?

2013-05-16 Thread Kurtis Mullins
feels clumsy and I'm sure there's a better way. Your mileage may very. On Thu, May 16, 2013 at 7:06 PM, Kurtis Mullins wrote: > It took some digging but I believe I found the answer, just in case anyone > else comes across this problem. I'll post again after I've tested thi

Re: Where is the best place to get assistance installing Red Hat, Oracle and Django onto a VPN?

2015-06-10 Thread Kurtis Mullins
I would also recommend checking out Heroku for a quicker test release. Down the line, when you want more control over the system administration, you can save a bit of money by building out your own services. > On Jun 10, 2015, at 8:35 AM, Vijay Khemlani wrote: > > Wihtout knowing anything abou

Re: html to odt

2013-11-22 Thread Kurtis Mullins
I'm not sure if I understand the problem correctly, but if you are wanting to serve HTML files rendered as ODT, you could take the following steps: 1. In your view, renderyour HTML 2. Use this library

Re: Terrible performance when dropping into raw SQL Oracle

2014-03-05 Thread Kurtis Mullins
Sort of off-topic as I don't have anything constructive to add to help fix your problem but I recommend not running complex (long-running) queries directly in Django views. Perhaps use Celery. I know this doesn't solve your problem (although it might help a bit if Django's environment is causing i

<    1   2   3   4