Re: Starting a new Python blog

2012-01-30 Thread wC
Agree with Katie.
Also make bookmarks open in a new tab.

Nice anyway
Gr

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django/Data Base Advice

2012-01-03 Thread wC
Chris,

I think was somehow in the same stage not so long ago... Here is how I went 
about it:

1. I watched a db-class video from time to time (teaches you what joins are 
etcetera). Using the ORM without db knowledge is ok if efficiency is not 
your main concern. Sooner or later you have to make database design choices 
and only relying on the community is going to slow you down. Good advice is 
expensive (time or effort).
2. Having read the docs on djangoproject.com (which are huge), I read 
djangobook.com, then I started building my own apps following some of the 
tutorials from https://code.djangoproject.com/wiki/Tutorials. I made myself 
a todo-app, for instance. There are about three or four tutorials for that 
and each of them adds some knowledge (the nettuts one is for true 
beginners). If you work on you app a bit you'll gain knowledge in testing, 
migrating, implementing design and much more. I always asked myself 'does 
my program solve a problem'. If it does not, you will get lost pretty 
quickly.
3. ?

Not sure what the next step would be? Deploy a small website? Use third 
party OS code? Any suggestions?

Cheers
wC

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/GBXHWYTcLqwJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Using ForeignKey with dJango and PyAMF

2010-02-10 Thread WC
According to this bug report, select_related is supposed to return the
data, but it doesn't.  Also, if I can't get the foreign key, is there
a way around this?  All I really need is the id of the foreignKey
object.  Any help would be much appreciated.  I am a newbie to this
architecture.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Using ForeignKey with dJango and PyAMF

2010-02-08 Thread WC
By the way, all I really need is the parentBlock_id.

On Feb 8, 11:54 am, WC <l...@stump.com> wrote:
> Hi Everyone,
>
> I have a ForeignKey field that is always null on the Flex client.  I
> have tried using select_related(), but it's still null.  Any idea what
> I am doing wrong?  In the following sample code, parentBlock is always
> null on the Flex client:
>
> File: BlockVO.py
> from django.db import models
>
> class Block(models.Model):
>     blockName = models.CharField(max_length=200)
>     blockLabel = models.CharField(max_length=200)
>     blockColor = models.PositiveIntegerField()
>     xBlockPos = models.IntegerField()
>     yBlockPos = models.IntegerField()
>     parentConnectionType = models.CharField(max_length=200,
> blank=True, null=True)
>     parentBlock = models.ForeignKey('self', blank=True, null=True)
>     def __unicode__(self):
>         return self.blockLabel
>
> File gateway.py
> # To get all Blocks
> def getBlocks():
>     return Block.objects.all().select_related()
>
> File page.as
>        private function onResult_blocks(data:Object):void {
>                 var answer : Array = ArrayUtil.toArray(data);
>                 trace("Server returned " + answer.length.toString() + "
> block(s)");
>                         for each (var item:BlockVO in answer) {
>                                 if(null == item.parentBlock) {
>                                         trace("for bloc id=" + item.id + 
> "parentBlock is null");
>                                 } else {
>                                         trace("for bloc id=" + item.id + 
> "parentBlock_id=" +
> item.parentBlock.id);
>                                 }
>                         var newBlock : Block = new Block(workspace, false,
> item.blockLabel, 0x66FF66, BlockSpec.REPORTER, null, item);
>                                 blocks.push(newBlock);
>                                 addChild(newBlock);
>                         }
>         }

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Using ForeignKey with dJango and PyAMF

2010-02-08 Thread WC
Hi Everyone,

I have a ForeignKey field that is always null on the Flex client.  I
have tried using select_related(), but it's still null.  Any idea what
I am doing wrong?  In the following sample code, parentBlock is always
null on the Flex client:

File: BlockVO.py
from django.db import models

class Block(models.Model):
blockName = models.CharField(max_length=200)
blockLabel = models.CharField(max_length=200)
blockColor = models.PositiveIntegerField()
xBlockPos = models.IntegerField()
yBlockPos = models.IntegerField()
parentConnectionType = models.CharField(max_length=200,
blank=True, null=True)
parentBlock = models.ForeignKey('self', blank=True, null=True)
def __unicode__(self):
return self.blockLabel

File gateway.py
# To get all Blocks
def getBlocks():
return Block.objects.all().select_related()

File page.as
   private function onResult_blocks(data:Object):void {
var answer : Array = ArrayUtil.toArray(data);
trace("Server returned " + answer.length.toString() + "
block(s)");
for each (var item:BlockVO in answer) {
if(null == item.parentBlock) {
trace("for bloc id=" + item.id + 
"parentBlock is null");
} else {
trace("for bloc id=" + item.id + 
"parentBlock_id=" +
item.parentBlock.id);
}
var newBlock : Block = new Block(workspace, false,
item.blockLabel, 0x66FF66, BlockSpec.REPORTER, null, item);
blocks.push(newBlock);
addChild(newBlock);
}
}

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.