2006/11/9, James Bennett <[EMAIL PROTECTED]>:
>
> On 11/8/06, benj <[EMAIL PROTECTED]> wrote:
> > Does anyone have experience translating django models into RDF graphs?
> > My ideal views would look something like this:
>
> Off the top of my head I don't know of anyone who's done this, but it
> wo
+1 for this type of solution.
Just there is no need for the intermediate table between the table
with untranslatable fields and the table with translatable ones,
because the relationship between these two tables is one to many. So
the table with translatable fields could just have a FK to the tab
I developed an e-shop web and I implemented unlimited language support
for all content. Every model realy holded only integer values and
values, that should't be translated. Fields like "title" and
"description" was virtual, they didn't exist in the table, but I was
able to call them like "Model.f
Aidas Bendoraitis wrote:
> MyModel.objects.by_language("EN").all()
> MyModel.objects.by_language("EN").order_by('title')
I think this would be greate.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users
Gacha,
In your suggestion there is no way to sort objects by
language-specific fields, except in the programming language level, is
there? And the other disadvantage is that value field is always of the
TEXT type whereas sometime it could be VARCHAR or CHAR, so you are
kind of wasting resources.
On 09-Nov-06, at 3:03 PM, Gacha wrote:
> Aidas Bendoraitis wrote:
>> MyModel.objects.by_language("EN").all()
>> MyModel.objects.by_language("EN").order_by('title')
>
> I think this would be greate.
sensational is the word ;-)
--
regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline
I agree to you about my version of this, but it was the best I could
figure out :) I readed your suggestion and I think it's very good and I
think it's very easy to implement in django system.
--~--~-~--~~~---~--~~
You received this message because you are subscr
Kenneth Gonsalves wrote:
> i took a look at this - it seems to imply that there is only one
> translateable field in the model (I may be wrong). But for me a
> typical page model would have several Char fields and more than one
> text field. How does one handle that? I was thinking having
Actuall
> > Aidas Bendoraitis wrote:
> >> MyModel.objects.by_language("EN").all()
> >> MyModel.objects.by_language("EN").order_by('title')
> >
> > I think this would be greate.
>
> sensational is the word ;-)
>
Now we just need to get one of the Django-savvy developers to
implement it, since I'm sure the
I get this on a page called, funnily enough, "amp"
Is it a bug?
TemplateSyntaxError: Caught an exception while rendering:
Original Traceback (most recent call last):
File "/users/home/tomsmith/domains/burningahole.co.uk/django/
django/template/__init__.py", line 706, in render_node
re
On 09-Nov-06, at 4:03 PM, Carlos Yoder wrote:
> And now I read what I wrote. Enough time *and* skills? That could
> be tricky ;-)
i have been meaning to hack on django for nearly a year and a half
now - maybe it's time to get my feet wet ;-)
--
regards
kg
http://lawgon.livejournal.com
h
On 8/13/06, John <[EMAIL PROTECTED]> wrote:
> edit_inline seems to be doing something funky when I use it through
> update_object generic view. I've got a model that looks something like
> this:
[...]
> At first glance it appears to be working -- the update_oject view for
> StationEvent lists its
Hi folks,
I've just started transporting an existing site to Django as a learning
exercise and some quick help would be appreciated.
I'm using some code from the cookbook to allow parent/child categories:
http://code.djangoproject.com/wiki/CookBookCategoryDataModelPostMagic
That's all dandy.
Sorry to reply to myself so quickly.
After a bit of refactoring my two views look like this:
def entries_by_category(request, slug):
category = get_object_or_404(Category, slug=slug)
entry_list_by_category = category.entry_set.order_by('-pub_date',
'title')
return render
I'm trying to get a very simple relationship to work but I can't figure
ou how to do this in Django.
This is what I want.
Poll ---<< question
Poll ---<< vote
A user can vote a poll just once. I check this using a function which
gets the remote ip.
This is the models.py snippet
class Poll(mode
On Nov 9, 4:28 am, "Aidas Bendoraitis" <[EMAIL PROTECTED]>
wrote:
> Actually this could be integrated into the core.
> When you create a model, you could add translatable=True to fields
> that have to be in the language-specific table.
> When you make selections, you would need to set the language
On 11/9/06, Tom Smith <[EMAIL PROTECTED]> wrote:
>
> I get this on a page called, funnily enough, "amp"
>
> Is it a bug?
Well... unless a MemoryError is the expected result... yes :-)
> return html.replace('&', '&').replace('<', '<').replace
> ('>', '>').replace('"', '"').replace("'", ''')
On 11/9/06, Phil Davis <[EMAIL PROTECTED]> wrote:
>
> On 8/13/06, John <[EMAIL PROTECTED]> wrote:
> > edit_inline seems to be doing something funky when I use it through
> > update_object generic view. I've got a model that looks something like
> > this:
> [...]
> > At first glance it appears to
On 11/9/06, Jamie Pittock <[EMAIL PROTECTED]> wrote:
> (r'^category/(?P[-\w]+)/(?P[-\w]+)',
> 'entries_by_child_category'),
How about:
(r'^category/(?P[-\w]+)(/(?P[-\w]+))?/$',
'entries_by_category'),
def entries_by_category(request, slug, childslug=None):
...
?
--~--~-~--~~
I think you can just use:
def entries_by_category(request, slug, childslug=None)
with your first urlpattern and then switch on childslug, i.e. if it's
set or not.
Also you're prob already looking at this but
http://www.djangoproject.com/documentation/url_dispatch/#named-groups
should help if
On 11/9/06, Jamie Pittock <[EMAIL PROTECTED]> wrote:
>
> I'm sure there must be a way of doing this with just the one view
> though.
There are multiple ways, depending on the exact result you want.
One way is to define a view with a default argument:
def entries_by_category(request, slug, child
great. I'm sure it's not perfect yet but I ended up with this:
def entries_by_category(request, slug, childslug=None):
if childslug is not None: slug = childslug
category = get_object_or_404(Category, slug=slug)
entry_list_by_category = category.entry_set.order_by('-pub_
On Nov 9, 8:17 am, "David Blewett" <[EMAIL PROTECTED]> wrote:
> Then you can add translations of field(s) by doing:
> a = ModelNeedingTranslation(1, 'nothing')
> a.translations.create(field='bar', translated_text='nada',
> language=Language('Spanish'))
>
> You can get the text for a specific trans
Sorry, I missed those last two replies as I was replying myself. I'll
take a look now and check I'm doing things right.
Many thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post t
On 11/9/06, Russell Keith-Magee <[EMAIL PROTECTED]> wrote:
>
> On 11/9/06, Phil Davis <[EMAIL PROTECTED]> wrote:
[...]
> > I have just tried a 'by-the-docs' generic view with simple 2 model
> > master/detail update form and get exactly the same problem or
> > duplicated detail rows after each save
As far as I know paginator works with a list that is created from an
object with
get_count() and get_list() methods.
If I already have a list, is it possible to use paginator with that
list somehow too?
Thank you for replies
La.
--~--~-~--~~~---~--~~
You re
> David Bleweet said:
>> Actually this could be integrated into the core.
>> When you create a model, you could add translatable=True to fields
>> that have to be in the language-specific table.
>> When you make selections, you would need to set the language name in
>> the following or a similar w
Only after implementation :) Keep in mind, that not only the database
API of Django has to be modified, but also the administration
interface, if we stuck at this solution.
By the way, I forgot to set language in the WHERE clause of my
example, but that makes no big difference for imagining what
whoa this sounds really as a cool idea
On 11/9/06, David Larlet <[EMAIL PROTECTED]> wrote:
>
> 2006/11/9, James Bennett <[EMAIL PROTECTED]>:
> >
> > On 11/8/06, benj <[EMAIL PROTECTED]> wrote:
> > > Does anyone have experience translating django models into RDF graphs?
> > > My ideal views woul
i like this ! :) very pythonic.
--~--~-~--~~~---~--~~
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
Hey, can you give some more info on the stack of this application ?
Is it client-server, standalone ? What advantages does it have over the
normal HTML approach ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"D
I'd kind of think that in Vote you don't need the poll FK, just the
choice since the choice then maps to a particular poll. Though the
Django admin won't do inline editing of FK relationships more than 2
deep.
Otherwise I think the effect your seeing makes sense. There is nothing
in these model
Rob Hudson schreef:
> I'd kind of think that in Vote you don't need the poll FK, just the
> choice since the choice then maps to a particular poll.
But how do I prevent a voter to vote more than once on a poll?
--~--~-~--~~~---~--~~
You received this message be
Hello, I have this model:
class operazione(models.Model):
descrizione = models.TextField()
data = models.DateField('giorno')
ore_uomo = models.FloatField(max_digits=2, decimal_places=1)
progetto = models.ForeignKey(progetto)
tipologia = models.ForeignKey(ti
I've changed the httpd.conf to read:
DocumentRoot /Users/kimvandenbroek/Sites/mysite
SetHandler mod_python
PythonHandler django.core.handlers.modpython
PythonPath sys.path+['/Users/kimvandenbroek/Sites']
SetEnv DJA
As far as I know paginator works with a list that is created from an
object with
get_count() and get_list() methods.
If I already have a list, is it possible to use paginator with that
list somehow too?
Thank you for replies
La.
--~--~-~--~~~---~--~~
You re
Exist a workflow engine for python as http://wf.netfx3.com/?
I don't need a User GUI because is for plug it into a web service I'm
working on django.
The workflow is pretty simple and work similare to:
Start
-- Get File
-- Run Process1
In parallel:
- Run Task1
- Run Task2
Hi there,
I've decided to drop my old 0.91 database and rebuild, rather than try
to upgrade it. So, in my dev environment I've dropped the database, but
now when I try to 'syncdb' I get the following validation error.
Error: Couldn't install apps, because there were errors in one or more
models:
Hi again,
Firstly i would turn PythonDebug On,
Here is a sample of what i use in a production enviroment
maybe this might help.
Cheers,
Sam
SetHandler mod_python
PythonHandler django.core.handlers.modpython
PythonPath "['/path/to/python/code'] + sys.path"
SetE
More on this:
If I change Accusation to:
class Accusation(models.Model):
game = models.ForeignKey(Game)
player = models.ForeignKey(Player, related_name='related_player')
accusedPlayer = models.ForeignKey(Player,
related_name='related_accusedPlayer')
isCommitted = models.BooleanFi
On 11/9/06, ZebZiggle <[EMAIL PROTECTED]> wrote:
> My question is ... why is Accusation any different tan Message,
> ReadMessage or any of the other tables that relate back to Player?
The problem was that Accusation has *two* fields which relate to
Player. When 'related_name' isn't set, that mean
On Nov 10, 2:59 am, "Pythoni" <[EMAIL PROTECTED]> wrote:
> As far as I know paginator works with a list that is created from an
> object with
> get_count() and get_list() methods.
> If I already have a list, is it possible to use paginator with that
> list somehow too?
>
> Thank you for rep
> Do I Have to use a custom manipulator?
>
> Thanks in advance.
> Picio
>
Sorry I want to say CUSTOM MANAGER
:(
Picio
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group,
Any reason that making models.py into a package seems to make the models
invisible to syncdb?
For example, with a project foo, I have a directory "models" that
contains "bar.py" and "__init__.py" __init__ contains "from bar import
*", but syncdb doesn't seem to see the models.
Thoughts?
Nathan
Ah ... of course.
Thanks James!
Keep up the great work!
-Sandy
--~--~-~--~~~---~--~~
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 unsubscr
Nevermind, I figured it out... I was forgetting the annoying
class MyModel(models.Model):
...
class Meta:
app_label = 'app_name'
Sigh...
On Thu, 2006-11-09 at 15:57 -0500, Nathan Yergler wrote:
> Any reason that making models.py into a package seems to make the models
> invisible
On 11/9/06, Nathan Yergler <[EMAIL PROTECTED]> wrote:
>class Meta:
> app_label = 'app_name'
Yeah, that's a huge wart that comes out of the way the metasystem
works right now. Anybody got ideas for something better?
--
"May the forces of evil become confused on the way to your house."
Hello,
Is Ita possible to override the list_filter behaviour?
Where It resides?
Pico
--~--~-~--~~~---~--~~
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@googlegrou
I just moved here, and am curious what the local Django scene's like.
--~--~-~--~~~---~--~~
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 unsu
I know there are several Django enthusiasts to your north in Boulder
and Longmont--we hosted a sprint last Saturday to try to finish Oracle
support for Django's database layer (almost there!). Undoubtedly there
are also Django folks in Denver proper. There are many pythoneers up
and down the Fro
Greetings!
Does anyone know if it's possible to assign tabindex values to forms in
a Generic View within the template? Since the INPUT fields are
automatically generated, I'm not sure this is possible without using
Javascript to set the tabindex after the forms have been created.
Have I answere
In the view you would need to check if the voter has already voted in
the poll. If the query is empty, then you can allow the person to vote,
if the query contains a record for a particular poll and a particular
voter, then you need to redirect them to an "You've already voted on
this poll" page.
hi
i have two sites running under apache-modpython:
foo.com/web/
bar.foo.com/web/
both live in separate svn repositories, but share a common history in
the sense that i exported from the first to create the second. As far
as i can see, i have removed all references to the first from the
se
Hello, my code is here:
http://paste.e-scribe.com/hold/2728/
Can anyone help me find the reason whay I can't make It work?
In particular no matter if I set a filter in the custom manager
'SoloCurrentUser'
It still show me all the rows in the Admin !
I've really tried everything and the python man
On 11/8/06 1:59 AM, Pythoni wrote:
> words.get_list(order_by=('Word'))
In Python, a single element tuple looks like ``("Word",)`` -- note the
trailing comma. Without it, you're doing this::
words.get_list(order_by="Word"))
And since strings are iterable, Django thinks you want to orde
I'm sure I've seen a discussion on this recently, but I can't find it
now... I've got users that are coming to the site and it's seeing them
as already logged in... as other users. One person even had the site
think they were me and given admin privileges.
Something must be wrong with request.use
On 11/9/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I'm sure I've seen a discussion on this recently, but I can't find it
> now... I've got users that are coming to the site and it's seeing them
> as already logged in... as other users. One person even had the site
> think they were me and
Jacob,
Thank you for your help. I used the comma and now it works .
La.
--~--~-~--~~~---~--~~
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 u
Thank you for your reply
Where can I download the patch?
I still use 0.91 Django version
--~--~-~--~~~---~--~~
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
59 matches
Mail list logo