Re: auto_created getting ignored by makemigrations

2015-08-06 Thread Joey Espinosa
@zubair: The reason Django complained about wanting to create the LeaguePlayer intermediary model when you used "add()" is because you didn't have auto_created=True. That allows Django to link the objects correctly via the intermediary model automatically without populating any of the extra fields

auto_created getting ignored by makemigrations

2015-08-05 Thread Joey Espinosa
Dear Anyone, I'm having an issue with a ManyToMany "through" table not being recognized by the makemigrations command. Please consider the model definitions at the following pastebin: http://pastebin.ubuntu.com/12011412/ So, I have a Player model. Players are stored and updated in that model

Re: Per-Request Query-set Cache

2013-06-19 Thread Joey Espinosa
Look into johnny-cache. https://github.com/jmoiron/johnny-cache -- Joey "JoeLinux" Espinosa Python Developer http://about.me/joelinux On Jun 19, 2013 7:33 PM, "Kurtis" wrote: > I could have sworn I've already asked this question but didn't see it in > my search

Re: django , python and ides

2013-05-31 Thread Joey Espinosa
Sure thing :) I'll even give you the stuff that makes my prompt and all that: $HOME/.bashrc (partial): http://collabedit.com/bnxfx /bin/postactivate: http://collabedit.com/6bvfr $HOME/.screenrc-: http://collabedit.com/kuj8d Enjoy! -- Joey "JoeLinux" Espinosa* *

Re: Can't convert app to south due to django 1.5 custom User model.

2013-05-27 Thread Joey Espinosa
Do you have "profiles" in INSTALLED_APPS? -- Joey "JoeLinux" Espinosa* * On Mon, May 27, 2013 at 6:47 AM, Witold Greń wrote: > I have the same problem. > How to solve

Re: Django Celery w/ Amazon RDS and Memcached

2013-05-21 Thread Joey Espinosa
ot.com> <http://twitter.com/therealjoelinux><http://about.me/joelinux> On Tue, May 21, 2013 at 9:08 AM, Alex Strickland <s...@mweb.co.za> wrote: > On 2013/05/21 02:38 PM, Joey Espinosa wrote: > > Nevermind, everyone. Turned out to be simply my fault (had a shell >

Re: Django Celery w/ Amazon RDS and Memcached

2013-05-21 Thread Joey Espinosa
Nevermind, everyone. Turned out to be simply my fault (had a shell connection to the database open). *facepalm* -- Joey "JoeLinux" Espinosa* * <http://therealjoelinux.blogspot.com> <http://twitter.com/therealjoelinux><http://about.me/joelinux> On Tue, May 21, 20

Django Celery w/ Amazon RDS and Memcached

2013-05-21 Thread Joey Espinosa
Hey guys, I'm having an issue with running Celery on an EC2 instance, using the database transport (django://) and memcached as the cache backend. I have Celery running via Supervisor, and I can tail the log and see that it's successfully getting a specific task (for reloading the database).

Re: Reset Demo Database Data (with Dates)

2013-04-14 Thread Joey Espinosa
Well I'll be giving this a shot maybe this week. You might be getting some pull requests ;) -- Joey "JoeLinux" Espinosa Python Developer http://about.me/joelinux On Apr 14, 2013 8:09 AM, "Tom Evans" <tevans...@googlemail.com> wrote: > On Sun, Apr 14, 2

Re: Reset Demo Database Data (with Dates)

2013-04-14 Thread Joey Espinosa
ux><http://about.me/joelinux> On Sat, Apr 13, 2013 at 11:22 PM, Tom Evans <tevans...@googlemail.com>wrote: > On Sat, Apr 13, 2013 at 12:25 PM, Joey Espinosa > <jlouis.espin...@gmail.com> wrote: > > Thanks, Tom. I'm familiar with fixtures. My problem is that I don't kno

Re: Reset Demo Database Data (with Dates)

2013-04-13 Thread Joey Espinosa
py to distribute it on PyPi. Thanks again for the help guys. -- Joey Espinosa Python Developer http://about.me/joelinux On Apr 12, 2013 8:13 PM, "Tom Evans" <tevans...@googlemail.com> wrote: > On Fri, Apr 12, 2013 at 8:00 PM, Joey Espinosa > <jlouis.espin...@gmail.com

