Re: DB based translations?

2011-08-21 Thread rebus_
On 21 August 2011 04:41, Joshua Russo wrote: > Ok, I've been looking into the different database based translation > solutions out there and I can't find what I really had in mind. I need to > have non-technical people easily update the translations. So I wanted a >

Re: Linking to Django Admin from 1.3

2011-07-14 Thread rebus_
On 14 July 2011 16:35, eric.frederich wrote: > Hello, > > I am moving from 1.0.2 to 1.3 and am having problems linking to the > admin site from within a template. > I used to have this in my template... > >    Django Admin > > And I used to have this in my urls.py > >    

Re: Initial save()

2011-03-12 Thread rebus_
On 13 March 2011 00:40, Julian Hodgson wrote: > I need to set up some default values on a ManyToMany field only when a model > is first created. > > How can I find out in the save() override if the object is being created for > the first time? > > Do I check the

Re: Admin without template (no colors, no css, just simple html)

2010-10-26 Thread rebus_
On 26 October 2010 06:48, marcoarreguin wrote: > I'm starting with Django and I have a bluehost, yesterday I have been > installing all the stuff, I found a tutorial about how to install > django in bluehost, so I'm using fcgi. > > My problem is that when I uncomment the

Re: where is the link of password reset page on djangoproject.com ?

2010-08-09 Thread rebus_
On 9 August 2010 14:30, nyambaa wrote: > Hello guys, > please help, I've not found the password reset page on > djangoproject.com > where is it? > > thanks > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post

Re: Help with Filters

2010-05-02 Thread rebus_
On 3 May 2010 00:46, rebus_ <r.dav...@gmail.com> wrote: > On 3 May 2010 00:34, Magal, Ganesh <ganeshma...@gmail.com> wrote: >> I have created a filter which wikifies (i.e.  input text of the form >> HelloWorld to an output with rendered font like say - HelloWorld ). Th

Re: Help with Filters

2010-05-02 Thread rebus_
On 3 May 2010 00:34, Magal, Ganesh wrote: > I have created a filter which wikifies (i.e.  input text of the form > HelloWorld to an output with rendered font like say - HelloWorld ). The > problem is that when I apply the filter, it is not getting rendered. Below > is the 

Re: ORM Query question

2010-04-12 Thread rebus_
On 13 April 2010 01:09, zweb wrote: > how do i do this kind of condition in django orm filter: > > ( 1 < a < 5)  or ( 20 < b < 70) > > select * from table where (a between 1 and 5) or (b between 20 and 70) > > -- > You received this message because you are subscribed to

Re: View on site

2010-03-12 Thread rebus_
On 12 March 2010 01:04, Robert wrote: > There is a "View on site" link when you edit a user in admin. > > The link calls the url user/user_name but you have to make the url- > view configuration yourself apparently. > > I wonder if there is a "built-in" way to do this. I looked

Re: circular import in two models.py

2010-03-10 Thread rebus_
On 10 March 2010 11:31, Viktor wrote: > Hi, > > I have two django applications, an issue tracker where an Issue is > related to a Partner > and a Partner model where partners can be grouped, etc > I would like to add an issue to every group to provide an easy > messaging

Re: making query using filter()

