Re: leading zeros

2010-01-22 Thread Mike Dewhirst
On 23/01/2010 11:12am, Patrick wrote: Hello All, I'm sorry for being a newbe and posting this site, but I'm desperate. I inherited a django site and when posts are added through the admin page they render like this: http://website/posts/category/2010/1/11/post_information/ but the link will

Re: Need your expertise

2010-01-22 Thread jRam
Thanks mate. On Sat, Jan 23, 2010 at 12:32 AM, Malcolm Box wrote: > On Fri, Jan 22, 2010 at 9:03 AM, Jigs wrote: > >> We are currently deciding if Django Framework will suit our needs. > > > >> >> Templates and Python is a must requirement for the

Re: Looking for Lead Django Developer in LA please call 310 571 JOBS

2010-01-22 Thread James Bennett
On Fri, Jan 22, 2010 at 6:48 PM, CerenGuven wrote: > 3-5+ years Django/Python development experience If you manage to find someone with 5+ years' Django experience, do let me know. (meanwhile, job postings should go to djangogigs.com) -- "Bureaucrat Conrad, you are

Looking for Lead Django Developer in LA please call 310 571 JOBS

2010-01-22 Thread CerenGuven
Requirements: 3-5+ years Django/Python development experience A good understanding of object oriented programming and relational data modeling. An understanding of Ajax Demonstrated experience with HTML, CSS table-less design and Javascript Must have excellent problem solving skills and love

Deploying for designers

2010-01-22 Thread Andrew Badr
How can I get a designer set up to be able to edit a Django project's templates and static files with the minimum amount of effort? Django itself is easy to get running, but a project with many external dependencies can quickly become very hard for a less technical person to set up, especially if

leading zeros

2010-01-22 Thread Patrick
Hello All, I'm sorry for being a newbe and posting this site, but I'm desperate. I inherited a django site and when posts are added through the admin page they render like this: http://website/posts/category/2010/1/11/post_information/ but the link will only work if you add the leading zero to

Re: How to Model a relationship on a constrained subset of the foreign key.

2010-01-22 Thread Atamert Ölçgen
Hi Taliesin, Here is what I would do; I would set up relationships like this Contact -> Division -> Account. Then you can access a contacts account as `contact_instance.division.account`. This means you need to create a Division for each Account that represents no-division. It can be done

Re: Remove items from queryset?

