Re: SyntaxError Creating New Project

2012-08-22 Thread Kurtis Mullins
Very weird. I ran the syntax and did not receive a syntax error. I just checked on the documentation and it does say Python 2.5 is required, which as you mentioned you have installed. Maybe double-check to make sure that you're executing this with the right Python executable? I'm running Python 2.

Re: Models relationship

2012-08-23 Thread Kurtis Mullins
Hello Fernando, Just as a quick example, you could do something like this: class Factory(models.Model): # Assuming suppliers and customers are just two sides of the same relationship suppliers = models.ManyToManyField("self", related_name="customers") Then simply query accordingly: fact

Re: What does this code do? Also, testing decorator via terminal?

2012-08-31 Thread Kurtis Mullins
> > On Fri, Aug 31, 2012 at 9:17 PM, Micky Hulse wrote: > > I'd like to add: > > if objects.status_code != 200: > > return objects > > ... which is found via this code: > > > > Doh! After a bit of trial and error, I given up on trying to merge > those two c

Re: Easy way to temporarily disable the need to login

2012-09-05 Thread Kurtis Mullins
If any of your templates/views depend upon a request.user object, you'll run into issues because that will not exist without "logging in". I'm not sure of a good way around this off-hand without knowing more about your site. Sorry! On Wed, Sep 5, 2012 at 11:18 AM, Larry Martell wrote: > We have a

Re: Easy way to temporarily disable the need to login

2012-09-05 Thread Kurtis Mullins
I don't see why not. Are you running unit tests (testing scripts) or are you just using the browser for testing? On Wed, Sep 5, 2012 at 11:24 AM, Larry Martell wrote: > On Wed, Sep 5, 2012 at 9:22 AM, Kurtis Mullins > wrote: > > If any of your templates/views depend upon a re

Re: Easy way to temporarily disable the need to login

2012-09-05 Thread Kurtis Mullins
This *might* be helpful depending on how you're testing: http://stackoverflow.com/questions/2036202/how-to-mock-users-and-requests-in-django On Wed, Sep 5, 2012 at 11:36 AM, Kurtis Mullins wrote: > I don't see why not. Are you running unit tests (testing scripts) or are > yo

Re: Easy way to temporarily disable the need to login

2012-09-05 Thread Kurtis Mullins
ackends()[0] > > user = user[0] > > user.backend = "%s.%s" % (backend.__module__, > > backend.__class__.__name__) #fake authentication > > login(request, user) > > > > You can add that to your testing environnement MIDD

Re: Django Interview Questions

2012-09-05 Thread Kurtis Mullins
Yeah, I think this guide is a little crazy. If I'm getting interviewed based on questions I can't answer without looking up relevant documentation then I'd probably look bad even though the interviewer is the one lacking the required knowledge to get the job done. Maybe that's why I don't intervie

Re: Easy way to temporarily disable the need to login

2012-09-05 Thread Kurtis Mullins
12 at 1:06 PM, Larry Martell wrote: > Thanks - but now I'm getting > > NameError: "global name 'get_backends' is not defined" > > > On Wed, Sep 5, 2012 at 12:59 PM, Kurtis Mullins > wrote: > > Looks like you just need a quick: > > > >

Re: How to use FTP to upload files with Django?

2012-09-05 Thread Kurtis Mullins
Do you want to use FTP to serve or accept the files? On Wed, Sep 5, 2012 at 2:14 PM, Mando wrote: > Would this work -> nginx-gridfs ? > > > On Wednesday, September 5, 2012 1:09:25 AM UTC-5, Chaney Lee wrote: >> >> I just want to allow users uploading some

Re: Easy way to temporarily disable the need to login

2012-09-05 Thread Kurtis Mullins
> want to share, that would be great. > > On Wed, Sep 5, 2012 at 1:50 PM, Kurtis Mullins > wrote: > > Actually, I've got another idea for you. You mentioned you wanted to > simply > > access using urllib. Maybe you could create a small script to extract a > CSRF

Re: Easy way to temporarily disable the need to login

2012-09-05 Thread Kurtis Mullins
> > On Wed, Sep 5, 2012 at 2:48 PM, Kurtis Mullins > wrote: > > Sure, > > > > To submit a cookie, check this out: > > > http://stackoverflow.com/questions/3334809/python-urllib2-how-to-send-cookie-with-urlopen-request > > > > To harvest a CSRF Token

