Kenneth Gonsalves wrote:
>> when I do "svn diff" the pyc-files are still listed.
>> guess I have to delete that files from the repository first. right?
>
> svn remove will delete the files on the next commit
adding things to global-ignores does *not* affect files that are already
checked in.
On 11/30/06, Rob Hudson <[EMAIL PROTECTED]> wrote:
>
>
> I think for those who need aggregate data these would cover a lot of
> ground. I'd be willing to work on a patch if this is considered
> generally useful and we can work out what the API should look like.
>
>
1 - I'm agreed on the need for e
> On Behalf Of Aidas Bendoraitis
> I guess, this query may help you:
> ALTER DATABASE `yourdatabase` DEFAULT CHARACTER SET utf8
> COLLATE utf8_general_ci
So that's how to do it.
Thanks!
Regards,
Ryan Ginstrom
--~--~-~--~~~---~--~~
You received this message be
On 11/29/06, Mikko Suniala <[EMAIL PROTECTED]> wrote:
>
>
> I did a quick search but found nothing about this issue. I have splitted
> my models across multiple files as described in
> http://code.djangoproject.com/wiki/CookBookSplitModelsToFiles. The manager
> action "sqlinitialdata" did not seem
On 11/29/06, conrad22 <[EMAIL PROTECTED]> wrote:
> eg. I have the following error appearing, instead of the object:
>
> django.db.models.fields.related.ManyRelatedManager object
What you're missing is the 'all()' at the end.
Your example is a little confusing - the model Category should have an
I am trying to use a customer manipulator to build a search screen. One
of my
fields is a select field but I get an error to many values to unpack.
Any help would be greatly appreciated.
views.py
class SearchResults(forms.Manipulator):
def __init__(self):
projects = ['Gen2', 'CRMC']
I am working on a church site that will have multiple areas. There will
be pages for each of the different ministries like music, singles,
students, etc. I am wanting a blog like function for each of these
pages where the responsible people will be able to log in to the admin
site and add news to
I am working on a church site that will have multiple areas. There will
be pages for each of the different ministries like music, singles,
students, etc. I am wanting a blog like function for each of these
pages where the responsible people will be able to log in to the admin
site and add news to t
On 11/29/06, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
> add leaving out '()' in a function without arguments and you are done
Nah, I don't do enough Ruby to get into that habit. Besides, my free
time these days (free time! Ha!) is mostly spent playing with Lisp
(and a little OCaml), which mea
On 30-Nov-06, at 1:04 AM, James Bennett wrote:
> I leave off * and ** by accident all the time. That and commas in
> single-element tuples are probably 90% of the stupid Python mistakes I
> make.
add leaving out '()' in a function without arguments and you are done
--
regards
kg
http://lawgo
On 30-Nov-06, at 12:19 AM, patrick k. wrote:
> hmm, that doesn´t really change anything.
>
> when I do "svn diff" the pyc-files are still listed.
> guess I have to delete that files from the repository first. right?
svn remove will delete the files on the next commit
--
regards
kg
http://law
On Nov 29, 2:30 pm, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote:
> > I needed aggregates. (I also learned about data bubbles and redesigned
> > my tables to include them as necessary. This redesign eliminated almost
> > all of my needs for an aggregate function interface.)Whatsa data bubble?
> >
Hello, is there a way to force the django db model to load all fields
for a particular model _including_ any generic foreign keys (it doesn't
seem to do this by default).
Currently: Account.objects.select_related() will load all 'simple'
fields like IntegerField, CharField, etc, but not GenericFo
Hi all
I ve got situation like this, I 'm writing a photograph's gallery where
photo should be stored on disk in folders like this
\\\
At the moment of creation Photo object I know album that foto belongs
to and I know the photographer but I can't to implement path to
upload_to option.
How to do t
Sorry, that was a stupid question, context['request'].session contains
the session.
--~--~-~--~~~---~--~~
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@googlegrou
Rob Hudson wrote:
> Yes, I guess I should have said "And tell subversion to ignore them."
if you read the original message again, you'll notice that the OP had
already done that.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to t
[EMAIL PROTECTED] wrote:
> I am using this code to parse a datetime supplied by magnolia's api
> into a valid Python DateTime:
>
> datetime(*(time.strptime(link("created").replace("-08:00",
> "").replace("-07:00", ""), "%Y-%m-%dT%H:%M:%S")[0:6]))
note that local variables are very cheap in Pytho
On 11/29/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> How could I alter this so that it adds 8 hours onto the datetime before
> storing it in the db?
datetime.timedelta.
Sample code:
>>> import datetime
>>> dt = datetime.datetime.now()
>>> dt
datetime.datetime(2006, 11, 29, 16, 7, 49, 953
Hey Everyone,
I am using this code to parse a datetime supplied by magnolia's api
into a valid Python DateTime:
datetime(*(time.strptime(link("created").replace("-08:00",
"").replace("-07:00", ""), "%Y-%m-%dT%H:%M:%S")[0:6]))
How could I alter this so that it adds 8 hours onto the datetime befo
But how do you access the session dictionary from a templatetag?
--~--~-~--~~~---~--~~
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 unsubscri
I'm writing an application form, an application for a workshop. User
registration is required and people can start and continue the
application process, essential create and edit their application data
until the deadline is reached. The form is just one part of a web
site, and it has 70 or so fi
Hi,
I'm developing a site locally, and managing its code and static data
in a subversion repository. I also have it running on a real apache
server on the web with mod_python, but I don't want to login to the
server, restart, etc. every time I check something in. I've got a
post-commit hook al
I can't run manage.py shell... can't run manage.py anything without it
throwing the importError.
I printed sys.path and didn't see anything odd, but I don't really know
what I'd be looking for. Here's what I get:
['', '/home2/baxter/lib/python2.4',
'/usr/local/lib/python2.4/site-packages/setuptoo
> I needed aggregates. (I also learned about data bubbles and redesigned
> my tables to include them as necessary. This redesign eliminated almost
> all of my needs for an aggregate function interface.)
Whatsa data bubble? Google and Wikipedia don't seem to know...
--~--~-~--~~-
I'd start with "manage.py shell" and "import sys; print sys.path" to
look for anything unusual.
-jag
On Tue, 2006-11-28 at 21:19 +, [EMAIL PROTECTED] wrote:
> Yup... like I said, the models and templates and all appear to see it
> no problem. It's looks like it's just manage.py that's not se
patrick k. wrote:
> when I do "svn diff" the pyc-files are still listed.
> guess I have to delete that files from the repository first. right?
Yes, I guess I should have said "And tell subversion to ignore them."
Once you set Subversion to ignore *.pyc, they won't be added anymore.
But if you cu
I am finding that the following intermediate step is required.
Comp=Promo.competition
This changes the class from Promotion to Competition and I can then
make the changes
Comp.total_value=3000
Comp.save()
However, I'm no wiser why the earlier solution by Jacob is not working
for me. Intuitivel
Anyone? I'm wondering if it's a pythonpath issue, but don't really know
how to check (or fix).
I found one thread that suggested adding the project to sys.path within
manage.py, but that didn't help.
--~--~-~--~~~---~--~~
You received this message because you ar
On 11/29/06, Bill de hOra <[EMAIL PROTECTED]> wrote:
> I was passing it in without the **; arrhhh
:)
I leave off * and ** by accident all the time. That and commas in
single-element tuples are probably 90% of the stupid Python mistakes I
make.
--
"May the forces of evil become confuse
On 11/29/06, Clint74 <[EMAIL PROTECTED]> wrote:
> I will try this approach.
Take a look at the view 'django.contrib.auth.views.password_reset',
which should do what you need.
--
"May the forces of evil become confused on the way to your house."
-- George Carlin
--~--~-~--~~--
On Nov 29, 2006, at 10:50 AM, Clint74 wrote:
>
> Hi,
>
> I need to send the password to the user(email), but how recover the
> raw
> password once the database stores in this format:
>
> hashType$salt$hash
> sha1$6070e$d3a0c5d565deb4318ed607be9706a98535ec7968
You cannot recover the password on
James Bennett wrote:
> Doing NodeEvent.objects.filter(**kwargs) should work
^^
I was passing it in without the **; arrhhh
anyway this the idiom I ended up with for a different model:
[[[
if request.has_key('q'): # GET form
new_data = reques
On 11/29/06, Clint74 <[EMAIL PROTECTED]> wrote:
> I need to send the password to the user(email), but how recover the raw
> password once the database stores in this format:
It's not possible to recover the original password once it's been
hashed and stored. Django does provide password reset fun
> One generally has a facility to reset the password by
> ...
> The user can then log in with the new password,
> and be directed to change it to a known password.
I will try this approach.
Thanks everybody
--~--~-~--~~~---~--~~
You received this message becaus
Thank´s Jacob,
I missed something indeed.
Regards
--~--~-~--~~~---~--~~
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
On 11/29/06, Clint74 <[EMAIL PROTECTED]> wrote:
> I need to send the password to the user(email), but how recover the raw
> password once the database stores in this format:
>
> hashType$salt$hash
> sha1$6070e$d3a0c5d565deb4318ed607be9706a98535ec7968
You can't, and that's the point of storing a s
On 11/29/06 12:50 PM, Clint74 wrote:
> I need to send the password to the user(email), but how recover the raw
> password once the database stores in this format:
You can't; that's the point of hashing it. The right (read: secure) way to
deal with this is to *reset* the user's password (usually
You cannot retrieve the raw password, that's the whole point of hashing it :)
If you want to store the raw password somewhere, make a raw_password
field and store it there, although your users might not be too happy
that you're storing their passwords in an easily pilfered format.
Clint
On 11/29
I created such a patch last spring during the Django sprint at PyCon.
The basic interface was very straightforward but there was also a
slightly less straightforward interface option that allowed for
grouping and so forth. The patch was discarded, however, since some of
the core Django developers
> I need to send the password to the user(email), but how
recover the raw
> password once the database stores in this format:
>
> hashType$salt$hash
> sha1$6070e$d3a0c5d565deb4318ed607be9706a98535ec7968
Hashing is generally a one-way process (like making hamburger out
of cow) that prevents f
hmm, that doesn´t really change anything.
when I do "svn diff" the pyc-files are still listed.
guess I have to delete that files from the repository first. right?
thanks,
patrick
Am 29.11.2006 um 18:42 schrieb Rob Hudson:
>
> Or tell Subversion to ignore them.
>
> You should have a file: ~/.su
not possible, I think.
solutions:
1. send the password before you save the user
2. store the raw password somewhere (not so good)
patrick
Am 29.11.2006 um 19:50 schrieb Clint74:
>
> Hi,
>
> I need to send the password to the user(email), but how recover the
> raw
> password once the database
Jacob,
I had tried that, but it's not working for me.I get the following:-
Promo=Promotion.objects.get(id=1)
Promo.competition.total_value
>> 2000
Promo.competition.total_value=3000
Promo.competition.save()
Promo.competition.total_value
>> 2000
I must be doing something stupid, but can't se
Hi,
I need to send the password to the user(email), but how recover the raw
password once the database stores in this format:
hashType$salt$hash
sha1$6070e$d3a0c5d565deb4318ed607be9706a98535ec7968
Tk´s
André Duarte
--~--~-~--~~~---~--~~
You received this mess
I don't know if this helps, or is exactly what your trying to avoid,
but I've done something like this before (based on your example):
if use_sources:
qSource = Q(source_time__range=(start_date, end_date))
else:
qSource = Q(id__gt=0)
if use_level:
qLevel = Q(level__exact=level)
else:
On 11/29/06 11:31 AM, MerMer wrote:
> However, I can't work out how to save a different value to the field
> using something like
>
> Promotion.competition.total_value=3000
Promotion.competition.save()
Jacob
--~--~-~--~~~---~--~~
You received this message beca
Hello!
I am writing small app for online library with full text seach. I have
all books (less than 25) in html files for every chapter with only
and tags, filenames look like book1-4.html and so on. Can
somebody suggeest how models.py should looks? Should I insert chapters
to database or keep i
Or tell Subversion to ignore them.
You should have a file: ~/.subversion/config (on Mac or Linux, not sure
where it is on Windows)
In that file under the header "[miscellany]" there's a "global-ignores"
setting. Just add *.pyc to that list.
-Rob
--~--~-~--~~~---~-
I was able to save a record like so...
Promotion.total_value=2000
Promotion.save()
However, I recently moveed the "total_value" field into another model
which has a OneToOne relationship with the Promotion Model.
Know I can access total_value like so:-
Promotion.competition.total_value
>> 2000
On 11/29/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> After much googling, I found that if there is no data in the tables, it
> produces a 404 error.
That's not quite correct; if there's nothing which matches the
conditions of the QuerySet you pass to the generic view, and if the
'allow_emp
On 11/29/06, Bill de hOra <[EMAIL PROTECTED]> wrote:
> something like this:
>
> [[[
> if use_sources:
>kwargs['sources']= request.GET.getlist('sources')
> if use_level:
>kwargs['level'] =request.GET['level']
> ...
> results = NodeEvent.objects.filter(kwargs)
> ]]]
Doing NodeEvent.objects
Hi,
Suppose you have 2 fields in a query form, both of which are optional.
Is there an idiom for building a dictionary to pass into
objects.filter() instead of checking the permutations?
eg instead of crazy stuff like this:
[[[
if use_sources and use_level:
results = NodeEvent.object
thanks.
Am 29.11.2006 um 17:51 schrieb Marcin Jurczuk:
>
> find . -name '*pyc' |xargs svn delete
> to delete them:
> find . -name '*pyc"|xargs rm -f
>
>
> >
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django
In another thread I wrote the following in regards to how to get the
average for a field:
> Could we educate ourselves on how other frameworks are solving this same
> problem and maybe that will lead us to a solution?
A quick look at ActiveRecord brings up ActiveRecord::Calculations:
http://api.r
in my svn-repository, I´m having *.pyc-files.
question is: how do I get rid of these files?
global-ignores is set to *.pyc now (after initial import and some
changes).
do I have to manually delete the pyc-files?
since my svn-repos is django-related I dare to ask.
thanks,
patrick
--~--~--
Derek Hoy wrote:
> For your application, you could have a simple Scale model, with a
> field for the xml definition, to give you complete flexibility, then
> build the forms using the scales, and just save a generic data-point
> with the scale id and a value.
Well, to tell you the truth, I did no
> Yep, you want to use the Cache-Control HTTP directive [1]. More
> specifically, you probably want to set `no_cache=True` to force
> browsers to never cache that page.
>
> [1]:
> http://www.djangoproject.com/documentation/cache/#controlling-cache-using-other-headers
>
Thank you for your tip
find . -name '*pyc' |xargs svn delete
to delete them:
find . -name '*pyc"|xargs rm -f
--~--~-~--~~~---~--~~
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@googlegr
After much googling, I found that if there is no data in the tables, it
produces a 404 error.
I added some data, and sure enough, everything worked fine. So, that
was my problem with that. :-(
As for other problems, I agree, there is a lot of info that is
displayed...but I guess I just don't k
I am hoping some of you can give me a little start as to where I can
read how to alter some of the admin pages.
I have a a Person class in my model and I want to change both the view
of people plus I want to change the form page where people are added
and deleted.
Any links or examples or tutori
Greetings,
I did a quick search but found nothing about this issue. I have splitted
my models across multiple files as described in
http://code.djangoproject.com/wiki/CookBookSplitModelsToFiles. The manager
action "sqlinitialdata" did not seem to find my sql files. After some
investigation I
I don't think manage.py does much with the path, since the
INSTALLED_APPS are given in Python package path syntax, and therefore
must be resolvable on the PYTHONPATH (ie, no additional information is
given for paths). The only thing I've noticed that it may twiddle is
adding the directory contain
On 11/29/06, Michal <[EMAIL PROTECTED]> wrote:
>
> Hello,
> I have problems with Opera browser and caching.
>
> I have URL /prihlaseni/.
> If user isn't logged, I give him html form for login.
> If user is already logged, I give him only text message, that inform him
> about this state, together w
I actually just tried that, but I'm getting import errors. Probably
because I am importing from myapp.something.module..
Putting code in settings.py just seems dodgy.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Actually, no. That didn't really work. Now manage.py seems even more
confused.
--~--~-~--~~~---~--~~
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.co
Aah. It is because of this chicken and egg scenario.. manage.py adds
your project's dir to the path after it imports your settings module.
So when the settings module is being imported your project is not in
the path yet, so you cannot import from
myproject.some_package.some_module..
I now added
Le Roux Bodenstein wrote:
> Surely if I put it
> in a model or a view or whatever somewhere it will only be called the
> first time that module gets loaded?
The settings module is always imported so you can import your handling
code there and put dispatch.connect beside the handling code.
--~--
Hi
I want to implement some custom caching stuff, so I want to capture
_all_ post_save signals.
Where is the best place to call dispatcher.connect? Surely if I put it
in a model or a view or whatever somewhere it will only be called the
first time that module gets loaded?
Basically I'm asking i
Turns out it WASN'T the state field... it was the fact that once the
state was present, my geolocating script kicked in on page load and
tried to get a geocode for the address.
That makes a lot more sense.
--~--~-~--~~~---~--~~
You received this message because
Thanks Antonio.
This does not directly solve my problem (linked to an old PHP reflex by the
way), but I'll definitely have a look as it may come in handy later.
I see no 'magic' answer to my problem, and looking at the function
django.contrib.auth.logout(), it's not that hard to wrap around it.
ie what is the simplest way to call the categories that have been
selected for each organisation ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-u
Ah ha! I've had a thought..could I use a custom Manager to predefine
the query and then call in the template? In which case, how would a
write a query set for the manager that only returns those categories
that an organisation has selected?
--~--~-~--~~~---~--~~
Opera's cache is very agressive. I use Opera for almost all of my
internet browsing and I've never met a form that isn't shown again
(with its field's content intact!) when "backing", either pressing the
arrow or using mouse gestures, even when caching is completely
disabled (in preferences, "al
I have a similar solution/problem...
Firstly, my "solution" was to create a method in my vews.py like this...
def my_render(request, template, dict):
url_time = 0
try:
for query in connection.queries:
log( query['time'] + "\t" + query['sql'
On 29-Nov-06, at 3:44 PM, [EMAIL PROTECTED] wrote:
> I have a template for my index page, I know the path is valid, but I
> get a
> Using loader django.template.loaders.filesystem.load_template_source
give the full error message
--
regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpl
I have a problem I can't talk in a huge ammount of details about.
I have a template for my index page, I know the path is valid, but I
get a
Using loader django.template.loaders.filesystem.load_template_source
(file does not exist).
The permissions are giving group access to www and full access.
very good info thank you. I knew i had seen it i just couldn't remember
where.
--~--~-~--~~~---~--~~
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.co
I guess, this query may help you:
ALTER DATABASE `yourdatabase` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci
Regards,
Aidas Bendoraitis [aka Archatas]
On 11/29/06, Ryan Ginstrom <[EMAIL PROTECTED]> wrote:
>
> Thanks a lot for the tips. I was able to find a somewhat hackish solution.
>
>
Hi,
> > I suspect you hit one small Django controversy. The generic view
> > object_list would give you 404 error when the list it tries to show is
> > empty. The view is there, it works, finds the list -- all is Ok. It just
> > has this strange behavior by default. To overcome it you can add
> >
Hello,
I have problems with Opera browser and caching.
I have URL /prihlaseni/.
If user isn't logged, I give him html form for login.
If user is already logged, I give him only text message, that inform him
about this state, together with link to logout.
So, one URL, but two different content (
Please allow a pure newbie to ask a couple questions . . . read in
Ivan Sagalaev wrote:
> [EMAIL PROTECTED] wrote:
> > Now with django, I am trying to run through the "Are you generic"
> > tutorial. When I go out to the URL, I get a 404 "Page not found"
> > message, but absolutely no more in
81 matches
Mail list logo