2010-03-10 Thread rebus_
On 10 March 2010 12:06, jimgardener wrote: > Hi > I need to make a query as follows > Select all entries where categories=mycategory > > In the db there are entries and categories as follows > Category.objects.all() -->[ , hiscategory>,] > > MyEntry.objects.all() --> [ ,

Re: Secret key

2010-03-09 Thread rebus_
On 9 March 2010 15:16, Joan Miller wrote: > For what is used the key `SECRET_KEY`? > > -- > 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

Re: more than 1 foreign key

2010-03-09 Thread rebus_
On 9 March 2010 13:30, knight wrote: > I have the following models: http://slexy.org/view/s20T8yOiKZ. > When I try to click add button for worlds in admin page it shows me > the following error: > has more than 1 ForeignKey > to . > I think it's something to do with inline.

Re: Does anybody meet this strange Error

2010-03-09 Thread rebus_
On 9 March 2010 15:22, Forrest Liu wrote: > Hi, > I am struck with this strange error message: > AttributeError at /products/ > > 'function' object has no attribute 'objects' > > Request Method:GET > Request URL:http://127.0.0.1:8000/products/ > Exception

Re: How to use pre-built HTML forms in Django

2010-03-09 Thread rebus_
n't need to use re-usable templates because I just want to design > a one simple form so there's only one HTML file.Do you think that is > it ok to just ignore the Django's template system and get along with > the normal way. > > On Mar 9, 2:32 pm, rebus_ <r.dav...@gmail.com> w

Re: Register multiple models to show in admin page

2010-03-09 Thread rebus_
On 9 March 2010 10:31, andrew_scfc wrote: > Hi, > > I'm new to using Django and have come across some redundancy in my > implementation that I would like to irradicate. > > I have defined several models in the models.py file as normal. I would > like to register all of my

Re: How to use pre-built HTML forms in Django

2010-03-09 Thread rebus_
On 9 March 2010 05:54, MMRUser <oshadha.ro...@gmail.com> wrote: > Thanks another doubt,what about the css mappings class="field text > medium" do they also need to include in the class definition in > Django. > > On Mar 9, 9:21 am, rebus_ <r.dav...@gmail.co

Re: How to use pre-built HTML forms in Django

2010-03-08 Thread rebus_
On 9 March 2010 05:04, MMRUser wrote: > I have an pre-built HTML form (means I design the HTML form > separately) and I need to reuse it with Django form class > (django.forms), So how do I incorporate my HTML form with Django form > class. for example > > HTML: > > >  

Re: join channel #django

2010-03-08 Thread rebus_
On 9 March 2010 05:02, sajuptpm wrote: > I cant join #django, > > [09:20] [Channel] Cannot join channel (+r) - you need to be identified > with services > > What is the problem?. How join this channel?. What are the other > popular django channels?. > > Please help me. > > --

Re: shortest way to recover from a QuerySet "object not found"

2010-03-04 Thread rebus_
On 4 March 2010 18:02, Phlip wrote: > Djangoids: > > Consider this line: > >   foo = Foo.object.get(name='bar') > > If foo is not found, I want it to contain a NullObject, such as an > empty Foo(). In the parlance, that could be like this: > >   foo =

Re: reverse in settings.py, is it possible?

2010-03-03 Thread rebus_
On 3 March 2010 12:33, Aljosa Mohorovic wrote: > i would like to set LOGIN_URL = reverse('custom_url_name') so i'm > wondering if something like that is possible? > i've tried with reverse but it fails. any ideas? > > Aljosa Mohorovic > > -- > You received this message

Re: Handling input of external urls

2010-02-27 Thread rebus_
On 27 February 2010 02:17, russianbandit wrote: > Sorry for being sort of a newb when it comes to regex. But what > exactly does that line do? > > On Feb 26, 3:59 pm, "ge...@aquarianhouse.com" > wrote: >> Check it with regex? >> >>

Re: convert mysql database to django model

2010-02-27 Thread rebus_
On 27 February 2010 11:46, Sven Richter wrote: > Hi everybody, > > i am wondering if there is a tool which converts existing mysql > databases with table structure into a django model? > > > Greetings > Sven Richter > > -- > You received this message because you are

Re: Custom button for imagefield form

2010-02-25 Thread rebus_
On 22 February 2010 14:06, CrabbyPete wrote: > I have form with where users can upload an image. All works well but I > want a graphic instead of the default browse button that shows up. Can > I change it and if so how do you change it in the form field or > template? > > >

Re: transaction in django app desktop

2010-02-25 Thread rebus_
On 24 February 2010 20:51, ktemo wrote: > hi > i working in a desktop app with django mysql,  and wxpython, and i > need to make transaction >  i read the doc online, but i dont know if is possible work with a > desktop app > > -- > You received this message because you are

Re: How to make the login forms available to the entire site?

2010-02-21 Thread rebus_
On 21 February 2010 19:38, Timothy Kinney wrote: > There may be a more elegant way, but I think you could just call the login > view from whatever view the url directs the user too. So it fills in the > login info and then renders the rest of the page...but on second

Re: photos

2010-02-20 Thread rebus_
2010/2/21 : > Photos > > bisou > Ariel > > > > -- > Infomed - Red de Salud de Cuba > http://www.sld.cu/ > > > -- > > Este mensaje le ha llegado mediante el servicio de correo electronico que > ofrece Infomed para respaldar el cumplimiento de

Re: Change display of (None) in admin change lists?

2010-02-18 Thread rebus_
On 18 February 2010 15:12, Derek wrote: > Is there a way to alter the display of fields in the Django Admin change > lists so that they do not show (None) - for text - or None - for numeric. > > I'd prefer to use " " or "-" for display of items instead. > > Thanks > Derek > >

Re: User permissions to see a view

2010-02-18 Thread rebus_
On 18 February 2010 14:02, Alexey Kostyuk wrote: > Hi ALJ! > > Why can not you add a model 'reports' (in your example) and add the > required permissions? > Also you can add custom permissions[1] to any other models of your app > and use them. > >

Re: User permissions to see a view

2010-02-18 Thread rebus_
On 18 February 2010 13:29, ALJ wrote: > Hi Alexey, > > But how do you set a permission for a view? There's no underlying > model to which to add the custom meta permissions. > > ALJ > > On Feb 18, 12:48 pm, Alexey Kostyuk wrote: >> On Thu,

Re: any suggestions for managing DB schema with visual ERD tool?

2010-02-18 Thread rebus_
On 18 February 2010 01:03, snfctech wrote: > I just built a complicated schema with MySQL workbench and am looking > at Python frameworks to start implementation. > > Does anybody in the Django community do this?  What's your practice > for going back and forth between

Re: Union of two querysets?

2010-02-15 Thread rebus_
On 16 February 2010 03:28, ydjango wrote: > I have two query sets with two different where clauses on same table > and same columns in select. Is it possible to have their union. > > I tried qryset = qryset1 + qryset2 >  It gave me - "+ unsupported operand" > > -- > You

Re: Noob question: Templates: How to count for loop?

2010-02-15 Thread rebus_
On 16 February 2010 02:58, mhulse wrote: >> Hrmm, forloop.counter. It is one of those days. :P > > But, how can I tell if it is every third item? > > Also, is there a way to check if the current number is even? > > In a PHP template, I might do this: > > ... forloop ... > >

Re: Noob question: Templates: How to count for loop?

2010-02-15 Thread rebus_
On 16 February 2010 02:58, mhulse wrote: >> Hrmm, forloop.counter. It is one of those days. :P > > But, how can I tell if it is every third item? > > Also, is there a way to check if the current number is even? > > In a PHP template, I might do this: > > ... forloop ... > >

Re: Noob question: Templates: How to count for loop?

2010-02-15 Thread rebus_
On 16 February 2010 02:52, mhulse wrote: >> Is this possible? I am sure it is... Any tips ya'll could send my way >> would be spectacular! > > Hrmm, forloop.counter. It is one of those days. :P > > -- > You received this message because you are subscribed to the Google Groups

Re: admin template object context

2010-02-15 Thread rebus_
On 15 February 2010 20:11, jb wrote: > im editing admin/change_form.html for one of my models and i need to > access the context of the object being edited, eg. admin/hotel/ > change_form.html and in the template i need to call > {{ actual_hotel.its_value }} > > -- > You

Re: Django IDE

2010-02-15 Thread rebus_
On 15 February 2010 10:29, bruno desthuilliers wrote: > On Feb 15, 5:59 am, dj_vishal <2009vis...@gmail.com> wrote: >> Hello >> >>    Hi to all am new to the Django Framework.am learning django >>    Which IDE is suitable for Django ..plz help me in right way > >

Re: weird request.user problem in view

2010-02-13 Thread rebus_
On 13 February 2010 13:46, Anders Eide wrote: > did a stupid PEBCAK i the urls.py file. Works fine now > > On Feb 13, 1:33 pm, Anders Eide wrote: >> Why on earth doesn't this user_page view work? Getting "404, No User >> matches the given query." >>

Re: relation "django_session" does not exist

2010-02-12 Thread rebus_
On 12 February 2010 11:26, chiranjeevi muttoju wrote: > Hi, > When i'm using the session in django i'm getting this error relation > "django_session" does not exist. what is that error.. if any one of u know > please help me.. > My code is: > from

Re: What hosting companies do you use for django hosting?

2010-02-09 Thread rebus_
On 9 February 2010 21:10, Brandon Taylor wrote: > WebFaction. They are simply awesome. > > On Feb 9, 9:52 am, adamjamesdrew wrote: >> Thanks > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. >

Re: how to redirect to 'next'

2010-02-09 Thread rebus_
On 9 February 2010 16:47, harryos wrote: > hi > In my login_view I am redirecting to an archive page as below > > def login_view(request): >        if request.method=='POST': >                username=request.POST['username'] >                

Re: how to define DJANGO_SETTINGS_MODULE for multiple sites.

2010-02-09 Thread rebus_
On 9 February 2010 03:25, neridaj wrote: > I'm trying to setup my first cron job and I think the reason my script > is not running is because I don't have DJANGO_SETTINGS_MODULE defined > for my environment i.e., .profile script. I'm using mod_wsgi so my >

Re: I can't get urls with explicit keyword arguments to reverse correctly.

2010-02-08 Thread rebus_
On 8 February 2010 17:33, Luke Sneeringer wrote: > Good morning, Django e-mail list! Happy Monday! I have a problem. :) I > checked the Django documentation and Stack Overflow with no success, so you > guys are my next line of defense. This is an issue I've encountered

