A simple use for multidb... is this possible yet?

2009-07-19 Thread Jon Loyens

Hi everyone (particularly those working on multidb),

I have a pretty simple use case that involves use of multidb support
and I was wondering if the code base for multidb is far enough along
to help me out on this.  Basically, I have a legacy enterprise db that
I've created working models for using inspectdb.  The models work and
are a big help in navigating and retrieving the data.

What I need to do now is transform some of the data and then store the
data in a new set of models in a different database.  Of course I
could just open another connection using mysqldb and just write raw
sql but what would be great is if I could use the django ORM to
manipulate the data from the first database and then store it in the
second.

My question is this: is there enough work done on multi-db already
that maybe with maybe a little hack or two I could accomplish this?

JL
--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Displaying Data from Multiple Tables

2009-02-03 Thread Jon Loyens

Oops... I meant dpaste.com

On Feb 3, 8:54 am, Jon Loyens  wrote:
> Alex, would you mind posting your complete template at dpaste.org for
> us to look at?  It might clarify how you're trying to do the output.
>
> Thanks,
>
> Jon.
>
> On Feb 2, 11:37 pm, Alexiski  wrote:
>
> > > On Mon, 2009-02-02 at 21:21 -0800, Alexiski wrote:
> > > > Hi Malcolm,
>
> > > > Thanks for your response, but I'm not quite sure how to iterate using
> > > > obj.query.all to get all the instances I'm after.
>
> > > > Could you please provide a code snippet or direct me to a relevant
> > > > page?
>
> > > Iteration in templates is done with the forloop template tag. You must
> > > already be using that to iteratate over all the copy instances.
>
> > Correct I am using the {% for Copy in object_list %} tag. I access the
> > fields like so - {{ Copy.id }} {{ Copy.question }}
>
> > In order to access the n Query objects per Copy object, do I nest {%
> > for Query in object_list %} and access using {{ Query.id }}
> > {{ Query.requirements }} ?
>
> > Alex
--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Displaying Data from Multiple Tables

2009-02-03 Thread Jon Loyens

Alex, would you mind posting your complete template at dpaste.org for
us to look at?  It might clarify how you're trying to do the output.

Thanks,

Jon.

On Feb 2, 11:37 pm, Alexiski  wrote:
> > On Mon, 2009-02-02 at 21:21 -0800, Alexiski wrote:
> > > Hi Malcolm,
>
> > > Thanks for your response, but I'm not quite sure how to iterate using
> > > obj.query.all to get all the instances I'm after.
>
> > > Could you please provide a code snippet or direct me to a relevant
> > > page?
>
> > Iteration in templates is done with the forloop template tag. You must
> > already be using that to iteratate over all the copy instances.
>
> Correct I am using the {% for Copy in object_list %} tag. I access the
> fields like so - {{ Copy.id }} {{ Copy.question }}
>
> In order to access the n Query objects per Copy object, do I nest {%
> for Query in object_list %} and access using {{ Query.id }}
> {{ Query.requirements }} ?
>
> Alex
--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Where are all the Django jobs?

2009-01-11 Thread Jon Loyens

Django is starting to gain more traction and I do believe we'll start
to see a bit more of a hockey stick effect on it's adoption over the
coming months.  1.0 being released last year and (at least part-wise)
adoption by the Google AppEngine have both been great PR events for
Django but I'd also argue that Django doesn't have it's Twitter or
BaseCamp yet i.e. a killer application that grabs the mindshare of
startup CTO and CEOs that seemingly make them choose Rails.

At Thinktiv, while we're a professional services company thats
officially platform agnostic, we've chosen Django as our in-house
framework of choice for development.  Django suits the majority of our
customers applications very well (generally interesting presentations
and visualization of structured data and media).  Whenever we've had
customers where we get to influence the framework used, we'll sell
Django into the account.  However, we've had customers comeback and
want to build on Rails for the exact opposite reason from this thread:
lack of people in the Austin area who know Python/Django to take on
the maintenance work after we've done the initial application build.
So it seems like we've got a bit of a chicken/egg problem.

Our organization is going continue to evangelize Django in our
community.  The more that the Django-community sells its virtues in
our various consulting gigs the more opportunity we'll get to use the
framework we love.  To further Malcolm's point above, be a good
programmer first.  Good programmers should be able to pick up (or
already know) multiple platforms, frameworks, languages quickly.
Being a first rate programmer who's technology agnostic will open up a
huge number of opportunities where you'll get to be the person who
influences what gets used in various situations.  It's in those
situations that you'll get to grab your favorite tool: Django.

