Thank you, got it working
On 21 July, 16:55, Daniel Roseman wrote:
> On Jul 21, 4:25 pm, AKK wrote:
>
>
>
> > Thanks, i tried this:
>
> > blog_posts = Post.objects.filter(post_slug=slug)
> > blog_comments = blog_posts.comment_set.all()
>
> > but i got this error and i don't know why:
>
> > Trac
On Jul 21, 4:25 pm, AKK wrote:
> Thanks, i tried this:
>
> blog_posts = Post.objects.filter(post_slug=slug)
> blog_comments = blog_posts.comment_set.all()
>
> but i got this error and i don't know why:
>
> Traceback:
> File "C:\ProgLangs\Python25\lib\site-packages\django\core\handlers
> \base.py"
Thanks, i tried this:
blog_posts = Post.objects.filter(post_slug=slug)
blog_comments = blog_posts.comment_set.all()
but i got this error and i don't know why:
Traceback:
File "C:\ProgLangs\Python25\lib\site-packages\django\core\handlers
\base.py" in get_response
86. response =
On Mon, Jul 20, 2009 at 23:24, AKK wrote:
>
> Hello, i currently have two classes in my model:
>
> class Post(models.Model):
>prepopulated_fields = {"post_slug": ("post_title",)}
>
>post_title = models.CharField(max_length=750)
>post_slug = models.SlugField()
>
Do i need to have a one to many or many to many field for this to
work?
Thanks
Andrew
On 20 July, 22:24, AKK wrote:
> Hello, i currently have two classes in my model:
>
> class Post(models.Model):
> prepopulated_fields = {"post_slug": ("post_title",)}
>
> post_title = models.CharField(
> Hi,
>
> google for raw_id_fields
>
>
That was faster !!
Thank you very much
Leonel
--~--~-~--~~~---~--~~
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@googl
Hi,
google for raw_id_fields
Leonel Nunez schrieb:
> Hello :
>
> I have this model :
>
> class Rel(models.Model):
> n = models.ForeignKey(MASTER)
> r = models.ForeignKey(MASTER,null=True,related_name='child_set',
> blank=True)
>
>
> But in the admin gets too slow since this mod
On Fri, Nov 23, Andrew McMurry wrote:
>
> I have models something like this:
>
> class Attribute (Model):
> name = CharField(maxlength=32)
> private = BooleanField(default=False)
>
> class Object (Model):
> ...
> attr = ForeignKey(Attribute, null=True, blank=True)
>
>
On 8/30/07, Graham Carlyle <[EMAIL PROTECTED]> wrote:
>
> I haven't found a lot of information on how people typically do schema
> migrations for Django after reading the docs/scanning the wiki/googling.
> However the manual route seems to be a preferred option...
At the moment, yes. The purpose
On Thu, 2007-08-30 at 07:27 +0800, Russell Keith-Magee wrote:
> 1) If you have a non-trivial amount of data in your production
> database, the space and time required to deserialize, store and
> reserialize the contents of the databse could be problematic.
Fortunately I have a small amount of dat
On 8/29/07, Graham Carlyle <[EMAIL PROTECTED]> wrote:
>
> I was hoping something similar would be tenable for the production phase
> as well... just dumping the data and then re-loading after recreating
> the database, with some possible data munging if the schema has changed
> in an incompatible
On Wed, 2007-08-29 at 21:12 +0800, Russell Keith-Magee wrote:
> There are 2 options for workarounds:
> 1) use SQL ALTER statements rather than resetting the table. This
> requires writing manual SQL statements to modify the existing tables
> 2) Drop the entire database and start again from scratch
On 8/29/07, Graham Carlyle <[EMAIL PROTECTED]> wrote:
>
> So should models in different application's never have foreign key
> dependencies and so i should bring them back to one application? or does
> anyone know if there is another way around this problem?
Models can and should have foreign key
On Thursday 15 June 2006 19:12, Luke Plant wrote:
> This is because your models are in different apps. I can't remember
> off-hand what the correct syntax is
of course, the way to find out is to use the /admin/doc/ view, or
examine the object with 'dir' in a python interactive shell, or the t
On Wednesday 14 June 2006 12:20, Viktor wrote:
> I have two applications in my project:
>
...
> But when in my views I try to do:
>
> c1 = Cls1.objects.get(pk=1)
> clss = c1.cls2_set.all()
>
> I get:
>
> 'Cls1' object has no attribute 'cls2_set'
This is because your models are in different apps.
Jorge,thanks for your answer. That's what I'm doing now. Unfortunately, I don't have time to dive deeper into CustomManipulators but maybe for the next project.Best regardschris
On 5/26/06, Jorge Gajon <[EMAIL PROTECTED]> wrote:
Hi,I also found that behavior and what I did was to copynew_data['stat
Hi,
I also found that behavior and what I did was to copy
new_data['station'] to new_data['station_id'] when there were errors
from "get_validation_errors()". Like this:
def change_recording(request, recording_id):
snip.
if request.POST:
new_data = request.POST.copy()
" this can cause *huge* performance problems"
True, but I believe that's why we usualy set up 2 databases one
transactinal, where we stay put on to much normalization, relatinships,
indexes etc., and query oriented databases where this performance may
no matter that much since all the database
On 8/2/05, gheorghe <[EMAIL PROTECTED]> wrote:
>
> Another scenario not uncomon where integer ID are not the best is when
> 2 tables from 2 location need to be merged into one table (ex. collect
> data from 2 stores and maintain it centraly somewhere).
>
> There are many cases where people are w
Another scenario not uncomon where integer ID are not the best is when
2 tables from 2 location need to be merged into one table (ex. collect
data from 2 stores and maintain it centraly somewhere).
There are many cases where people are working closely to the database
like datawarehosing or if the
20 matches
Mail list logo