Re: editing an entry ,how to call the form action

2010-02-08 Thread rebus_
Opps, for you view context it should be "entryform" not "form": {{entryform.as_ul }} -- 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

Re: editing an entry ,how to call the form action

2010-02-08 Thread rebus_
On 8 February 2010 16:52, jimgardener wrote: > hi > I created a view function to edit an entry. > def edit_entry(request,id): >        entry=get_object_or_404(MyEntry,id=id) >        if request.method=='POST': >                form=MyEntryForm(request.POST,instance=entry) >

Re: django-debug-toolbar with runserver not running on localhost

2010-02-04 Thread rebus_
On 4 February 2010 22:06, HARRY POTTRER wrote: > I've noticed that if I run the django dev server on localhost, debug- > toolbar works, but if I try to run he server like this: > > ./manage.py runserver 192.168.1.145:8000 > > the site will work, but the toolbar won't show up.

Re: Division with Python/Django

2010-01-29 Thread rebus_
On 29 January 2010 14:40, Chris McComas wrote: > I have this view with my form: http://dpaste.com/152046/ when I try to > submit the form I'm getting this error: unsupported operand type(s) > for //: 'unicode' and 'int' what did I do wrong? > > -- > You received this

Re: No such table:django_sesion error when using django with lighttpd + mod_fastcgi