Re: Easy way to temporarily disable the need to login

2012-09-05 Thread Kurtis Mullins
se Firefox on Linux (so the most efficient setup) you will probably need at least 10 machines to generate that kind of load. Quite insane when JMeter/Grinder/httperf can generate the same kind of load with a single machine. " On Wed, Sep 5, 2012 at 2:52 PM, Kurtis Mullins wrote: > No prob

Re: Development server won't work from a shared web host

2012-09-06 Thread Kurtis Mullins
Hey, All you should need to get through the Django Tutorial is Python and Django. During development you can use SQLite which is built in and doesn't need any third-party libraries. Good luck! On Thu, Sep 6, 2012 at 1:23 PM, ecs1749 wrote: > Thanks. I might as well bite bits of it. It's tough

Re: Site Architecture

2012-09-07 Thread Kurtis Mullins
I would recommend not using Django to consume services over a network without intensive caching and safe-guards just due to the fact that it will hold up the connection when a user tries to access a page. Importing your existing project into Django (as opposed to accessing it through an API) would

Re: Site Architecture

2012-09-07 Thread Kurtis Mullins
ources, it can be the best solution to a project. However, smaller projects which tend to lack resources can fall into a trap if they're not careful and well informed on the differences inherent to this type of architecture. On Fri, Sep 7, 2012 at 12:12 PM, Tom Evans wrote: > On Fri, Sep 7,

Re: Announcement of GUI for Creating Models

2012-09-08 Thread Kurtis Mullins
You could take it a few steps farther and reproduce some work done by a doctor(now) I used to go to school with. http://knoesis.wright.edu/research/srl/projects/mobicloud/ On Sat, Sep 8, 2012 at 2:50 PM, Javier Guerra Giraldez wrote: > On Fri, Sep 7, 2012 at 9:42 PM, Timothy Clemans > wrote: >

Re: is django too big for my use case?

2012-09-08 Thread Kurtis Mullins
I have a project that will be making extensive use of Neo4j, along with other data systems. As much as I love Django, I don't think the marriage is there for what you want, yet. If you're not using Django's ORM, Template System, Administration System, etc... then there's really not much left of Dja

Re: form doesn't validate when trying to upload file

2012-09-09 Thread Kurtis Mullins
Also, don't forget the multi-part in your template: On Sun, Sep 9, 2012 at 2:29 PM, Joseph Mutumi wrote: > I'm assuming you are using the forms.ModelForm for your model? Say > LicenceForm? > > class LicenseForm(forms.ModelForm): > class Meta: > model = License > > According to the d

Re: form doesn't validate when trying to upload file

2012-09-10 Thread Kurtis Mullins
ahh, sorry I just saw something that might help. Try making this change: docpath = models.CharField(max_length=200) to: docpath = models.FileField(...) # Check the docs for arguments to this Field. https://docs.djangoproject.com/en/dev/ref/models/fields/#filefield On Mon, Sep 10, 2012 at 8:41 A

Re: form doesn't validate when trying to upload file

2012-09-10 Thread Kurtis Mullins
Sorry about that. I accidentally over-looked where you mentioned that in your email. Are you running this on a debug server? Also, can you try replacing your template code with a simple {% csrf_token %}{{ form }} and see if that makes any differences? On Mon, Sep 10, 2012 at 10:38 AM, mapapage w

Re: Marketplace for Django apps

2012-09-11 Thread Kurtis Mullins
How about a compromise; just an easier way to donate to Django and Django Application developers? It would encourage sharing high quality projects and hopefully make it worth our time (financially, not just because we love and support libre software) to do so. For that matter, there's all sorts of

Re: Iphone applications via django

2012-09-11 Thread Kurtis Mullins
I can offer some information if you can share your "skill level" when it comes to developing iOS and/or Django Applications. 1. Do you currently know how to program iOS Applications? If so, do you have any experience writing iOS programs that can handle HTTP Requests? If the answer to either of th

Re: Possible spam from mailing list? ("China Mobile")