Jon Loyens
Thinktiv, Inc.

On Jan 11, 1:14 am, Malcolm Tredinnick 
wrote:
> On Sat, 2009-01-10 at 15:38 -0700, David Lindquist wrote:
> > First, I understand that the world economy is in a slump, and that  
> > the job market as a whole has not fared well of late. But even before  
> > the recent downturn, I noticed that there are precious few jobs in  
> > Django development (yes, I know about DjangoGigs.com). A simple  
> > keyword search on popular job boards shows that the number of Ruby on  
> > Rails jobs outnumber Django easily by a factor of 10 or 20. True,  
> > Rails has been around longer, but not by much (a year maybe?).
>
> > So my question to the group is: if Rails has been widely adopted in  
> > the enterprise, why hasn't Django? Do you think Django will catch on?  
> > Or do you think it will be more of a "boutique" framework?
>
> There are some slight problems with your methodology. Large companies
> adopting something like Django aren't necessarily going to be posting to
> djangogigs.com or places like that. They'll already have competent
> programmers in-house to do the work. Or they'll hire through more
> traditional channels. So it might well be that Django is more heavily
> used in large organisations than Rails and all the Rails jobs you see
> being advertised are because there are lots more gigs at the smaller
> end.
>
> I have no evidence to support this either way, but it's always tough to
> estimate "the number of people using X" by the job advertisements
> without a lot more controlling of factors.
>
> It's probably a mistake to base your entire career for any period of
> time on only doing Django work unless you have some long-term contract
> or permanent position already lined up. But it's not a bad skill to have
> in your bag of tools, since many other problems that contractors are
> asked to solve can be solved using that particular skill. Keep in mind
> that keyword searches only find offerings where the client/employer has
> already picked the solution and is trying to backfill a lack of skills
> and hoping desperately that adding more people or bringing in new people
> won't make things worse than they are (hiring contractors is very
> risky). There are many other positions where the hirer is in a position
> of having a problem and after a solution. That's where the experienced,
> all-around consultant can often add genuine value.
>
> Over the years, Python job advertisements have lagged behind other,
> trendier areas. It's led to some perception problems, particularly when
> trying to "sell" Python-based solutions to more conservative outfits.
> But you can only hold one job at a time, so all you need is one job
> opening in an area you can work in and you're fine. Do you want to be a
> quali

Re: Does Django have a function that can be called by every view function ?

2008-12-01 Thread Jon Loyens

Another +1 for decorators.  In fact, the example David S uses
authentication and logins as an example of what he wants to do and its
already handled as a decorator thus giving him a decent pattern to
follow.  David S, I'd suggest you look up the @login_required
decorator and even look through the Django code to see how it's
implemented.  Don't be afraid of cruising through the code.  As good
as the documentation is, the code is also well organized and uses a
lot of good pythonic idioms if you're new to the language.

Jon.

On Dec 1, 6:49 am, martyn <[EMAIL PROTECTED]> wrote:
> David,
>
> +1 for decorator.
> That let you use it or not in each view.
>
> On Dec 1, 9:30 am, David Shieh <[EMAIL PROTECTED]> wrote:
>
> > Thanks , David Zhou , I will find some information for decorator
> > And also , I will surf for middleware .
>
> > Thank you very much , Malcolm.
>
> > On Dec 1, 3:55 pm, "David Zhou" <[EMAIL PROTECTED]> wrote:
>
> > > On Mon, Dec 1, 2008 at 2:23 AM, David Shieh <[EMAIL PROTECTED]> wrote:
> > > > I dont' know whether this make any sense .
> > > > Right now , I can't test it , but if django won't initiate the
> > > > views.py as a class , this method will make no sense.
>
> > > Why not write a decorator?
>
> > > ---
> > > David Zhou
> > > [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Deleting a Model with ForeignKey relationship where null=True in Admin causes IntegrityError

2008-10-09 Thread Jon Loyens

I was looking for a ticket like that.

Unfortunately I could see where either behavior is going to be
controversial.  If you set the foreign key back to null, some people
will want it to be deleted.  If you delete, some people will prefer it
go back to null.

Instead could there be an option on nullable foreign key fields?
Default the behavior to the non-destructive setting and then allow
people to override it if it should be destructive in their
application?  Of course, this would amount to introducing a new
feature to the 1.0 branch which is probably not what you guys want to
do.  Maybe a 1.1 feature.

I'll shut up now as this discussion clearly belongs in django-dev
being discussed by people with more in-depth knowledge than myself ;)