2010-01-22 Thread Carl Zmola
I have a similar problem I want to exclude or include records based on the presence of other records. I want to march through Users, get their profile, and exclude records who I have 3 tables: auth_user, myapp_userprofile, myapp_resource (with the userprofile having a one to Many

filtering foreign key field in form

2010-01-22 Thread Gaffar Durmaz
hi everybody, i have a problem with forms.. suppose we have a model class as like this class Something(models.Model): another_model = models.ForeignKey(AnotherModel, verbose_name=_ ('AnotherModel')) so i have a form for this class such as belove class

Re: Send and Receive SMS from a django app

2010-01-22 Thread Chris Withers
Alessandro Ronchi wrote: Because of the number of the SMS I must write. I need a web app that makes intense use of SMS without any external dependences (like Unicef app). If you want to send a *lot* of sms'es then you definitely want to be using a gatway sending service rather than trying

Re: About generated html forms with django

2010-01-22 Thread Daniel Hilton
I'm just trying to help :-) Google git clone or read the user guide on github to help you out. Cheers, Dan On Friday, January 22, 2010, Ariel wrote: > I am asking you that because I am having problems to download it. > > > > On Fri, Jan 22, 2010 at 12:13 PM, Ariel

Re: templatetag produce extra newline

2010-01-22 Thread Bill Freeman
I use emacs. By default it does not add newlines, but can be configured to do so. If you remember the sed, that's fine, but you don't have to "learn emacs" in order to use it for this task. You can invoke it with the filename on the command line, scroll to the bottom using the scroll bar, click

Re: templatetag produce extra newline

2010-01-22 Thread Ali Rıza Keleş
On Fri, 2010-01-22 at 15:07 -0500, Bill Freeman wrote: > I believe that you will find that the file > tags/find_which_display.html has a newline > at it's end. If you don't have the *nix utility od, you can, with any > conventint > python, do: > >

Re: templatetag produce extra newline

2010-01-22 Thread Bill Freeman
I believe that you will find that the file tags/find_which_display.html has a newline at it's end. If you don't have the *nix utility od, you can, with any conventint python, do: f=open('path_to_tags_template_dir/tags/find_which_display.html', 'rb') s=f.read() f.close() print repr(s) Probably

I18N

2010-01-22 Thread jrs_66
The following - #: contrib/admin/templates/admin/base.html:26 msgid "Welcome," msgstr "Bienvenido/a," is from the Django spanish django.po file. I understand that the language supports the word 'Bienvenido' ending in an 'o' or an 'a'. Any idea how the django template tag {% trans "Welcome," %}

Re: About generated html forms with django

2010-01-22 Thread Ariel
I am asking you that because I am having problems to download it. On Fri, Jan 22, 2010 at 12:13 PM, Ariel wrote: > Why is this http://github.com/bartTC/django-frontendadmin helpfull ??? > > Regards > Ariel > > On Fri, Jan 22, 2010 at 12:00 PM, Daniel Hilton

Re: templatetag produce extra newline

2010-01-22 Thread Ali Rıza Keleş
On Fri, 2010-01-22 at 12:55 -0500, Bill Freeman wrote: > I'm pretty sure that your templatetag does produce the newline. The url tag, > for example, doesn't add a newline. How about posting the code? > Code here: @register.inclusion_tag('tags/find_which_display.html') def

Re: About generated html forms with django

2010-01-22 Thread Ariel
Why is this http://github.com/bartTC/django-frontendadmin helpfull ??? Regards Ariel On Fri, Jan 22, 2010 at 12:00 PM, Daniel Hilton wrote: > 2010/1/22 Ariel : > > Hi everybody: > > I need to make an automatic admin interface with a behaviour

Re: About generated html forms with django

2010-01-22 Thread Daniel Hilton
2010/1/22 Ariel : > Hi everybody: > I need to make an automatic admin interface with a behaviour similar to the > Django's default admin interface but not totally equal, then I need to know > how django generate all the html forms and views methods for any class > included in

Re: templatetag produce extra newline

2010-01-22 Thread Bill Freeman
I'm pretty sure that your templatetag does produce the newline. The url tag, for example, doesn't add a newline. How about posting the code? On Fri, Jan 22, 2010 at 12:37 PM, Ali Rıza Keleş wrote: > Hi, > > I have a templatetag which decides somthing and returns it. I

Re: Remove items from queryset?

2010-01-22 Thread Bill Freeman
A final possibility is to enumerate the id's of the objects that you want to exclude, and then apply them to an unevaluated copy of the queryset using exclude, e.g.; q = base_queryset_construction() excludes = [] for i in q.all(): if shoud_be_excluded(i): excludes.append(i.id) q =

Re: Remove items from queryset?

2010-01-22 Thread Igor
Bill, You're correct in all your guesses - I want to be able to chain more filtering to the query since I'm not sure what and how might use it later. Even in the current situation it's much better from design standpoint to chain a .distinct() on the set AFTER the exclusion of the values I don't

templatetag produce extra newline

2010-01-22 Thread Ali Rıza Keleş
Hi, I have a templatetag which decides somthing and returns it. I works well within HTML, but it causes error while it is in JavaScript, because of newline which is produced by django rendering this templatetag. For example: produces http://media..com/images/2010/01/22/test_image.jpg "

About generated html forms with django

2010-01-22 Thread Ariel
Hi everybody: I need to make an automatic admin interface with a behaviour similar to the Django's default admin interface but not totally equal, then I need to know how django generate all the html forms and views methods for any class included in the model, how does django do that ??? Where are

Re: Localizing database textarea fields using gettext chokes on \r\n.

2010-01-22 Thread Doug Van Horn
I did a little digging to get this working and here's what's going on: The process calls to xgettext, msguniq, and msgmerge all yield warnings to standard error. However, the programs exit with status 0 so they're not in error, just emitting messages to standard error. The code in the

Re: get all foreign keys that point to

2010-01-22 Thread Malcolm Box
The list of all drivers in a team is (assuming self is a team instance) drivers = self.driver_set().all() Hope that helps. Malcolm On Thu, Jan 21, 2010 at 2:49 AM, Ether Joe wrote: > Hello there, quick (hopefully) question for you - how do I get a list > of records in

Localizing database textarea fields using gettext chokes on \r\n.

2010-01-22 Thread Doug Van Horn
I'm trying to avoid changing my database around to accommodate localized strings. I'm putting all strings from the database into a holding file (db_messages.py) which get dumped into my django.po file. The problem is that textarea fields contain "\r\n" as line endings, and running something

Re: Templating problem: equal symbol "=" escaped to "=3D"

2010-01-22 Thread Malcolm Box
Try it and see! Malcolm On Thu, Jan 21, 2010 at 4:05 PM, Enrico Sartorello < enrico.sartore...@gmail.com> wrote: > Ok maybe I got it. > > I found those "=3D" symbols just looking at the output of the Python SMTP > server that simulates the email process. > > I think that those mime escaped

Re: Should a decorator be used here or should I do something else.

2010-01-22 Thread Malcolm Box
If it's different instances of the model that should have age-restrictions applied then I would be tempted to push this down to the model layer by creating a new Manager called e.g. age_filtered and then use that in view: q = Data.age_filtered(age).filter(id=23) You could even make the default

Re: Need your expertise

2010-01-22 Thread Malcolm Box
On Fri, Jan 22, 2010 at 9:03 AM, Jigs wrote: > We are currently deciding if Django Framework will suit our needs. > > Templates and Python is a must requirement for the project. Reporting > and Monitoring modules will be created in the future. Please advise if > we are

Re: Remove items from queryset?

2010-01-22 Thread Bill Freeman
On Fri, Jan 22, 2010 at 10:22 AM, Igor wrote: > I would not like to rely on fieldname__regex because it's database- > dependent. > I've thought about lists as well, but not sure whether it's a good > idea if it loses the queryset-ness. If a thing is still a queryset

Re: Admin calendar popups on datefield suddenly missing

2010-01-22 Thread Bill Freeman
Note that the net tab in firebug is one way to see which references aren't loading. On Fri, Jan 22, 2010 at 6:26 AM, David De La Harpe Golden wrote: > Walt wrote: >> Okay, we're getting somewhere. It can find the JS file(s) just fine > > The static files maybe. >

Re: Remove items from queryset?

2010-01-22 Thread Igor
Wow, thanks for all the replies! :) I would not like to rely on fieldname__regex because it's database- dependent. I've thought about lists as well, but not sure whether it's a good idea if it loses the queryset-ness. The idea of pop() and del() is the most appealing... del actually, but I