2012-09-12 Thread Kurtis Mullins
Thanks guys for confirming. I'm glad I'm not the only one! I've just set it as spam, hopefully gmail will catch on. On Wed, Sep 12, 2012 at 6:38 PM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > +1 just received one of these. > > > On Wed, Sep 12, 2012 at 10:

Re: Model Validation with Exception Handling

2012-09-12 Thread Kurtis Mullins
Just a quick example of a field that can have two completely different error types but both throw a ValidationError while running full_clean(). Let's say my Model includes an email address. The email address must be unique. It could either fail because 1. It's not Unique (or) 2. It's an invalid em

Re: newbie: patch required? procedure? [closed ticket 16017 / createsuperuser]

2012-09-13 Thread Kurtis Mullins
Try installing python using "brew" or another packaging utility On Thu, Sep 13, 2012 at 1:54 PM, Bob Aalsma wrote: > Umm, could you be more specific about how/where to put this? > All the combinations and location I could think of will all still give the > same error... > > > > > Op donderdag 13

Re: Possible spam from mailing list? ("China Mobile")

2012-09-13 Thread Kurtis Mullins
I actually just received another one of those emails. The funny part is that it used this exact thread's subject in the message. I'm curious as to whether this 139.com is emailing everybody who sends an email to the list or if it only sends emails to people in who are involved in the same thread(s)

Re: Possible spam from mailing list? ("China Mobile")

2012-09-14 Thread Kurtis Mullins
address, so they'd be easy to block on an individual > > level. But my guess is that everyone posting to django-users is receiving > > these, so it would be good for a group admin to address this at the group > > level (someone suggested removing that user). > > > &

Re: Using email instead of username for registration and login

2012-09-24 Thread Kurtis Mullins
You could check out django-userena On Mon, Sep 24, 2012 at 9:57 PM, Bill Beal wrote: > Hi all, > > I want to use the email address as the username for registration and > login. I'm using django-registration for 2-stage registration. I'm > looking for an easier way than what I've come up with s

Re: Using success_url with reverse() in class-based generic view

2012-09-26 Thread Kurtis Mullins
Sometimes, though, you may need to pass variables to a success url. In that case, I'd use the "get_success_url" method so you can access the 'self' attributes. On Wed, Sep 26, 2012 at 1:32 PM, Germán wrote: > Just for the record. > > Since Django 1.4, the best way to set up success_url in class-

Re: app for kickstarter-like goals

2012-10-01 Thread Kurtis Mullins
haha, I'm not sure of anything that already implements this but it shouldn't be too difficult to build yourself. On Sun, Sep 30, 2012 at 3:10 PM, Matteo Suppo wrote: > I'm developing a website for a non-profit organization. > > They want something similar to kickstarter, only based on people inst

Re: URLField and Web Sockets URLs

2012-10-04 Thread Kurtis Mullins
Looks like this is similar and shows that people want other protocols as well: http://stackoverflow.com/questions/8778416/what-are-the-valid-values-for-a-django-url-field You could modify the validator's regex but I imagine the cleanest way to do this would be to make a copy of it in your own code

Re: Django performance vs others

2012-10-05 Thread Kurtis Mullins
Probably the ability to both extend and include (template inheritance) On Fri, Oct 5, 2012 at 9:24 AM, Amirouche Boubekki < amirouche.boube...@gmail.com> wrote: > I have had no idea until recently that django template are sooo slow... >> other engines do the same... but spent less time. What the

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

2012-10-05 Thread Kurtis Mullins
Also, if memory serves me correctly, MySQL may be setup to allow connections from 127.0.0.1 but not Localhost On Fri, Oct 5, 2012 at 2:45 PM, Mohamad Efazati wrote: > Hi afshin > localhost is kind of pointer to 127.0.0.1, maybe in /etc/hosts or other > thing you overwrite it. > so 127.0.0.1 is so

Re: Disabling CSRF is not working.

2012-10-08 Thread Kurtis Mullins
Another solution would be to simply work with the CSRF Protection. It's not really that hard, even when using Javascript. There's even a good, simple example of using JQuery with it in the official documentation. On Sun, Oct 7, 2012 at 3:41 AM, Laxmikant Gurnalkar < laxmikant.gurnal...@gmail.com>

Re: when is a Context Processor called?