Thanks Malcolm.

Jon.

In the interim, for this project, I'll continue to explicitly set
cascading deletes in the db.

On Oct 9, 8:12 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Thu, 2008-10-09 at 09:28 -0700, Jon Loyens wrote:
>
> [...]
>
> > Is this a bug I'm seeing or am I missing something in either my models
> > or configuration?  Or do I not understand how ForeignKeys where
> > null=True are supposed to work?
>
> It's possibly a bug. There's a ticket open (#9308) about it. The only
> question in my mind is which behaviour to use when deleting (delete
> child or not), but raising an integrity error is a bug.
>
> Regards,
> Malcolm
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Deleting a Model with ForeignKey relationship where null=True in Admin causes IntegrityError

2008-10-09 Thread Jon Loyens

As a note... I've worked around this for the time being by setting
cascade on delete explicitly in db.  That said, I'd still like to know
if this is a bug or if I'm doing something wrong with my models.
Jon.

On Oct 9, 11:28 am, Jon Loyens <[EMAIL PROTECTED]> wrote:
> See the following set of models:
>
> class Mom(models.Model):
>     name = models.CharField(max_length=80)
>
>     def __unicode__(self):
>         return self.name
>
> class Dad(models.Model):
>     name = models.CharField(max_length=80)
>
>     def __unicode__(self):
>         return self.name
>
> class Child(models.Model):
>     name = models.CharField(blank=True, max_length=100)
>     mom = models.ForeignKey(Mom)
>     dad = models.ForeignKey(Dad, null=True, blank=True)
>
>     def __unicode__(self):
>         return self.name
>
> In admin if you create a Child with a Mom and a Dad, and then attempt
> to delete the Mom, it works as expected (prompt to make sure you're
> okay deleting the children, click okay, Mom and Child objects are
> deleted).  However, if you attempt to delete the, Dad, you'll get a
> prompt asking if it's okay to delete the Child but upon clicking Okay,
> you get an integrity error.
>
> I'm using MySQL and innoDB.  Here's a link to the traceback:
>
> http://dpaste.com/83431/
>
> Is this a bug I'm seeing or am I missing something in either my models
> or configuration?  Or do I not understand how ForeignKeys where
> null=True are supposed to work?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Deleting a Model with ForeignKey relationship where null=True in Admin causes IntegrityError

2008-10-09 Thread Jon Loyens

See the following set of models:

class Mom(models.Model):
name = models.CharField(max_length=80)

def __unicode__(self):
return self.name

class Dad(models.Model):
name = models.CharField(max_length=80)

def __unicode__(self):
return self.name

class Child(models.Model):
name = models.CharField(blank=True, max_length=100)
mom = models.ForeignKey(Mom)
dad = models.ForeignKey(Dad, null=True, blank=True)

def __unicode__(self):
return self.name

In admin if you create a Child with a Mom and a Dad, and then attempt
to delete the Mom, it works as expected (prompt to make sure you're
okay deleting the children, click okay, Mom and Child objects are
deleted).  However, if you attempt to delete the, Dad, you'll get a
prompt asking if it's okay to delete the Child but upon clicking Okay,
you get an integrity error.

I'm using MySQL and innoDB.  Here's a link to the traceback:

http://dpaste.com/83431/

Is this a bug I'm seeing or am I missing something in either my models
or configuration?  Or do I not understand how ForeignKeys where
null=True are supposed to work?

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Schema Evolution Choices?

2008-09-01 Thread Jon Loyens

Hi guys,

I have a small project coming up that I think having some sort of
schema evolution facilities will be handy on.  I was wondering what
the current and best project choices for schema evolution are?  I was
leaning towards django-evolution until I saw a post from Russell
saying that he hadn't updated it to the 1.0 branch yet.

Any options or opinions are appreciated.

Thanks,

Jon.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Composite Forms? Are widgets the right thing to use?

2008-08-24 Thread Jon Loyens

Thanks guys!  Using multiple forms + prefixes is exactly what I need!

Would be nice if there was some global wrapper though so you could do
validation amongst the forms but beggars can't be choosers.

On Aug 23, 2:28 am, Daniel Roseman <[EMAIL PROTECTED]>
wrote:
> On Aug 23, 2:33 am, Jeff Anderson <[EMAIL PROTECTED]> wrote:
>
> > There is no reason that you couldn't include multiple forms in an HTML
> > post operation. You just have to make sure that there won't end up being
> > duplicate fields across forms.
>
> In fact, there isn't even any reason to worry about that: just use a
> prefix when instantiating the 
> form.http://www.djangoproject.com/documentation/forms/#prefixes-for-forms
>
> --
> DR.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Composite Forms? Are widgets the right thing to use?

2008-08-22 Thread Jon Loyens

Hi all,

I have a sight where I need to generate forms that are made up of two
or three other forms.  For example I have New User sign up form that
accepts user information (user name, name, password), a shipping and a
billing address (with the same usual field) and credit card info.
Sometimes, I need a composite form with all of the above while
sometimes I need a  form with just a subset of the information.  As an
example, I'd like to define a series of forms like this:

CreditCardForm
- CardType = ChoiceField
- CardNumber = CharField
- CardExpiry = CharField

AddressForm
- StreetAddress = CharField
- City = CharField
- State = CharField

NewUserForm
- Username = CharField
- Password = CharField
- ShippingAddy = AddressForm
- BillinAddy = AddressForm

Is there a way to do this sort of thing with the Forms API?  I had
hope for FormSets but that's a more dynamic thing that I need which is
really a Composite form pattern.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: string indices must be integers error in admin - don't know where to start debugging

2008-07-08 Thread Jon Loyens

Problem solved.  Just need to copy in my local version of Django

On Jul 7, 6:29 pm, Jon Loyens <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
> I've got a problem and I don't even know where to start debugging
> it... there seems to be a difference between the way my app is
> behaving between my local environment and my deployment environment.
> Hopefully you guys can give me some idea where to start.
>
> I've written a small PR application that along with a story, publishes
> pictures and other files.  I've written models that look like this
> (this is all written on the trunk):
>
> class Story(models.Model):
>     title = models.CharField(max_length=100)
>     date = models.DateField()
>     slug = models.SlugField()
>     published = models.BooleanField()
>     body = models.TextField()
>
>     class Meta:
>         verbose_name_plural = "stories"
>         ordering = ['-date']
>         pass
>
>     def __str__(self):
>         return self.title.encode("utf-8")
>
>     class Admin:
>         list_display = ('title','date','slug',)
>         pass
>
> class Picture(models.Model):
>     image = models.ImageField(upload_to="photos")
>     date = models.DateField()
>     title = models.CharField(max_length=100, core=True)
>     caption = models.CharField(max_length=100, blank=True)
>     story = models.ForeignKey(Story, edit_inline=models.STACKED)
>
>     def __str__(self):
>         return self.title.encode("utf-8")
>
>     class Meta:
>         ordering = ['-date']
>         pass
>
> class Downloads(models.Model):
>     media = models.FileField(upload_to="downloads")
>     date = models.DateField()
>     title = models.CharField(max_length=100, core=True)
>     story = models.ForeignKey(Story, edit_inline=models.STACKED)
>
>     def __str__(self):
>         return self.title.encode("utf-8")
>
>     class Meta:
>         verbose_name_plural = "downloads"
>         ordering = ['-date']
>         pass
>
> This works great locally on my machine.  However, when I deploy on
> WebFaction (again using a django instance built from the trunk),
> everything appears to be fine until I edit a Story object in the Admin
> UI.  When I try and save any edits (no matter what field I edit), I
> get this error:
>
> Traceback:
> File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/core/
> handlers/base.py" in get_response
>   82.                 response = callback(request, *callback_args,
> **callback_kwargs)
> File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/contrib/
> admin/views/decorators.py" in _checklogin
>   62.             return view_func(request, *args, **kwargs)
> File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/views/
> decorators/cache.py" in _wrapped_view_func
>   44.         response = view_func(request, *args, **kwargs)
> File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/contrib/
> admin/views/main.py" in change_stage
>   338.             new_object = manipulator.save(new_data)
> File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/db/
> models/manipulators.py" in save
>   207.                                     f.save_file(rel_new_data,
> new_rel_obj, self.change and old_rel_obj or None, old_rel_obj is not
> None, rel=True)
> File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/db/
> models/fields/__init__.py" in save_file
>   933.         FileField.save_file(self, new_data, new_object,
> original_object, change, rel, save)
> File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/db/
> models/fields/__init__.py" in save_file
>   847.                 file_name = file['filename']
>
> Exception Type: TypeError at /admin/pr/story/1/
> Exception Value:stringindicesmust be integers
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



string indices must be integers error in admin - don't know where to start debugging

2008-07-07 Thread Jon Loyens

Hi everyone,

I've got a problem and I don't even know where to start debugging
it... there seems to be a difference between the way my app is
behaving between my local environment and my deployment environment.
Hopefully you guys can give me some idea where to start.

I've written a small PR application that along with a story, publishes
pictures and other files.  I've written models that look like this
(this is all written on the trunk):

class Story(models.Model):
title = models.CharField(max_length=100)
date = models.DateField()
slug = models.SlugField()
published = models.BooleanField()
body = models.TextField()

class Meta:
verbose_name_plural = "stories"
ordering = ['-date']
pass

def __str__(self):
return self.title.encode("utf-8")

class Admin:
list_display = ('title','date','slug',)
pass

class Picture(models.Model):
image = models.ImageField(upload_to="photos")
date = models.DateField()
title = models.CharField(max_length=100, core=True)
caption = models.CharField(max_length=100, blank=True)
story = models.ForeignKey(Story, edit_inline=models.STACKED)

def __str__(self):
return self.title.encode("utf-8")

class Meta:
ordering = ['-date']
pass


class Downloads(models.Model):
media = models.FileField(upload_to="downloads")
date = models.DateField()
title = models.CharField(max_length=100, core=True)
story = models.ForeignKey(Story, edit_inline=models.STACKED)

def __str__(self):
return self.title.encode("utf-8")

class Meta:
verbose_name_plural = "downloads"
ordering = ['-date']
pass

This works great locally on my machine.  However, when I deploy on
WebFaction (again using a django instance built from the trunk),
everything appears to be fine until I edit a Story object in the Admin
UI.  When I try and save any edits (no matter what field I edit), I
get this error:

Traceback:
File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/core/
handlers/base.py" in get_response
  82. response = callback(request, *callback_args,
**callback_kwargs)
File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/contrib/
admin/views/decorators.py" in _checklogin
  62. return view_func(request, *args, **kwargs)
File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/views/
decorators/cache.py" in _wrapped_view_func
  44. response = view_func(request, *args, **kwargs)
File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/contrib/
admin/views/main.py" in change_stage
  338. new_object = manipulator.save(new_data)
File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/db/
models/manipulators.py" in save
  207. f.save_file(rel_new_data,
new_rel_obj, self.change and old_rel_obj or None, old_rel_obj is not
None, rel=True)
File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/db/
models/fields/__init__.py" in save_file
  933. FileField.save_file(self, new_data, new_object,
original_object, change, rel, save)
File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/db/
models/fields/__init__.py" in save_file
  847. file_name = file['filename']

Exception Type: TypeError at /admin/pr/story/1/
Exception Value: string indices must be integers

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Admin page doesn't show calendar popup

2008-04-20 Thread Jon Loyens

Check that the localizations got installed when you installed .96.
This was a problem I had... the installer didn't install the admin
templates or any of the localization files and I had to copy them in
manually.

Jon.

On Apr 20, 10:53 am, sinker <[EMAIL PROTECTED]> wrote:
> Switching to trunk WORKED. Thank you so much!
>
> On Apr 19, 7:42 am, Polat Tuzla <[EMAIL PROTECTED]> wrote:
>
> > I got the same problem with the version 96.1 on Mac.
> > Then switched to trunk and everything went OK.
> > Unfortunately can't tell you why this happened, as I did not bother to
> > investigate the problem further.
> > Just switch to using trunk if that suits you, and you will have the
> > calendar pop ups.
>
> > On Mar 30, 8:39 am, Hoolio <[EMAIL PROTECTED]> wrote:
>
> > > I just installed Django 96.1 on my Mac.  When I follow the tutorial
> > > and get to the Admin page, the calendar pop ups don't show up.  Is
> > > there a problem with the install.  I'm using Leopard.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



obfuscating form fields in templates and admin

2008-04-20 Thread Jon Loyens

Hi all,

I'm working on an application where a user has an a special number
assigned to them.  This account number must be editable both by the
user and in admin.  I want the number to be obfuscated in the form
when it is initially displayed but then when overwritten by a customer
service rep (in admin) or a user (in the public gui) un obfuscated
data is displayed.

This problem I'm working on is extremely similar to when a site only
shows you the last four digits of the credit card you have on file
with them and replaces the first 12 digits with *'s.  Then you can
enter a new credit number and it overwrite the stars and submit a new
number.

The key here is that I have to do this for both admin and templates.
I guess what I'd really like to do is inject some sort of class that
when this string is retrieved for display in a form, it displays a
special string.

Thanks for your ideas in advance,

Jon.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---