You could try encoding the data in your view - something like:
try:
cleandata = rawinput.encode("iso-8859-1", "ignore") or 'Unknown data
type'
except:
# Whatever you want here
pass
Just an option. Also depends on what you need to capture and return to
users. I too deal with odd encodings.
On
This is something I'd wondered as well, since I have a photo gallery,
and would like to do mass imports/updates - instead of going through
all my photos one-by-one, display a thumbnail and a set of fields to
modify for each one - one gallery at a time.
...I eventually just wrote my own edit-multi
On 16-Nov-07, at 12:34 AM, Joel Hooks wrote:
> My users are cutting and pasting descriptions from Word, and this
> causes HTTP 500 errors with Django AMF (but not Django more broadly.)
if your users are cutting and pasting from word, you could use
tiny_mce to sanitise the pastes. It may be ea
Le 14.11.2007 18:03,, le perspicace hass s'exprimait en ces termes:
> that's a very bold move.
>
> I'd say that if you can't estimate the time required, you're not ready
> to take on that project.
You may be right…
> But you've got to start somewhere,
You're definitly rigth ;-)
> good luck wi
Thanks to all the proposal authors so far, we have received lots of
proposals for PyCon talks & tutorials. But we'd like to have even
more. Alas, the proposal submission deadline should have been set
after a weekend, not before. So we have decided to extend the proposal
submission deadline to Mo
I have released my code for a private message system.
It's quite powerful, the functions are all displayed in the templates.
For example, if you don't want to have message history in the read
view, just remove it in the templates. Django is really smart and
won't trigger the SQL queries if it do
Hey
has anyone made or see a uml diagram of the django framework. (a link
with a good description of the framework would help as well)
I would like to use this info, to try to make an app with which I can
model a django project (using uml)
thanks
Stephane
--~--~-~--~~~-
I've added it, line 228
On Nov 16, 3:32 pm, Samuel Adam <[EMAIL PROTECTED]> wrote:
> I've been hacking some filtering for related managers, have a look at
> the BoxManager
> here:http://django-pm.googlecode.com/svn/trunk/myproject/pm/models.py
>
> My app misses the user.inbox.new() feature, i wi
On Nov 16, 12:01 am, Matt McClanahan <[EMAIL PROTECTED]>
wrote:
> On Nov 15, 8:51 pm, Steve Potter <[EMAIL PROTECTED]> wrote:
>
> > It just seem that there should be a better way of doing this. I was
> > thinking about a method that would perform the test for me and return
> > either the conte
Hi,
my has a lot of input widgets which are build from several newform.form
instances.
If I want to test the form with client.post(), I need to pass all values of
the input fields in a dictionary, even if I just want to modify one value.
It would be nice if I could get all initial values in
Marty Alchin wrote:
> My first question would be: Are you absolutely certain that none of
> those 1000 other people will ever need a login?
anything is possible.
I would think at some point it isn't a good idea to use the User table. What
if
it was 1,000,000 names, like if I was publishing a
The user table has first/last name. great. I need to manage about 1500
people,
and only 500 will have any need for a site login. So where should I store the
1000 names that don't need to be a user record?
I can think of:
Everyone gets a User record. (given this is the easiest, what prob
Hello,
Can anyone tell me if it is possible to access logged user instance
inside a model method, like save() is?
I need to rewrite save() method, so I should have some automatic
triggers on model.save(), and use information inside
user.groups.all().
Ta,
DanB
--~--~-~--~~--
Chris Hoeppner wrote:
> Well, just to know. What are you using? This should also be useful for
> my "little" project, the django deployer, still unnamed.
I had the most frustration with a software in recent memory trying to use
lighttpd. Config syntax was utterly weird and the docs conflicted wi
On 16-Nov-07, at 10:04 AM, Ramdas S wrote:
> What exactly do you mean by sanitize. The biggest problem is word
> users do is they cut and paste stuff into the text area boxes, and
> even tiny_mce is not of much help.
the whole idea behind tiny_mce is that it converts word/excel etc to
htm
You need to create your own 500.html template. It may not be listed
in the install/setup but it is mentioned in the full docs:
http://www.djangoproject.com/documentation/0.96/request_response/#the-500-server-error-view
If you're just starting out, though, I'd recommend getting up and
running wi
On Nov 16, 2007 7:41 AM, Tim Chase <[EMAIL PROTECTED]> wrote:
> - how to mark a field as redacted
My thought here would be to use some kind of modifier function that
you can wrap around a model's Fields.
fromo django.db import models
from redaction import redact
class Person(models.Model):
I've been hacking some filtering for related managers, have a look at
the BoxManager here:
http://django-pm.googlecode.com/svn/trunk/myproject/pm/models.py
My app misses the user.inbox.new() feature, i will add it soon. :)
On Nov 16, 2:18 pm, "Tomi Pieviläinen" <[EMAIL PROTECTED]> wrote:
> Hi gr
Have the "is_active" field of the User model set to False for the
users that don't need a login.
The auth login will raise an error if an inactive user tries to log
in.
Always try to use what is there.
On Nov 16, 3:02 pm, Carl Karsten <[EMAIL PROTECTED]> wrote:
> The user table has first/last n
Hi group,
Is it possible to have custom filtering methods for MTMManagers? More
precisely I'd like to be able to use user.received_messages.new in my
templates. I can define a custom manager for my Message model with a
custom new method, but unfortunately this returns all new messages in
the syst
El jue, 15-11-2007 a las 12:42 -0800, RajeshD escribió:
> > Well, just to know. What are you using? This should also be useful for
> > my "little" project, the django deployer, still unnamed.
>
> I've been using Lighttpd + FCGI on Joyent containers (my favorite
> production deployment enviroment
2007/11/16, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>
>
> Le 14.11.2007 18:03,, le perspicace hass s'exprimait en ces termes:
> > that's a very bold move.
> >
> > I'd say that if you can't estimate the time required, you're not ready
> > to take on that project.
> You may be right…
>
> > But you've
Responding to myself:
I choosed solution 2 (parse HTML form) with the help of ClientForm:
http://www.djangosnippets.org/snippets/467/
Comments welcome
Am Freitag, 16. November 2007 13:03 schrieb Thomas Guettler:
> Hi,
>
> my has a lot of input widgets which are build from several
> newform.f
I've been playing around with some ideas and was hoping to get
feedback about what the "right" sort of way to do it would be
(the Django analog to "Pythonic").
Various models have sensitive fields associated with them that
should only be available to a template if the requester is on a
"secure" c
I have the following structure:
myproj/core/
myproj/core/__init__.py
myproj/core/management/
myproj/core/management/__init__.py
myproj/core/management/commands/
myproj/core/management/commands/__init__.py
myproj/core/management/commands/populate.py
On Win32, when I am in the project's directory
Could you do something like a wrapper object in your view before it
hits the context? The wrapper below relies on a field list, but you
could easily have it inspect the Meta class on the model and build the
list.
class RedWrap(object):
def __init__(self,restrict,obj,attrlist=[]):
Thanks.
Just for future reference I found this on the net:
http://chandlerproject.org/bin/view/Projects/MeTooCrypto
_LR_
On Nov 16, 1:43 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Thu, 2007-11-15 at 17:21 -0800, [EMAIL PROTECTED] wrote:
> > Hello,
>
> > Is it possible to digitally
> Could you do something like a wrapper object in your view before it
> hits the context? The wrapper below relies on a field list, but you
> could easily have it inspect the Meta class on the model and build the
> list.
This is a nice sort of idea. Is there a way to expand it from an
individua
I'd love to know if there is a better method, but this is the best I
could come up with... pretty much the same thing you are doing, but
forcing the view functions to call 'import_feed' which can only load a
restricted set of modules.
AVAILABLE_FEEDS =
{'columbia':'columbia.search','glvar':'glvar
Want more info ?
Create a profile model and tie it to the user in settings.py:
AUTH_PROFILE_MODULE = 'profile.UserProfile'
Then you can use
user.get_profile().phone_number for example.
http://www.b-list.org/weblog/2006/jun/06/django-tips-extending-user-model/
When i started using Django i made
On 16-Nov-07, at 11:14 AM, bdixon wrote:
> t = loader.get_template(template_name) # You need to create a
> 500.html template.
it is not mac specific, look at the line above
--
regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/
--~--~-~--~~~---
Hello,
In a view, I have:
from app.models import something
def my_view( request, mod_name ):
m = __import__('app.models',globals(),locals(),['something'] )
Now I'd like to do:
items = m.filter( ... )
for item in items:
...
What I need is to load a model dynamically and then use
Hi all,
Yes, I realize that maybe this should go to the mod_python list instead,
but I wanted to rule Django out first. Here's my configuration, with
Apache2 on Linux (sorry I couldn't make this shorter):
I've got four Django sites I host under different domain names, which
are actually all iden
I also faced this problem, i have a rolled-out site, using the
allow_tags method to do a critical mission in a customized admin site.
regards,
Arnold
On Nov 16, 3:34 am, wowar <[EMAIL PROTECTED]> wrote:
> Today, after updating django to revision 6678 method 'allow_tags'
> doesn't work. Despite i
Is there a way to specify the location of gdal et. al.?
On OS X, using MacPorts, ctypes doesn't look in /opt/local/lib unless
you set LD_LIBRARY_PATH. On Ubuntu Feisty, the gdal package uses a
weird naming convention and isn't found. Is it possible to specify
these library locations in settings.p
hi,
could you remove wilsonlau from the list - his mail box is full
again, and I get a bounce from his mailbox every time I send a mail
to the list
--
regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/
--~--~-~--~~~---~--~~
You received
http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser
On 16 нояб, 20:07, "Dan-Cristian Bogos" <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Can anyone tell me if it is possible to access logged user instance
> inside a model method, like save() is?
>
> I need to rewrite save() method, so I sho
> Today, after updating django to revision 6678 method 'allow_tags'
> doesn't work. Despite it is set to True I've got html code.
mark_safe() is a solution e.g.
from django.utils.safestring import mark_safe
class Ewidencja(models.Model):
...
data_przyjecia = models.DateField('data przyj
Dear All,
Please see this petition by clicking on the following link,
http://www.Petition Online.com/ freepakn/ petition. html
If you agree all or part of it, please sign and feel free to make
comments. What we have done or not done to deserve this.
regards
Riaz Ahmed
--~--~-~--~---
My first question would be: Are you absolutely certain that none of
those 1000 other people will ever need a login?
Basically, if any of those users would ever need to be promoted to
login status, the User model is your best bet. As Samuel mentioned,
just set "is_active" to False and probably set
I am trying to use variable(path) and string(file name) in ssi or
include tags.
In template:
{{dir}}file.html
Prints:
/dir/file.html
but..
How to do: {% include /dir/file.html %}
using {{dir}} variable and string in include or ssi tag?
--~--~-~--~~~---~--~~
You r
I am currently working with a form persistent identifiers. As part of
the persistent system, users can add '?' to the end of the urls to
receive a data-only view of the digital object they are trying to link
to via the persistent identifier, such as this:
Normal view: http://ark.cdlib.org/ark:/130
This is New program Send Big File Fast and Easy
Send, Receive and Track files with YouSendIt.
apply for free. be urgent , there is the time limits.
Get Free Code: Limited Time Only!
http://www.tkqlhce.com/click-2667396-10501907
--~--~-~--~~~---~--~~
You received t
i am trying to learn jquery + django so a very easy example would be
very useful :)
thx..
ash
On Nov 8, 5:52 pm, Brian Costlow <[EMAIL PROTECTED]> wrote:
> Just thought I'd pass this along. I've been lurking about learning as
> I work on a couple of Django-based projects, and thought it was time
On Nov 16, 9:49 pm, bfrederi <[EMAIL PROTECTED]> wrote:
> I am currently working with a form persistent identifiers. As part of
> the persistent system, users can add '?' to the end of the urls to
> receive a data-only view of the digital object they are trying to link
> to via the persistent iden
Thanks a lot! get _model works.
Only one thing, I've been reading the code in te file django/db/models/
loading.py and I don't understand how it works, and now I need to know
or I won't sleep :-)
What should I do to reference stuff?
app = __import__('app_name',{},{},['models'])
mods = getattr(ap
> Can the username be Null?
>From the help text on username attr:
"Required. 30 characters or fewer. Alphanumeric characters only
(letters, digits and underscores)."
> What if it was 1,000,000 names, like if I was publishing a phone book?
Then using the user model, which does keep track of a lot
I figured out this code to get the permissions of a dynamic module:
def my_view( request ):
...
app_label = module._meta.app_label
add_p = app_label+'.'+module._meta.get_add_permission()
chg_p = app_label+'.'+module._meta.get_change_permission()
del_p = app_label+'.'+module._m
On Nov 16, 2007 8:18 PM, Grupo Django <[EMAIL PROTECTED]> wrote:
>
> Thanks a lot! get _model works.
> Only one thing, I've been reading the code in te file django/db/models/
> loading.py and I don't understand how it works, and now I need to know
> or I won't sleep :-)
>
> What should I do to ref
Can you please create a simple example.
Maybe you could post it on:
http://www.djangosnippets.org/
When you have it online please let me know.
Best reagards,
Luís
On Nov 8, 4:52 pm, Brian Costlow <[EMAIL PROTECTED]> wrote:
> Just thought I'd pass this along. I've been lurking about learning
On Thu, 2007-11-15 at 23:50 -0800, timbu wrote:
> I am trying to use variable(path) and string(file name) in ssi or
> include tags.
>
> In template:
> {{dir}}file.html
> Prints:
> /dir/file.html
> but..
> How to do: {% include /dir/file.html %}
> using {{dir}} variable and string in include or s
On Fri, 2007-11-16 at 17:22 +0530, Kenneth Gonsalves wrote:
> hi,
> could you remove wilsonlau from the list - his mail box is full
> again, and I get a bounce from his mailbox every time I send a mail
> to the list
It's not really a good idea to involuntarily unsubscribe somebody
(unless th
On 17-Nov-07, at 7:38 AM, Malcolm Tredinnick wrote:
>> hi,
>> could you remove wilsonlau from the list - his mail box is full
>> again, and I get a bounce from his mailbox every time I send a mail
>> to the list
>
> It's not really a good idea to involuntarily unsubscribe somebody
> (unless they
On Nov 17, 6:07 am, Steve Freitas <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Yes, I realize that maybe this should go to the mod_python list instead,
> but I wanted to rule Django out first. Here's my configuration, with
> Apache2 on Linux (sorry I couldn't make this shorter):
>
> I've got four Djan
On Nov 16, 11:56 pm, Daniel Roseman <[EMAIL PROTECTED]>
wrote:
> On Nov 16, 9:49 pm, bfrederi <[EMAIL PROTECTED]> wrote:
>
> > I am currently working with a form persistent identifiers. As part of
> > the persistent system, users can add '?' to the end of the urls to
> > receive a data-only view
On Fri, 2007-11-16 at 19:04 -0800, [EMAIL PROTECTED] wrote:
[...]
> Is there a way to have access to exactly the url used for the request?
See http://www.djangoproject.com/documentation/request_response/#methods
Looking at the documentation for the "request" object would seem to be
an obvious f
On Nov 17, 4:15 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Fri, 2007-11-16 at 19:04 -0800, [EMAIL PROTECTED] wrote:
>
> [...]
>
> > Is there a way to have access to exactly the url used for the request?
>
> Seehttp://www.djangoproject.com/documentation/request_response/#methods
>
> L
On Fri, 2007-11-16 at 19:19 -0800, [EMAIL PROTECTED] wrote:
>
>
> On Nov 17, 4:15 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
> wrote:
> > On Fri, 2007-11-16 at 19:04 -0800, [EMAIL PROTECTED] wrote:
> >
> > [...]
> >
> > > Is there a way to have access to exactly the url used for the request?
>
I've been writing a Django app at work using Windows XP and Apache.
Everything works fine. When I bring the project home to run on
Ubuntu, I'm having trouble getting Apache configured. I've worked on
this problem for about a month but can't seem to get it resolved. It
appears to be fairly commo
On Nov 17, 2007 12:24 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Obviously "mydomain" has been replaced as not to publish my domain
> name. As you can see in the exception, sys.path includes the location
> of my app. It still doesn't appear to find settings.py.
Make sure www-data can re
On Fri, 2007-11-16 at 18:55 -0800, Graham Dumpleton wrote:
> Python leaks environment variables between sub interpreters in certain
> circumstances based on the order in which the sub interpreters are
> created.
>
> It is described a bit in section 'Application Environment Variables'
> of:
>
>
61 matches
Mail list logo