Re: Reset Demo Database Data (with Dates)

2013-04-12 Thread Joey Espinosa
Nick, Well, you're right, the interval would depend on how old the application is. I'd rather do this through the ORM so that I can check each field to see if it's the appropriate type (DateTimeField), since I don't know exactly which fields I'll be working on (I know, it's pretty ridiculous). I

Reset Demo Database Data (with Dates)

2013-04-12 Thread Joey Espinosa
Hey guys, I have a situation where I have test data that has been entered into a demo database (MySQL). During the demo of the app with a customer, data will be altered. After the demo is complete, I need to "reset" the demo data back to what it was before the demo. I realize I could do this

Re: Newbie using reverse() function

2013-04-11 Thread Joey Espinosa
ot;p" variable won't be available to your index view >> on a redirect, so I'm just working on the assumption that you just posted a >> small code snippet and you're actually doing something with it beforehand. >> >> -- >> Joey Espinosa >> Python Developer &g

Re: Newbie using reverse() function

2013-04-11 Thread Joey Espinosa
Keep in mind that your "p" variable won't be available to your index view on a redirect, so I'm just working on the assumption that you just posted a small code snippet and you're actually doing something with it beforehand. -- Joey Espinosa Python Developer http://about.me/joelinux

Re: Newbie using reverse() function

2013-04-11 Thread Joey Espinosa
view ;) -- Joey Espinosa Python Developer http://about.me/joelinux On Apr 11, 2013 7:31 PM, "Nick D" <dominguez.nicho...@gmail.com> wrote: > I'm trying to use the reverse() function to get back to my index, but I'm > not sure if my view are compatible. My index funtion

Re: WSGIPythonPath and

2013-04-11 Thread Joey Espinosa
-from-a-virtualenv-with-apache-mod-wsgi-on-windows Hope that helps. I've implemented this solution myself. -- Joey Espinosa Python Developer http://about.me/joelinux On Apr 11, 2013 5:20 PM, "Roberto López López" <roberto.lo...@uni.no> wrote: > > Hi Joey, > > All of them

Re: WSGIPythonPath and

2013-04-11 Thread Joey Espinosa
I meant Python libs/binary. -- Joey "JoeLinux" Espinosa Python Developer http://about.me/joelinux On Apr 11, 2013 5:00 PM, "Joey Espinosa" <jlouis.espin...@gmail.com> wrote: > Do all your sites share the same Python, or are they in different > virtualenvs? &

Re: WSGIPythonPath and

2013-04-11 Thread Joey Espinosa
Do all your sites share the same Python, or are they in different virtualenvs? -- Joey "JoeLinux" Espinosa Python Developer http://about.me/joelinux On Apr 11, 2013 3:39 PM, "Roberto López López" wrote: > > Hi everyone, > > We are trying to deploy a django application on

Re: Upgrade to django 1.5

2013-03-04 Thread Joey Espinosa
Also, if you haven't already, make sure your {% url %} template tags are properly quoted (unless they're variables). Django 1.5 no longer accepts named urls that are not quoted; they will be treated as variables if not quoted (and if they're not actually variables, then you'll get an error about

Re: Easiest Way to Deploy Django?

2013-02-22 Thread Joey Espinosa
Look through the Django documentation and take a shot for every place you see a note telling you that something has a specific quirk with MySQL. You'll be drunk in no time. I'm joking, but I'm really not. -- Joey "JoeLinux" Espinosa* *

Re: No django 1.0.4 file on PYPI

2013-02-20 Thread Joey Espinosa
put that link in there and pip will know to install it along with everything else. requirements.txt: https://www.djangoproject.com/download/1.0.4/tarball/ pip install -r requirements.txt Let me know if you run into any issues. -- Joey Espinosa Python Developer http://about.me/joelinux On Feb 20

Re: Django South- Push to repo or not?

2013-02-04 Thread Joey Espinosa
I've read two distinct points on the matter: 1) Don't push migrations to production. Instead, delete all migrations and run a single "--initial" migration, and push that to production. That way you keep production clean and free of the clutter from past schema mistakes and changes. 2) Push all