2010-01-01 Thread rebus_
2010/1/1 sangho : > hello, i`m korean, and english is the starter, so please understanding > > i want access to admin page, if i run with developserver, it's working > but if i run with lighttpd + mod_fastcgi + manage.py runfcgi server, > it's not working > i can access to

Re: You are already login...I want to get this message when a user is already login to my site(two different location)

2009-12-28 Thread rebus_
2009/12/28 Daniel Roseman : > On Dec 28, 11:26 am, NMarcu wrote: >> Hello all, >> >>    I want to let only one same user to be login in the same time. If I >> connect from Paris with admin, and other user try to connect with >> admin from other

Re: {% url admin:index %} generating wrong urls

2009-12-25 Thread rebus_
2009/12/24 Chris Withers : > Hi All, > > My django site is served up with the following in Apache's config: > > WSGIScriptAlias /studio /django/studio/bin/django.wsgi > > My urls.py looks like: > > urlpatterns += patterns( >     'django.contrib', >     (r'^admin/',

Re: Clickable url in the admin

2009-12-22 Thread rebus_
e" go in the admin.py? > > Thanks again. > > On Dec 14, 6:41 pm, rebus_ <r.dav...@gmail.com> wrote: >> Create method on your model that generates anchor (html link tag) >> which points to wanted URL and put that methods name in list_display >> property of AdminMo

Re: pass to a template many querysets

2009-12-21 Thread rebus_
2009/12/21 Francesco Benincasa : > Hi all, > I need to pass to a template more than one list of diffent models objects. > > Now I'm using a date_based.archive_index but I can pass it only a queryset as > argument, isn't it? > > What's the correct approach? To try to pass

Re: Display images in template using ManyToMany

2009-12-20 Thread rebus_
{% for a in p.gallery.all %} <--- TRY THIS {% endfor %} http://docs.djangoproject.com/en/dev/ref/files/file/#django.core.files.File.url -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Error message

2009-12-18 Thread rebus_
2009/12/18 reactosguy : > I get this message every time I go on http://localhost:8000/ with the > Django server running: > > Traceback (most recent call last): > >  File "C:\Python26\lib\site-packages\django\core\servers > \basehttp.py", line 279, in run >    self.result =

Re: ORM using tons of memory and CPU

2009-12-15 Thread rebus_
2009/12/15 Tracy Reed : > > I have code which looks basically like this: > > now        = datetime.today() > beginning  = datetime.fromtimestamp(0) > end        = now - timedelta(days=settings.DAYSTOKEEP) > > def purgedb(): >    """Delete archivedEmail objects from the

Re: Django authentication, not permit 2 users with the same name to login in same time

2009-12-14 Thread rebus_
2009/12/14 NMarcu : > Hi all, > >   How can I do, to not let the same user to be logged from 2 > different location, in the same time. I want, when a user admin is > login, and another user try to login with the same user admin, to have > a message, you are already login.

Re: Clickable url in the admin

2009-12-14 Thread rebus_
Create method on your model that generates anchor (html link tag) which points to wanted URL and put that methods name in list_display property of AdminModel object in your admin.py http://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_display -- You

Re: Foreign key links in Django.admin

2009-12-14 Thread rebus_
2009/12/14 fredlab : > Hey, > > I've looking for hours and I could not find what I am looking for. It > is probably a basic question but I am a newcomer to Django (will > probably forget PHP in a few days !!!). > > Imagine I have a blog post application but many users can

Re: ProgrammingError: relation "django_session" does not exist

2009-12-13 Thread rebus_
2009/12/12 newpublic : > when migrate djange from ubuntu 910 to fedora 12, there are so much > trouble .. > #- - > > == > error information: > > Traceback (most recent call > last): >  File "/usr/lib/python2.6/site-packages/mod_python/importer.py", line > 1537, in

Re: access legacy data without model.py

2009-12-13 Thread rebus_
2009/12/12 dundeemt : > I need to access data in other databases.  I don't want them listed in > model.py as I won't be using django's orm for them. Given this, where > is the preferred place to put the db connection for this data?  The > only references I could find show

Re: Is there any way to make USStateField() to not have a pre-selected value?

2009-12-02 Thread rebus_
2009/12/2 Continuation : > I use USStateField() from localflavor in one of my  models: > > class MyClass(models.Model): >   state  = USStateField(blank=True) > > Then I made a form from that class: > > class MyClassForm(forms.ModelForm): >    class Meta: >        model   =

Re: Trouble with Pythonpath and getting my server to start

2009-12-02 Thread rebus_
2009/12/1 Dave : > Hi all, > > I created a django project and when I try to start the server I get > this: > > Traceback (most recent call last): >  File "manage.py", line 2, in >    from django.core.management import execute_manager > ImportError: No module named

Re: Dynamicly preset forms in the admin interface

2009-12-01 Thread rebus_
models.py = from django.db import models class Country(models.Model): name = CharField(max_length=70) def __unicode__(self): return '%s' % (self.name) admin.py = from django.contrib import admin from your_app.models

Re: Dynamicly preset forms in the admin interface

2009-12-01 Thread rebus_
2009/11/30 Kai Timmer <em...@kait.de>: > 2009/11/29 rebus_ <r.dav...@gmail.com>: >> I  imagine some of core devs or django gurus would maybe have better >> ideas on how to do this (or can even tell you if this is documented >> somewhere). > What i wonder is:

Re: Difficulty using anchor tags in templates

2009-11-29 Thread rebus_
BTW here is an example: When you click this link: http://en.wikipedia.org/wiki/Fragment_identifier#Processing your browser will open up http://en.wikipedia.org/wiki/Fragment_identifier page and then scroll down to the Processing title without wikipedia even knowing that you specifically want to

Re: Difficulty using anchor tags in templates

2009-11-29 Thread rebus_
I have seem to overcomplicated and I hope i understand your question right :) You just need to render the template with your titles and content (i guess you call it resources). If you have a link such as link anywhere on your site, once you click on it you should return HttpResponse and render

Re: Dynamicly preset forms in the admin interface

2009-11-29 Thread rebus_
2009/11/29 Kai Timmer <em...@kait.de>: > 2009/11/29 rebus_ <r.dav...@gmail.com>: >> Have you tried using fieldsets [1] in you ModelAdmin. Also you can >> override save_model method on the ModelAdmin to set values for some >> object attributes when the object is bei

Re: Difficulty using anchor tags in templates

2009-11-29 Thread rebus_
2009/11/29 Andy : > I have a model named Articles with title and content fields.  Each > page of my site should display a list of the titles, linked with > anchor tags to the corresponding area of the Resources page which > displays all the titles and content.  I am having

Re: Dynamicly preset forms in the admin interface

2009-11-29 Thread rebus_
2009/11/29 Kai Timmer : > Hello, > I'm new to django, so this question may look a bit stupid, but I > couldn't find the information in the documentation. > > I have a pretty simple model which looks like this: > class article(models.Model): >  headline =

Re: CSRF Flatpages

2009-11-29 Thread rebus_
2009/11/28 John Leith : > I have a problem with the CSRF framework, and i'm just checking here > to see if anyone else ran into this problem and hopefully found a > solution. Here is my problem: > > I have a login form on the base template of my site. The home page is > just

Re: CSRF gone haywire

2009-11-28 Thread rebus_
2009/11/27 Tim Valenta : > Also, I've figured out just now while rereading the reply I got, that > "AFAIK" must mean "as far as I know".  Please... can we not use > ridiculous short forms for a language that works better when not > profusely abbreviated?  That would

Re: CSRF gone haywire

2009-11-27 Thread rebus_
2009/11/27 Tim Valenta : > Has anybody else experienced a senseless failure of the dev trunk's > CSRF verification?  Very suddenly this morning, Django won't let me > change anything in my admin sites.  I didn't update my copy of the SVN > trunk, but as soon as I took

Re: applying a patch

2009-11-26 Thread rebus_
2009/11/26 paulh : > Thank's for the reply. I do use tortoise and I tried what you > suggested: nothing happened. Now I look at the patch file I think > maybe it was generated by git (which I am not familiar with). The > first few lines of the patch file (downloaded from

Re: strange style difference between development and production

2009-11-26 Thread rebus_
2009/11/26 andreas schmid : > hi, > > i just noticed that the css is interpreted differently between my > development environment on my local machine and the deployment on the > server. > > locally i run the django project trough runserver and on production im > using wsgi

Re: Per-object permissions

2009-11-25 Thread rebus_
2009/11/25 Gamliel Roi <roi.gaml...@gmail.com>: > Any idea when 1.2 will be released? > > > > On Wed, Nov 25, 2009 at 3:31 PM, rebus_ <r.dav...@gmail.com> wrote: >> >> 2009/11/25 Russell Keith-Magee <freakboy3...@gmail.com>: >> > On Tue, Nov 2

Re: Per-object permissions

2009-11-25 Thread rebus_
2009/11/25 Russell Keith-Magee <freakboy3...@gmail.com>: > On Tue, Nov 24, 2009 at 11:16 PM, rebus_ <r.dav...@gmail.com> wrote: >> 2009/11/24 nek4life <nek4l...@gmail.com>: >>> You should look into django-authority.  I'm pretty sure that has per-

Re: Per-object permissions

2009-11-24 Thread rebus_
2009/11/24 nek4life : > You should look into django-authority.  I'm pretty sure that has per- > object-permissions. > > http://packages.python.org/django-authority/index.html > > On Nov 24, 7:00 am, gamliel roi wrote: >> Hello all, >> >> I have the admin

Re: How to resolve the view name from a url

2009-11-24 Thread rebus_
> (people_name). It's not for a HttpRedirect, it's for statistical > porpouses. > > It's something like resolve, but not reverse. > > Thanks > > On 24 nov, 11:15, rebus_ <r.dav...@gmail.com> wrote: >> 2009/11/24 bcurtu <bcu...@gmail.com>: >> >> >

Re: How to resolve the view name from a url

2009-11-24 Thread rebus_
2009/11/24 bcurtu : > Hi, > > I want to get the url name from a url. For example, having: > >    url( >        regex   = r'^people/$', >        view    = 'people_view', >        name    = 'people_name' >        ), > > and > > @login_required > def people_view(request)... >    

Re: How to use French accent on django template?

2009-11-12 Thread rebus_
2009/11/12 NMarcu : > Hello all, > >   How to use French accent on django template? It's very strange. in > one template is working very well, but in other(templatetag) not, I > got this error: > > TemplateSyntaxError at /operators/ajax > > Caught an exception while

Re: Imports, works from directory but not from file

2009-11-12 Thread rebus_
I am not sure if i got the problem right, but this is what i think you could do. If you want to keep your views in directory: app/ views/ __init__.py <- This is where you keep your views so you don't even need to change your urls.py or anthing something_else.py <- something else

Re: forms.ChoiceField and empty values

2009-11-12 Thread rebus_
2009/11/12 Monika Sulik : > As I haven't had any replies so far, I'll add some more information... > > The empty label appears if I redefine the form like this: > > class CompetitionSearchForm(forms.ModelForm): >    class Meta: >        model = Competition >        fields =

Re: Model validation

2009-11-12 Thread rebus_
2009/11/12 Dirk Uys <dirkc...@gmail.com>: > On Thu, Nov 12, 2009 at 2:23 PM, rebus_ <r.dav...@gmail.com> wrote: > >> >> You can add custom clean methods in your form: >> >> class Event (models.Model): >>    start_date = models.DateField() >>  

Re: Model validation

2009-11-12 Thread rebus_
2009/11/12 Dirk Uys : > I have a model with a from and to date: > > class Event (models.Model): >     start_date = models.DateField() >     end_date = models.DateField() > > In order to ensure start_date is always before end_date i can think of 3 > options: > > 1. Use form

Re: Prevent brute-force password attacks?

2009-11-12 Thread rebus_
How about using some system that after few failed logins gives some CAPTCHA to solve? I think it's ok way to get rid of some bots. I think it could be easily done by setting up custom login view. -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: Model field validation for admin

2009-11-10 Thread rebus_
2009/11/10 pixelcowboy : > > Hello, I want to make a field optional (blank=True), only if another > text field's options match a certain value in the admin. Is there any > way to do this? Thanks! > This is from the top of my head, but you probably want to say null=True

Re: domains vs sub-domains

2009-11-10 Thread rebus_
Hi, I personally also use option #1 due to performance, scalability and "prettiness" of URL, etc, reasons all mentioned in above posts. On the other hand if you spread your content over a bunch of sub domains you could, instead of increasing performance, downgrade it due to numerous DNS queries

Re: Django internationalization problem: Error: errors happened while running xgettext on __init__.py /bin/sh: xgettext: command not found

2009-11-09 Thread rebus_
2009/11/9 NMarcu : > > Hello all, > >   When I run django-admin.py makemessages -l ro I got this: > Error: errors happened while running xgettext on __init__.py > /bin/sh: xgettext: command not found > > You know why, I need to install somethng else? > > > are you sure