2012-10-08 Thread Kurtis Mullins
https://docs.djangoproject.com/en/dev/topics/http/sessions/ On Mon, Oct 8, 2012 at 10:28 AM, Stefano T wrote: > Ok. > so basically they are called before the rendering of a template. > > How can i have an object stored in the request object (if possible)? > > Something that lets me to do, in a vi

Re: Javascript encoding and python decoding and vice versa

2012-10-09 Thread Kurtis Mullins
You could obfuscate the Javascript; but there's no such thing as security through obfuscation :) HTTPs is your best bet in terms of getting it from the server to the client without someone in the middle reading it. On Tue, Oct 9, 2012 at 1:20 AM, Mike Dewhirst wrote: > On 9/10/2012 4:07pm, Laxmi

Re: accessing django

2012-10-09 Thread Kurtis Mullins
ys for helping this out. > One more question what is the basic step of installing the package? are > they all the same? > > > On Tue, Oct 9, 2012 at 11:45 AM, Kurtis Mullins > wrote: > >> Not really. You could probably use a host that might have some fancy >> control pan

Re: Update a model using UpdateView

2012-10-10 Thread Kurtis Mullins
You've got it. I included an 'owner' field on any model that I wanted to show ownership with. This is actually not too insanely hard as you could make a Parent Model or Mixin to make things easier. Another option is to use something like django-guardian to handle all of your permissions. However,

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
Thanks a lot for that tip. I actually read over the Generic Foreign Keys several times before I asked the question but it still left me pretty confused. Is there a place I can see a good, straight-forward example of how this works? The "tags" example they had just didn't do it for me. Plus, they di

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

2011-09-14 Thread Kurtis Mullins
Thanks for the input from both of you! And Donald, I think I'll take you up on that offer. I'd really like to learn them. Hopefully down the line, when this initial project is out the door and I have solid understanding of the CBV's, I'll be able to contribute a little to the documentation as well.

Re: User Registration -> Password not saving

2011-09-22 Thread Kurtis Mullins
Sorry, I guess I should've posted that as well :) import string class PasswordField(forms.CharField): # Setup the Field def __init__(self, *args, **kwargs): super(PasswordField, self).__init__(min_length = 7, required = True, label = u'Password',

Re: User Registration -> Password not saving

2011-09-22 Thread Kurtis Mullins
Thanks Daniel! You were right on cue with that. I tried your code and for some reason the value is being returned as a standard string instead of a unicode string, as far as I can tell. (Effectively, my password and passwordConfirm are not matching anymore). Hopefully once I get that worked out, th

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
Thanks a lot for the quick response, Tom. I like your idea of using S3 -- or in our case, Rackspace's Cloudfiles. Django-storages was recommended to me in IRC. I think I'm going to try to follow that route as long as I don't have to modify a third party app we're trying to use too heavily. On Fri,

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
Thanks Alex. Yeah, I actually did try to use that. Currently I'm using it for SFTP (and having some issues with the URLs provided by the SFTP plugin). The problem with the Cloudfiles implementation is that, according to what I've read and tried, the API it used is outdated. Rackspace has changed q

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
Django-cumulus is exactly what I was looking for. Unfortunately, I can't get it to work right with Django 1.3. Have you had any luck with that? On Tue, Sep 27, 2011 at 2:20 PM, Eric Hutchinson < eric.hutchin...@burgopakusa.com> wrote: > django cumulus does this with the directory hierarchy just f

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
Sorry for the late reply. This is perfect. Thanks! On Wed, Oct 5, 2011 at 2:01 PM, Dan Gentry wrote: > In the docs there a paragraph or two about this. Basically, one must > decorate the dispatch method instead. See this link for the details. > > > https://docs.djangoproject.com/en/dev/topics/

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
Thanks Fred! I tried to look through your code and understand what's going on -- but I'm still at a loss. I'm guessing I need to look at the Django source to see what should be returned when you hit a URL and what is passed. The wrapper is confusing me and I've seen that in Django code as well. I'm

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
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 for our front-facing pages so I'm not sure which path to choose. Maybe some R&D is in order :) Thanks! On Wed, Oct 19, 2011 at 5:5

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 as a time pi

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 those > choices. > > Now w

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

<    1   2   3   4   >