Re: Announcing new django project

2013-02-01 Thread Joey Espinosa
Looks pretty cool, and maybe this is just my naivety at work, but how does form validation work with this? -- Joey "JoeLinux" Espinosa* * On Fri, Feb 1, 2013 at 12:25 AM, h3

Re: Kindly help for an interview with Google on python django

2013-01-31 Thread Joey Espinosa
Google is HEAVY on Python... I have some experience working directly with Google engineers in their offices, and I can tell you the level of knowledge that they all have in their respective areas. It's significant, and they're going to want someone with a deep working knowledge of the technologies

Re: [ver 1.5] AbstractBaseUser not found?

2013-01-25 Thread Joey Espinosa
Scott, There is no django.db.models.AbstractBaseUser model. Try adding this to your import statements: from django.contrib.auth.models import AbstractBaseUser Hope that helps. -- Joey "JoeLinux" Espinosa* *

Re: Django 1.4 Why does the create project command create 2 identical folders

2012-06-27 Thread Joey Espinosa
They're actually both considered your project. One just holds everything, and the other has global settings. Here is the official explanation: https://docs.djangoproject.com/en/1.4/releases/1.4/#updated-default-project-layout-and-manage-py Relevant text: > *Django 1.4 ships with an updated

Re: Working Hello World Ajax example via django pleeeease

2012-04-13 Thread Joey Espinosa
Btw, disregard what I said about mixing URL and CSS selectors. I forgot that load() can do that (I usually use ajax() or get()/post(), neither of which supports that). MY BAD! -- Joey Espinosa Software Engineer http://about.me/joelinux On Apr 13, 2012 6:05 AM, "Joey Espinosa" <

Re: Working Hello World Ajax example via django pleeeease

2012-04-13 Thread Joey Espinosa
on getting AJAX to work in Django: http://joelinux117.blogspot.com/2011/11/making-ajax-calls-in-django-using-dojo.html It's using Dojo, but the same principle applies with jQuery (just make sure where the tutorial calls a URL, you're passing the URL as an argument to load(). -- Joey Espinosa

Re: Problem with Django tutorial

2012-04-04 Thread Joey Espinosa
The correct answer is that the default project layout has changed. See my previous email. Let me know if that works! -- Joey "JoeLinux" Espinosa* * On Wed, Apr 4, 2012 at 1:24 PM, maxim

Re: Problem with Django tutorial

2012-04-04 Thread Joey Espinosa
Which settings.py file are you modifying? I had this problem at first too when I didn't read about Django's changes from 1.3 to 1.4. Here's an excerpt from https://docs.djangoproject.com/en/1.4/releases/1.4/#updated-default-project-layout-and-manage-py : Django 1.4 ships with an updated default

Re: Problem with Django tutorial

2012-04-04 Thread Joey Espinosa
Are you using Django 1.4? -- Joey "JoeLinux" Espinosa* * On Wed, Apr 4, 2012 at 12:51 PM, maxim wrote: > I can't get the tutorial working for me. When I try to run the

Re: canceling account

2012-03-31 Thread Joey Espinosa
(and where) is it that you need removed, exactly? -- Joey Espinosa Software Engineer http://about.me/joelinux On Mar 31, 2012 9:44 AM, "Sergiy Khohlov" <skhoh...@gmail.com> wrote: > Hello, > What do you mean ? > Each django application has ability to add django superuser accou

Re: Homakov-esque Django Vulnerabilities

2012-03-06 Thread Joey Espinosa
gee <russ...@keith-magee.com > wrote: > > On 06/03/2012, at 8:31 PM, Joey Espinosa wrote: > > > In light of all the recent talk about Egor Homakov's commandeering of > GitHub by exploiting a default Rails setting, are there any such "gotcha" > securit

Re: Which IDE should I use for Django?

2011-12-20 Thread Joey Espinosa
Please start a new thread for your other problem. -- Joey "JoeLinux" Espinosa* * On Tue, Dec 20, 2011 at 1:57 AM, Rayner Pailus wrote: > Thanks Man... > > However, now I have

