Hello all!
How to control the escaping of translations in templates? For example,
{% trans "I & Co" %} should be escaped in html templates but not in
javascript (or other language) templates.
Aidas Bendoraitis aka Archatas
--~--~-~--~~~---~--~~
You
Hello,
Recently, we are solving a conceptual question of designing clean urls
for list and detail views of objects with slugs.
Let's say we have products with their slugs. In the naive way, the
list view could be accessed by
/products/
and the detail views could be accessed by
/products/
different models laying under each of them.
Regards,
Aidas Bendoraitis
--~--~-~--~~~---~--~~
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
e the AUTH_PROFILE_MODULE at
any time. And with the second one you could change the authentication
mechanism easier or allow records of people without Users. What do you
usually choose?
Kind regards,
Aidas Bendoraitis
--~--~-~--~~~---~--~~
You received this message because yo
Hello Trey!
You can iterate by the entries of a dictionary, using this:
{% for i in d.items %}
{{ i.0 }}: {{ i.1 }}
{% endfor %}
Regards,
Aidas Bendoraitis aka Archatas
On 6/7/07, Trey <[EMAIL PROTECTED]> wrote:
>
> Thanks Russ, I think my answer for today is three dimen
plate tag which would return a
complex array structure with manufacturers and corresponding
collections.
Regards,
Aidas Bendoraitis aka Archatas
On 6/7/07, Greg <[EMAIL PROTECTED]> wrote:
>
> I'm building a site where I'm going to have 10 manufacturers and each
> of t
or type()
On 6/7/07, Joseph Heck <[EMAIL PROTECTED]> wrote:
>
> .__class__
>
> On 6/7/07, Lic. José M. Rodriguez Bacallao <[EMAIL PROTECTED]> wrote:
> > how can I know insede a method the type of my class dynamicaly?
> >
> > --
> > Lic. José M. Rodriguez Bacallao
> > Cupet
> > >
> >
>
> >
>
--~
Actually, type is a function, not a method.
type(x) == x.__class__
Regards,
Aidas Bendoraitis aka Archatas
On 6/18/07, Joseph Heck <[EMAIL PROTECTED]> wrote:
>
> x = '123'
> x.__class__ will give a reasonable answer, x.type() doesn't. (Python 2.4)
>
>
as stable as you make it, as well as any other technologies.
Regards,
Aidas Bendoraitis aka Archatas
On 6/11/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I have been tinkering with Ajax today, based on this tutorial:
> http://www.b-list.org/weblog/2006/07/31/django-tips-simp
the world, but it works.
Regards,
Aidas Bendoraitis aka Archatas
On 6/23/07, Eric St-Jean <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Short form of my question: i have a custom view which does some work and
> then calls django.contrib.comments.views.comments.post_free_comment;
For the oldforms, it should be like this:
{%for field in form%}
{{ field.label }}
{{ field }}{%if field.formfield.is_required %}*{%endif%}
{%endfor%}
tag is deprecated. DO NOT use it. Use CSS.
Regards,
Aidas Bendoraitis aka Archatas
On 6/25/07, EL AATIFI Sidi
Use the {% with %} template tag for that:
{% with variable|some_filter as some_list %}
{% for el in some_list %}
{% do_something el %}
{% endfor %}
{% endwith %}
Regards,
Aidas Bendoraitis aka Archatas
On 6/25/07, Manuel Meyer <[EMAIL PROTECTED]> wrote:
>
> -BEGI
Use Django pre_delete and post_delete signals:
http://www.mercurytide.co.uk/whitepapers/django-signals/
or override the delete method:
def delete(self):
# do something
super(type(self), self).delete()
# do something
Regards,
Aidas Bendoraitis aka Archatas
On 7/3/07, Bryan <[EM
I think, the problem would be solved if you assigned a class
overriding list instead of a preformed list to the choices.
Check XFieldList for a living example:
http://www.djangosnippets.org/snippets/51/
Regards,
Aidas Bendoraitis aka Archatas
On 7/6/07, David Reynolds <[EMAIL PROTEC
I don't participate in the EuroPython this year, but have fun in the
capital of my native country :)
Regards,
Aidas Bendoraitis aka Archatas
(from Berlin, Germany)
On 7/8/07, Ville Säävuori <[EMAIL PROTECTED]> wrote:
>
> > Simon Willison is keynoting, and he is an origina
Set the environment variable PYTHONPATH to the parent directory of the mysite.
That should help you.
Regards,
Aidas Bendoraitis aka Archatas
On 7/9/07, jujian <[EMAIL PROTECTED]> wrote:
>
> HELP!
>
>
> >
>
--~--~-~--~~~---~--~
# ... assign the user to the instance if it has the created_by field ...
dispatcher.connect(attach_user_to_object, signal=signals.pre_save)
Regards,
Aidas Bendoraitis
On 7/11/07, Norjee <[EMAIL PROTECTED]> wrote:
>
> Use the events framework. I'm sure there is a pre-save e
Christopher,
In your case, I would create a custom view/form extending the
templates of admin and would set the url of that view to something
like r'^/admin/obj_list/$'.
Regards,
Aidas Bendoraitis [aka Archatas]
On 7/21/07, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
>
&
tribute, 0)
setattr(self, attribute, current_value + by_value)
self.save()
Good luck!
Aidas Bendoraitis [aka Archatas]
On 8/20/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
>
> On Mon, 2007-08-20 at 15:48 +0200, Stefan Matthias Aust wrote:
> [...]
> > I'd li
reader = csv.reader(line_list, delimiter=";", doublequote=True)
for value_list in reader:
function(value_list)
>>> read_excel_csv("/some/path/table.csv", test)
###
Good luck!
Aidas Bendoraitis aka Archatas
On 8/21/07, olivier <[EMAIL PROTECTED]>
quot;,
"django.core.context_processors.request",
"yourproject.yourapp.context_processors.general",
)
>From now on {{ root_dir }} and {{ media_url }} will be accessible in
all templates.
Good luck!
Aidas Bendoraitis [aka Archatas]
On 8/23/07, Filipe Correia <[EMAIL PROT
keys and values
Regards,
Aidas Bendoraitis aka Archatas
On 8/25/07, james_027 <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Anybody has an idea about this?
>
> Thanks
> james
>
> On Aug 24, 3:27 pm, james_027 <[EMAIL PROTECTED]> wrote:
> > hi,
> >
>
tices for reusing models?
Regards,
Aidas Bendoraitis [aka Archatas]
--~--~-~--~~~---~--~~
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
Your suggestions are welcome.
Aidas Bendoraitis [aka Archatas]
--~--~-~--~~~---~--~~
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
You can't order by a property of a model, but you can do that by the
field of the related model:
Film.objects.select_related().order_by('appname_product.name')
Documentation:
http://www.djangoproject.com/documentation/db_api/#order-by-fields
Regards,
Aidas Bendoraitis [aka Arch
What you need in my opinion is just one django project with multiple
settings files (for each domain).
Regards,
Aidas Bendoraitis [aka Archatas]
On 2/21/07, Sundial Services <[EMAIL PROTECTED]> wrote:
>
> I would like to find references to "best practices" regarding t
cts.filter(*flatpage_args, **flatpage_kwargs)
product_args = ... # OR'ed arguments
product_kwargs = ... # arguments to AND
products = Product.objects.filter(*product_args, **product_kwargs)
Regards,
Aidas Bendoraitis [aka Archatas]
On 2/22/07, Mary <[EMAIL PROTECTED]> wrote:
>
like FireBug for
Firefox (or at least use "view source").
Good luck!
Aidas Bendoraitis [aka Archatas]
On 2/24/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
>
> On Sat, 2007-02-24 at 13:13 +0530, Kenneth Gonsalves wrote:
> >
> > On 24-Feb-07, at 12:22 PM, oggie r
I think, overriding the admin template for specific application would
be the most straightforward solution:
* create a template in your template dir admin/yourapp/change_form.html
* show some field there only if request.user has some permissions.
Regards,
Aidas Bendoraitis [aka Archatas]
On 2
Have a look here:
http://code.djangoproject.com/wiki/DjangoResources#ExampleDjangoapplicationswithsourcecodetemplates
Regards,
Aidas Bendoraitis [aka Archatas]
On 2/28/07, Alessandro Ronchi <[EMAIL PROTECTED]> wrote:
>
> Is there any place where I can find django based apps?
>
parse the URL and and get appropriate
content according the subdomain.
Regards,
Aidas Bendoraitis [aka Archatas]
On 3/1/07, Doug Van Horn <[EMAIL PROTECTED]> wrote:
>
> On Feb 28, 6:33 pm, Michael Cuddy <[EMAIL PROTECTED]> wrote:
> >
> > Any ideas?
> > --
>
&g
ther under local domain
names (i.e. http://example.local/).
3. creating some middleware that removes directory name from the
requested URL before URL parsing.
What are the best practices for doing that? What do you do in similar
situations?
Regards,
Aidas Bendoraitis [ak
%}
{{ item }}
{% menu item %}
{% endfor %}
{% endif %}
Regards,
Aidas Bendoraitis [aka Archatas]
On 3/5/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
>
> On Mon, 2007-03-05 at 10:31 +0100, Jens Diemer wrote:
> > Chris Moffitt schrieb:
> > > I've implemented a s
Maybe this could help you:
http://www.djangosnippets.org/snippets/16/
Regards,
Aidas Bendoraitis [aka Archatas]
On 3/3/07, Patrick <[EMAIL PROTECTED]> wrote:
>
> Hi, I'd like to create a website log, similar to the log found in
> django.contrib.admin and was wondering i
ndfor %}
{% endfor %}
Regards,
Aidas Bendoraitis [aka Archatas]
On 3/5/07, Mike H <[EMAIL PROTECTED]> wrote:
>
>
> Hi all,
>
> I have a list of wiki pages, each one has a category.
>
> I want to output them in a list, grouped by category.
>
> So far I am looping thr
Can't help you much with this, but according to the docs
(http://www.djangoproject.com/documentation/authentication/#methods),
"is_authenticated() -- Always returns True" for User model and it
returns False for AnonymousUser model.
Regards,
Aidas Bendoraitis [aka Archat
modify the
contributed models and the code was read and executed when the user is
saved?
Regards,
Aidas Bendoraitis [aka Archatas]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to th
mind is: How to attach an attribute,
property or method to an existing Python class? Any examples or
directions?
Regards,
Aidas Bendoraitis [aka Archatas]
On 3/7/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
>
> On Wed, 2007-03-07 at 11:58 +0100, Aidas Bendoraitis wrote:
> &g
Either override templates for specific models or use javascript (js
property of the Admin class) to change the fields.
I think that it will be also possible to change the field type with
the newforms admin. Reference:
http://www.djangosnippets.org/snippets/35/
Good luck!
Aidas Bendoraitis [aka
= model.ForeignKey(Item)
itemlist = model.ForeignKey(ItemList)
You won't be able to use the default admin widget for Many to many
selection (at least without some template ant javascript hacking), but
you'll have what you want.
Regards,
Aidas Bendoraitis [aka Archatas]
On 3/9/07, akon
(maybe better) as an
extension suggestion for http://www.djangosnippets.org/snippets/98/
Regards,
Aidas Bendoraitis [aka Archatas]
On 3/12/07, Sam <[EMAIL PROTECTED]> wrote:
>
> I needed slugify to be more precise with accented characters and i
> couldn't find some code to
I'm not sure about IE7, but all the previous versions of IE certainly
didn't support hover for other html tags than . So it is
not Django issue at all. If you need some browser specific special
effects, use javascript for IE.
Regards,
Aidas Bendoraitis [aka Archatas]
On 3/14/07, Ou
Hello, Djangoers!
Is there a function for checking whether an app was installed in the
current project?
I have a custom index.html template for contributed administration and
I need to check whether to show some links or not.
Regards,
Aidas Bendoraitis [aka Archatas
. show links to administration lists ...
{% endif %}
But thanks, anyway.
Regards,
Aidas Bendoraitis [aka Archatas]
On 3/14/07, James Bennett <[EMAIL PROTECTED]> wrote:
>
> On 3/14/07, Aidas Bendoraitis <[EMAIL PROTECTED]> wrote:
> > Is there a function for checking whether
in that case I won't be able to merge the
branch back to the project, will I?
How do you solve problems like that, or how could I deal with it
instead of renaming the project?
Regards,
Aidas Bendoraitis [aka Archatas]
--~--~-~--~~~---~--~~
You received
-permission branch. They
are like one project at different statuses and at some point they'll
need to be merged (at least some parts of them). Both someproject and
someproject2 are self-contained projects. No other project uses any
part of them.
Regards,
Aidas Bendoraitis [aka Archatas]
On 3/
Two things, that might be the cause of your problem:
a) Have you restarted your browser or at least removed settings.pyc
after the changes?
b) If you use Mac OS and you close the window of your browser, the
browser itself isn't closed. Press Cmd+Q to close the browser
completely.
Regards,
"
SetEnv DJANGO_SETTINGS_MODULE someproject.settings
PythonDebug On
PythonAutoReload On
PythonInterpreter someproject2
I also symlink media directories respectively to someproject-media and
someproject2-media in Apache htdocs.
Anyway, thanks, Scott, for your help as well.
ether you're talking about models, views, middleware,
or something else from the flatpages. Anyway, it's enough to write
your own middleware to override the default control of the flatpages
(And fortunately it is not hard to do that).
Regards,
Aidas Bendoraitis [aka Archatas]
>
>
Check the request.META['REMOTE_ADDR'] in your custom request
middleware. If it equals to the one, you want to block, return an
error page.
Regards,
Aidas Bendoraitis [aka Archatas]
On 3/21/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Looking at my logs, I saw a g
Ashwoods, I did also some other business-related modifications so it
would take me some time to prepare that just for a snippet. That
middleware is not worth making it a snippet. I would better suggest
you to use the solution by Derek.
Regards,
Aidas Bendoraitis [aka Archatas]
On 3/21/07
Then instead of {{ object.whatever.whatever.property }}, you can use
{{ object.get_related_property }} and even if you do that multiple
times, the database is accessed only at the first time of accessing
the method.
Regards
Aidas Bendoraitis aka Archatas
On 3/22/07, akonsu <[EMAIL PROTECTED]> wrote:
>
> hello,
>
&g
;
You can access the custom method like this: user.get_profile().dosomething()
Regards,
Aidas Bendoraitis [aka Archatas]
On 3/22/07, Greg Donald <[EMAIL PROTECTED]> wrote:
>
> How/where can I add a method to the built-in User class?
>
>
> Thanks,
>
>
>
return None
My settings variables:
ROOT_DIR - either "/" or "/projectname/" depending on how my project
is accessed - under some domain directly or in some directory of
localhost.
SUBDOMAINS_SUPPORTED - Are subdomains supported on that server? True/False
SUBDOMAIN_MN
module a.py in the module b.py?
What would be the functions/statements to make it possible? Or in
general, how to access the locals of the importing ( not imported!!!)
module?
Regards,
Aidas Bendoraitis
--~--~-~--~~~---~--~~
You received this message because you are
se it with the
context of the current one, like include statement in PHP?
If there are no ways to do that, then I will just use some
workarounds. At first, I am interested about possibilities.
Regards,
Aidas Bendoraitis aka Archatas
On 3/30/07, Forest Bond <[EMAIL PROTECTED]> wrote:
> O
e is a blackbox to me
def get_the_x_of_the_module_which_is_importing_me():
return #???
Regards,
Aidas Bendoraitis [aka Archatas]
P.S. If I am not understandable because of "strange" English, it might
be that I need some coffee or sleep. :)
On 3/30/07, Rubic <[EMAIL PROTECTED]> wrote:
>
> b.py:
> -
It's not strongly related to some specific problem, but more to the
better python perception and self-training.
Thank you all for your time and attention. Thank you, Jerremy D, for
the interesting solutions.
Regards,
Aidas Bendoraitis [aka Archatas]
On 3/31/07, Forest Bond <[EMAIL P
You can have a pre_save signal for adding property
instance._is_new=True if the instance has no id. And then to delete
that property in the post_save signal after checking it.
Regards,
Aidas Bendoraitis [aka Archatas]
On 4/4/07, David Larlet <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
te some template tag which reorders items according some
conditions and override the change_list.html template for the page
model.
Regards,
Aidas Bendoraitis [aka Archatas]
On 4/4/07, James Turnbull <[EMAIL PROTECTED]> wrote:
>
> Thanks Atilla,
>
> > There was a simmilar ques
correcting myself:
a) Page.objects.order_by('menuitem__name') -->
Page.objects.select_related().order_by('menu_menuitem.name')
Regards,
Aidas Bendoraitis [aka Archatas]
On 4/4/07, Aidas Bendoraitis <[EMAIL PROTECTED]> wrote:
> As far as I know, current
e circumventing of the problem, that is, how could I get all the
categories for the Element instance?
By the way, I tried to import models both: using project name and not
using it. The results are the same.
I am using MySQL if it may matter.
Has anybody experienced the problem using the
I would have written a request_middleware instead of what you did. I
think, it would be cleaner.
Regards,
Aidas Bendoraitis [aka Archatas]
On 4/4/07, Enrico <[EMAIL PROTECTED]> wrote:
>
> Can't you just override the 'save' method of your model?
>
> Or may
where=['categoryapp_category.id=eec.category_id',
'eec.element_id=%d' % (self.id or 0)],
)
Now I can use
e.get_categories()
instead of
e.categories.all()
and get the related objects without errors.
Regards,
Aidas Bendoraitis [aka Archatas]
On 4/4/07, Aidas Bendoraitis <[EMAIL PRO
Set some EMAIL_HOST, EMAIL_HOST_USER, and EMAIL_HOST_PASSWORD in your
settings. That might help you.
Regards,
Aidas Bendoraitis aka Archatas
On 4/26/07, arv43 <[EMAIL PROTECTED]> wrote:
>
> hello,
> i get a 550, relay not permitted error when i try to use send_mail.
> th
Bryan,
If this happens when using django integrated dev server, then setting
ADMIN_MEDIA_PREFIX to something different than MEDIA_URL should help
you, for example: "admin-media". I consider this a bug of Django,
which perhaps appear only under some specific conditions.
Aidas Bendor
Maybe you are calling make-messages from the wrong directory, or
Russian is not in the LANGUAGES?
Regards,
Aidas Bendoraitis aka Archatas
On 5/8/07, Pashka R. <[EMAIL PROTECTED]> wrote:
> 2007/5/7, Konstantin Pavlovsky <[EMAIL PROTECTED]>:
> >
> > up!
> > nobod
to the record of the main item.
All the further details depend on your models and business requirements.
Regards,
Aidas Bendoraitis aka Archatas
On 5/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hello, everyone!
>
> I want to implement some sort of importing data int
This should help you to solve almost all your multilingual problems:
http://www.djangosnippets.org/snippets/51/
Regards,
Aidas Bendoraitis aka Archatas
On 5/15/07, Wolfram Kriesing <[EMAIL PROTECTED]> wrote:
>
> I have a bi-language (english and german) site. I try to hide the
>
except:
return None
register.filter('dict_value', dict_value)
... or you can go through the items like this:
{% for key_value in dictionary.items %}
{{ key_value.0 }}{# the key #}
{% for item in key_value.1 %}{# the value, that is the queryset #}
{{ item }}
{% endfor %}
The most secure way, in my opinion, is to keep the files in a
directory which is not accessible via the webserver and write a
wrapper view, which would return the static files if the user within
the current session has appropriate permissions.
Regards,
Aidas Bendoraitis aka Archatas
On 5/18
Is "django.core.context_processors.auth" set in your
TEMPLATE_CONTEXT_PROCESSORS? Are those new custom permissions in the
auth_permission table? If not - try to delete the test tables and
syncdb again.
Regards,
Aidas Bendoraitis aka Archatas
On 5/23/07, Michael Lake <[EMAIL PROT
some field which holds the number of dynamically created input
fields. Whenever a user submits the form, you check the number of
dynamically created fields and create a form with the number of those
dynamic fields.
Regards,
Aidas Bendoraitis [aka Archatas]
On 9/4/07, eriku777 <[EMAIL PROTECTED
Regards,
Aidas Bendoraitis [aka Archatas]
--~--~-~--~~~---~--~~
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 g
Or you can have a form with an for each language.
Regards,
Aidas Bendoraitis [aka Archatas]
On 9/24/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
>
> On Sun, 2007-09-23 at 18:13 +0100, Chris Hoeppner wrote:
> [...]
> > Seems pretty silly to me. I know that any request
ython IDE:
python manage.py shell
Good luck!
Aidas Bendoraitis [aka Archatas]
On 9/21/06, Gabriel Puliatti <[EMAIL PROTECTED]> wrote:
> Hey, I'm trying to write a manytomany into the database. I have created
> the form correctly, using {{ form.courses }}, and I can upload
> every
.
Good luck!
Aidas Bendoraitis [aka Archatas]
On 9/20/06, patrickk <[EMAIL PROTECTED]> wrote:
>
>
> Am 20.09.2006 um 21:40 schrieb Ivan Sagalaev:
>
> >
> > patrickk wrote:
> >> thanks. the data is sent now, but
> >> - how do I save
or or this
approach.
Good luck!
Aidas Bendoraitis [aka Archatas]
On 9/22/06, Michael Radziej <[EMAIL PROTECTED]> wrote:
>
> limodou schrieb:
> > No, I think you cann't do this in django. You should use custom
> > manipulator for this.
>
> Hmm, I thin
Why not to return a custom notice without any error codes?
If you still want to send a response error, I would choose from these
depending on the situation, what you are implementing:
204 No Content
400 Bad Request
403 Forbidden
Aidas Bendoraitis [aka Archatas]
On 9/22/06
following functions will be helpful for you:
ct = ContentType.objects.get_for_model(SomeModel)
my_record = ct.get_object_for_this_type (pk=object_id)
Good luck!
Aidas Bendoraitis [aka Archatas]
On 9/24/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I went through GenericRelatio
that data. But I
will only go to that direction if the way, I am asking about, fails.
Any hints?
regards,
Aidas Bendoraitis [aka Archatas]
[URL #1]
http://code.djangoproject.com/wiki/NewAdminChanges#Adminconvertedtoseparatetemplates
[URL #2]
http://www.b-list.org/weblog/2006/06/06/django
Anyway, you can find the location of your django project files with
the following (if this is what you really need):
import os
DIRNAME = os.path.dirname(__file__)
Good luck!
Aidas Bendoraitis [aka Archatas]
On 10/9/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
>
> On Sun, 2006
t its
comments into one comment list, then to sort that comment list in
Python level according the creation date, and lastly return only the
first ten comments to the response.
Good luck!
Aidas Bendoraitis [aka Archatas]
On 10/9/06, patrickk <[EMAIL PROTECTED]> wrote:
>
> some more detail
t "word", so you should write:
p = ProductWord.objects.filter(fk_word__value='haddock')
And yes, it is many-to-many relationship between Product and Word.
Regards,
Aidas Bendoraitis [aka Archatas]
--~--~-~--~~~---~--~~
You received this message b
known to the system), I'd like that the administrator would see only
the parent categories of the chosen vocabulary in the select list.
Regards,
Aidas Bendoraitis [aka Archatas]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to t
By default, all fields are obligatory. You have to set
categories = models.ManyToManyField('self', blank=True)
to escape from that problem.
Good luck!
Aidas Bendoraitis [aka Archatas]
On 10/18/06, Lutz Steinborn <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I&
I think, you should post this email to django-developers instead of
django-users... Or perhaps to post a new ticket at
http://code.djangoproject.com/newticket
Regards,
Aidas Bendoraitis [aka Archatas]
On 10/18/06, Rafael SDM Sierra <[EMAIL PROTECTED]> wrote:
> Lo
edit B as inline for A and select C's there from a drop-down list.
I hope all I've written is understandable. Now you can try creating models and set different settings and see the pros and cons yourself.Good luck!Aidas Bendoraitis [aka Archatas]
On 10/20/06, MerMer <[EMAIL PROTECTED]&
You have to define table B as a model and to set it a class Admin. It is impossible to edit the intermediate table, created from standard ManyToManyField, as a separate model in Django.To sum up, you must have all tables A, B, and C, defined as different models.
Good luck!Aidas Bendoraitis [aka
, whether the object is
newly created or edited.
(By the way, I am using per object permission branch)
Regards,
Aidas Bendoraitis [aka Archatas]
[URL #1]
http://groups.google.de/group/django-users/browse_frm/thread/6a3686f48d2c70fa
--~--~-~--~~~---~--~~
You received
There is a function get_verbose_name in the file
django/db/models/options.py, which does the conversion.
If you need just to change the verbose_name, don't forget that there
are meta attributes verbose_name and verbose_name_plural for that
reason.
Good luck!
Aidas Bendoraitis [aka Arc
I have recently had the same problem, but I solved it adding null=True
to the DateTimeField.
Good luck!
Aidas Bendoraitis aka Archatas
On 10/30/06, Merric Mercer <[EMAIL PROTECTED]> wrote:
>
> I'm am having a problem with the DateTimeField when I save the data
> throu
It is possible, that the clock on the server is set differently than
the clock on your local machine. Have you checked that?
Good luck!
Aidas Bendoraitis aka Archatas
On 10/26/06, 张沈鹏 <[EMAIL PROTECTED]> wrote:
>
> I set
>
> TIME_ZONE = 'CCT'
> (in China)
>
Maybe your captcha template tag is not loaded? Did you put it in the
right place?
Regards,
Aidas Bendoraitis aka Archatas
On 10/31/06, Grigory Fateyev <[EMAIL PROTECTED]> wrote:
>
> Hello Grigory Fateyev!
> On Mon, 30 Oct 2006 21:30:01 +0300 you wrote:
>
> > Why it c
ly include different custom template tag instead of {%
result_list cl %} in change_list.html
As you see, the contributed administration is not flexible enough, but
some creativity can solve many problems.
Good luck!
Aidas Bendoraitis [aka Archatas]
On 11/1/06, iain duncan <[EMAIL PROTECTED]> w
Some time ago, I also wrote a few thoughts about implementation of
multilingual content:
http://groups.google.com/group/django-users/browse_frm/thread/13ae7f762d1d5d5e
Maybe that will help us to make the final decision.
Aidas Bendoraitis [aka Archatas]
On 11/8/06, Gonzalo Saavedra <[EM
I think, you could use the addslashes template tag to escape new lines, like:
{{ form.embeddedvideo.0.type|addslashes }}
And if that doesn't work as expected, in your case, I would write my
own template tag for escaping strings.
Good luck!
Aidas Bendoraitis [aka Archatas]
On 11/8/06,
ubgroup.objects.get(subGroupName="p1sub1")
e.save()
m = User(name="xxx")
m.save()
e.user_set.add(m)
Good luck!
Aidas Bendoraitis [aka Archatas]
On 11/8/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I know this maybe very simple, but I can't fi
By the way, if you are still learning Django, I would suggest you to
upgrade to 0.95, because it has many API improvements and because at
some point old versions won't be supported (this is my guess :) ).
Good luck!
Aidas Bendoraitis [aka Archatas]
On 11/8/06, Mike <[EMAIL PROTECTED
data which makes the models harder to manage.
Regards,
Aidas Bendoraitis [aka Archatas]
On 11/8/06, fdb <[EMAIL PROTECTED]> wrote:
>
> I'd like to show you my approach, which I use for one of my clients.
>
> For every model that needs to have multi-lingual content, you a
1 - 100 of 167 matches
Mail list logo