Re: Extend model choice in project

2010-01-22 Thread Daniel Roseman
On Jan 22, 2:33 pm, Thomas Guettler wrote: > Hi, > > in my app I have this: > > class FooModel(models.Model): >     example=models.SmallIntegerField(choices=[(1, u'one'), >                                               (2, u'two'), >                                              

Extend model choice in project

2010-01-22 Thread Thomas Guettler
Hi, in my app I have this: class FooModel(models.Model): example=models.SmallIntegerField(choices=[(1, u'one'), (2, u'two'), ...] I want to extend the choices at project level. Where should I put the

Re: Remove items from queryset?

2010-01-22 Thread Karen Tracey
On Fri, Jan 22, 2010 at 9:15 AM, Igor wrote: > Hello, > > I need to exclude some items from a QuerySet based on field analysis > with regular expressions. Which means in my understanding means that I > need to first evaluate the QuerySet and then go thru it and use

Re: Remove items from queryset?

2010-01-22 Thread Jani Tiainen
On Fri, 2010-01-22 at 06:15 -0800, Igor wrote: > Hello, > > I need to exclude some items from a QuerySet based on field analysis > with regular expressions. Which means in my understanding means that I > need to first evaluate the QuerySet and then go thru it and use python > to remove some items

Re: Remove items from queryset?

2010-01-22 Thread Shawn Milochik
How about creating a Python list, which you populate from chosen items of your queryset? You might even be able to do it with a list comprehension, depending on how complex your filtering is. The contents of a queryset are just model instances. Nothing magical you can't pull out and manipulate

Re: Remove items from queryset?

2010-01-22 Thread Daniel Roseman
On Jan 22, 2:15 pm, Igor wrote: > Hello, > > I need to exclude some items from a QuerySet based on field analysis > with regular expressions. Which means in my understanding means that I > need to first evaluate the QuerySet and then go thru it and use python > to

Remove items from queryset?

2010-01-22 Thread Igor
Hello, I need to exclude some items from a QuerySet based on field analysis with regular expressions. Which means in my understanding means that I need to first evaluate the QuerySet and then go thru it and use python to remove some items based on my analysis. Now, how can I accomplish that? I

Re: GET request breadcrumbs

2010-01-22 Thread Andy Mikhailenko
I would suggest using django-navigation or a similar approach, that is to bind breadcrumbs-related code to views instead of templates. Of course you would still render the breadcrumbs in a template, but that would be a single piece of code (I usually place it right in the project's base.html)

Re: Best Practice for developing djangoapp in a repository

2010-01-22 Thread Andy Mikhailenko
Why not create a symlink to django-tagging/tagging in the project directory? I think it's the easiest way. -- regards, Andy -- 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

Re: About unit testing

2010-01-22 Thread Dougal Matthews
If you look at the tests in django-shorturls you can see how they created models that were only used for the tests: http://github.com/jacobian/django-shorturls/tree/master/src/shorturls/tests/ --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2010/1/22 Gabriel Reis

Looking for Django / Python Developers in Edinburgh

2010-01-22 Thread mercurytide
Established in 2001, Mercurytide is an industry expert in web development, with offices in both Edinburgh and Glasgow. We only employ individuals of an expectantly high standard and use Django as our main platform. We are looking to recruit for the following positions for our Edinburgh office:

Re: About unit testing

2010-01-22 Thread Larrik Jaerico
What are you actually trying to accomplish? On Jan 22, 6:25 am, Gabriel Reis wrote: > Hi, > > I would like to know if it is mandatory to create an application and define > my model in the models.py file or if it is possible to define a model > locally in my test method

Re: Import problem on the attempt to use {% url %}

2010-01-22 Thread Felipe
Thanks a lot Karen Tracey. You've solved my problem. Felipe. On 22 jan, 01:13, Karen Tracey wrote: > On Thu, Jan 21, 2010 at 9:28 PM, Felipe wrote: > > Hello Friends, > > > Someone here know what this error mean? > >

Re: Feed not available - Syndication - Django 1.1.1

2010-01-22 Thread Kenny Meyer
Kenny Meyer (knny.m...@gmail.com) wrote: > El 22/01/10 07:31, Kenny Meyer escribió: > > I'm trying to generate some feeds for my blog with Django's high-level > > Syndication Framework. > > My problem is, when browsing to the URL defined in the ``link`` > > attribute of the ``syndication.Feed``

Django Admin interface and filter by value

2010-01-22 Thread onorua
I have two models: class User(models.Model): LoginName = models.CharField('login', max_length=50) Email = models.EmailField('e-mail', blank=True) FirstName = models.CharField(max_length=50) LastName = models.CharField(max_length=50) IpAddress =

Re: Admin calendar popups on datefield suddenly missing

2010-01-22 Thread David De La Harpe Golden
Walt wrote: > Okay, we're getting somewhere. It can find the JS file(s) just fine The static files maybe. > and I see that the calendars are added dynamically. However, I'm > have found that it is generating a javascript error when the page > loads: > > Error: gettext is not defined Now, I'm

About unit testing

2010-01-22 Thread Gabriel Reis
Hi, I would like to know if it is mandatory to create an application and define my model in the models.py file or if it is possible to define a model locally in my test method (inside my TestCase class) and interact with it and saving without creating an application and the models.py. In other

Re: Feed not available - Syndication - Django 1.1.1

2010-01-22 Thread Gonzalo Delgado
El 22/01/10 07:31, Kenny Meyer escribió: > I'm trying to generate some feeds for my blog with Django's high-level > Syndication Framework. > My problem is, when browsing to the URL defined in the ``link`` > attribute of the ``syndication.Feed`` model, there's no Feed > generated/displayed. >

Need your expertise

2010-01-22 Thread Jigs
Hi, We are currently deciding if Django Framework will suit our needs. For starters, our project is a hotspot-like webapp which will deployed to multiple clients. Settings/Configuration for each client will be in one central database. Clients will be supplied with their own servers (Linux with

Feed not available - Syndication - Django 1.1.1

2010-01-22 Thread Kenny Meyer
Hi guys, I'm trying to generate some feeds for my blog with Django's high-level Syndication Framework. My problem is, when browsing to the URL defined in the ``link`` attribute of the ``syndication.Feed`` model, there's no Feed generated/displayed. If not clear what I'm trying to say, please

Re: MySQL-python 1.2.3 and OS X 10.5: 64- or 32-bit?

2010-01-22 Thread Chhouk Voeun
Please don't send to me, I have a lot of mails. I'm bored On Fri, Jan 22, 2010 at 5:29 PM, Chhouk Voeun wrote: > Please don't send to me , I'm not member django-users. > > > On Fri, Jan 22, 2010 at 4:41 PM, Dave E wrote: > >> I've been happily

Re: MySQL-python 1.2.3 and OS X 10.5: 64- or 32-bit?

2010-01-22 Thread Chhouk Voeun
Please don't send to me , I'm not member django-users. On Fri, Jan 22, 2010 at 4:41 PM, Dave E wrote: > I've been happily using (32-bit) Django and MySQL in development on an > existing machine running OS X 10.4 Tiger, and have set up a similar > environment in 10.5

Re: ChoiceField

2010-01-22 Thread Daniel Roseman
On Jan 21, 11:45 pm, pinco wrote: > The code > > {% for choice_value, choice_text in > myform.fields.choicefieldname.choices %} >                 choice_value: {{ choice_value }} >                 choice_text: {{ choice_text }} >                 {% endfor %} > > gives the

MySQL-python 1.2.3 and OS X 10.5: 64- or 32-bit?

2010-01-22 Thread Dave E
I've been happily using (32-bit) Django and MySQL in development on an existing machine running OS X 10.4 Tiger, and have set up a similar environment in 10.5 Leopard on a new 64-bit MacBook, with a (separately) working MySQL and Python 2.6.4. Now I want them to communicate, easy_install

Re: Cannot convert float to Decimal. First convert the float to a string Error

2010-01-22 Thread Cummins Group
It workedThanks for the help.. On Fri, Jan 22, 2010 at 2:05 PM, Cummins Group wrote: > The field in the model is Floatfield...Now what must be the problem... > > > On Fri, Jan 22, 2010 at 12:07 PM, Karen Tracey wrote: > >> On Fri, Jan 22, 2010

Re: Cannot convert float to Decimal. First convert the float to a string Error

2010-01-22 Thread Cummins Group
The field in the model is Floatfield...Now what must be the problem... On Fri, Jan 22, 2010 at 12:07 PM, Karen Tracey wrote: > On Fri, Jan 22, 2010 at 1:13 AM, grp25 wrote: > >> got error: >> Cannot convert float to Decimal. First convert the