Re: MyISAM vs InnoDB; was Django 1.2.1 strange problem

2011-12-16 Thread Joey Espinosa
Right, thanks for the correction! -- Joey "JoeLinux" Espinosa Software Developer http://about.me/joelinux On Dec 16, 2011 9:15 AM, "Tom Evans" <tevans...@googlemail.com> wrote: > On Fri, Dec 16, 2011 at 1:44 PM, Joey Espinosa > <jlouis.espin...@gmail.com&

Re: MyISAM vs InnoDB; was Django 1.2.1 strange problem

2011-12-16 Thread Joey Espinosa
I think it's also worth noting that MyISAM doesn't support foreign keys, which would make the object relationships that Django creates impossible. -- Joey "JoeLinux" Espinosa Software Developer http://about.me/joelinux On Dec 16, 2011 8:40 AM, "Sells, Fred" wrote:

Re: Creating websites like Amazon/Ebay using Django

2011-12-16 Thread Joey Espinosa
Cata, Yes, Django is exactly suited for this scenario. The structure of Django allows you to create scalable, flexible sites with the freedom to expand the database as needed without having to worry about messing with the code so much in order to do so. That being said, I'd HIGHLY recommend you

Re: Pointing to Memcached on Remote Server

2011-12-02 Thread Joey Espinosa
Matt, Do you have the port open on the public-facing side of the remote IP? In other words, from another computer outside of that remote computer's network, can you run "nmap -p 11211 xx.xxx.xxx.xx"? (obviously you'd need nmap for this, but you get what I'm trying to imply) -- Joey "JoeLinux"

Re: Installation of Django

2011-11-24 Thread Joey Espinosa
If you install the "setuptools" package (http://goo.gl/UjFh), then all you have to do to install Django (or any other Python library) is this: easy_install django And it will handle the rest. Just a suggestion. -- Joey "JoeLinux" Espinosa Software Developer http://about.me/joelinux On Nov 24,

Re: Which Linux distro to use on EC2?

2011-11-14 Thread Joey Espinosa
> > On Ubuntu you'll never compile your own kernel. It won't be optimized > for your system. I beg to differ here. Compiling your own kernel isn't hard, and can be done on any distro. Before Xen and SMP support was built-in, it was actually pretty common to compile your own kernel, even on

Re: Which Linux distro to use on EC2?

2011-11-13 Thread Joey Espinosa
No, Gentoo is not a variant of Debian. I also don't think there are variants that are for "hardcore" users more than others. If you're "hardcore", then you should be able to do things like write your own kernel modules and perform low-level disk operations no matter the distro. I personally love

Re: Can you drop a Python script into a Django page?

2011-11-12 Thread Joey Espinosa
Jimmy, I don't know your specific situation, but this is probably not worth a fee. You already know Django and Python, all you need to do is extend that knowledge with some AJAX. If you run into problems, there's always this group ;) -- Joey "JoeLinux" Espinosa Software Developer

Re: Can you drop a Python script into a Django page?

2011-11-12 Thread Joey Espinosa
Jimmy, Not sure what JavaScript library you use (or if you're familiar with JavaScript at all), but this is a very rudimentary example: First, create a View in Django that you can call, and capture the results: import os > from django.http import HttpResponse > ... > def ajax(req): > if

Re: Can you drop a Python script into a Django page?

2011-11-12 Thread Joey Espinosa
Jimmy, Does it NEED to be embedded into the page? I ask because something like this would be a lot easier if you executed server-side, and simply returned the output to the front-end using AJAX. Would that serve your purpose here, or am I misunderstanding the original question? -- Joey

Re: render_to_response pointing to multiple templates

2011-11-07 Thread Joey Espinosa
Jay, How are you making the choice for a template? User interaction, specific runtime circumstance, random, etc? -- Joey "JoeLinux" Espinosa* * On Mon, Nov 7, 2011 at 12:04 PM, Tom Evans

Re: bar charts

2011-11-07 Thread Joey Espinosa
Kenneth, It's a Google API. Like other Google tools, you can connect using google.load() within JavaScript code. It wouldn't integrate directly with Django, but rather through your templates by using JavaScript. -- Joey "JoeLinux" Espinosa* *