request.user.message_set.create(message="Your playlist was added
successfully.")
The docs (http://docs.djangoproject.com/en/dev/topics/auth/#messages)
say
"Finally, note that this messages framework only works with users in
the user database. To send messages to anonymous users, use the
session f
On Mon, Oct 26, 2009 at 9:37 AM, Jeffrey Taggarty wrote:
>
> Hello,
>
> I have a web site which shows different content based on a location
> the visitor chooses. e.g: User enters in 55812 as the zip. I know what
> city and area lat/long. that is and give them their content pertinent
> to that are
I am noticing that when I load an existing ModelForm into a template,
and I save (POST), I can't seem to get the primary key back in order
to update that specific record. I am starting to head down the path of
formsets...but that is not what I need. I am updating one record only.
Any help is appre
Ya.. I am sure that I have added it in INSTALLED_APPS and I rechecked it as
well.. My problem is not yet solved..
On Mon, Oct 26, 2009 at 7:23 AM, Dhruv Adhia wrote:
> The error means that are you sure you have added "world" in INSTALLED_APPS
> which is in settings.py?
>
> Dhruv Adhia
> http://w
On Oct 25, 2:55 pm, Bojan Mihelac wrote:
> Hi all,
>
> given an many_to_one doctests with Reporter/Article models, the
> following example would fail with "IntegrityError:
> many_to_one_article.reporter_id may not be NULL":
>
> >>> r = Reporter(first_name='John', last_name='Smith',
> >>> email
On Oct 24, 5:14 am, Tim Valenta wrote:
> I've been searching for a while on how to intercept querysets in
> forms, to apply a custom filter to the choices on both foreignkey and
> m2m widgets. I'm surprised at how there are so many similar questions
> out there, dating back to 2006.
[snip]
> T
I've been trying to a modify an admin form so I have a slightly different
user interface compared to the database model.
The main problem is this; in the database model I store a start and end time
as timestamps (a float holding seconds since 1/1/1970). But when the user
wants to edit the times I
Djangos:
This is the "slow test" question, again. I have time tested with 1.0.3
and 1.1.1, and a batch of only like 20 tests takes a minute on both
versions. Yes to sqlite3, in :memory:. The nature of the question is
I'm an old-skool Pythonist but I wouldn't know where to start
diagnosing this is
I just neared the end of the poll application and converted everything
to generic views according to the tutorial. Once I started up the
server though, I could only find my admin page. I tried using the
newly named urls but I keep getting Page not Found 404 errors. Same
thing happens when I type i
The error means that are you sure you have added "world" in INSTALLED_APPS
which is in settings.py?
Dhruv Adhia
http://www.thirdimension.com
On Sun, Oct 25, 2009 at 10:35 AM, Sahiti Polishetty
wrote:
> Hello .. I want to have google maps in my application, so i created a
> project and in that
Hello,
I have a web site which shows different content based on a location
the visitor chooses. e.g: User enters in 55812 as the zip. I know what
city and area lat/long. that is and give them their content pertinent
to that area. My question is how can I store this in a cookie so that
when they r
Thanks for the help.
I did find this as a solution ad it seems to work
Formset = inlineformset_factory(ModelA, ModelB form=MyForm)
Formset.form = staticmethod(curry(MyForm, reaOnly=readOnlyvalue))
myFormset = Formset(request.Files, instance=modelAInst)
Regards
Andrew
Andew Gee wrote:
> Hi,
>
>
Thanks for the thoughts Preston!
> I think a base class with subclasses is the best approach.
>
> Define as much common behavior as possible, set up defaults for those
> fields needed by your outbound API
Indeed, thanks for the confirmation. I think it's time for experimentation!
> How are yo
Look in django-registration's registration/urls.py to find the names.
IIRC it's like "auth_login" and "registration_register" (both with no
parameters).
egj
On Sun, Oct 25, 2009 at 8:09 PM, Sławek Tuleja wrote:
>
> Hi
> I am using django-registration. In my base.html file I have:
> login
> regi
Hi
I am using django-registration. In my base.html file I have:
login
register
How to avoid hardcoded urls?
{% url ?:? %}
greetings
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to th
Thanks but I am not very familiar with forms yet I barely managed to
override the default form.
However, I thought that its ok for the time being since places and
subplaces are not changed frequently so i can live with it for the
time being and move to more important parts until I am more familiar
Yes, it's a single query.
Take a look at django-debug-toolbar. It can display all SQL queries
that was executed during request/response so you'll always be sure
what's going on.
On 26 окт, 03:12, wancharle sebastiao quirino
wrote:
> Hello,
>
> I currently am using raw sql to make an atomic oper
Hello,
I currently am using raw sql to make an atomic operation of the following :
UPDATE table SET field1 = 0, flag = 'A' WHERE flag = 'I'
Reading the documentation I realized I could do this:
Table.objects.filter(flag='I').update(field1=0,flag='A')
I want to make sure that this is a unique o
Hi all,
I'm working with a content model (say, for simplicity, that we have
articles and images) that has a published status of either "Published"
or "Draft". In the admin interface, I have a widget to associate
images with articles as related content (a manytomany field).
On my site, I currentl
Hi all,
given an many_to_one doctests with Reporter/Article models, the
following example would fail with "IntegrityError:
many_to_one_article.reporter_id may not be NULL":
>>> r = Reporter(first_name='John', last_name='Smith', email='j...@example.com')
>>> a = Article(headline="This is a test",
I am very happy to announce that Satchmo 0.9 is now released.
Satchmo is an ecommerce framework built on the Django framework. It is
designed to be robust and full featured out of the box but allow developers
flexibility to modify the store to fit your unique needs.
This release is a major milest
Hi everyone,
i'm strugling to make $python manage.py test run my doctest.
My folder/file strukture is as follows
myproject/myapp/tests.py
/my_tests/__init__.py
/my_tests/unittst.py
/my_tests/doctst.py
I am successfully impo
Hello .. I want to have google maps in my application, so i created a
project and in that made an application to handle the maps and made the
required changes in the settings.py for the above. But i am getting the
following error when i am trying to issue the command "python manage.py
sqlall world"
Hello. Since the application works only through the admin area of
Realtors. I have a table and apartments linked to this table with a
table areas. I have to organize the search for apartments in several
areas. In order not to injure the hand of Realtors, a set of regions,
separated by commas, deci
Hi,
With my project I'd like to create an industry-aimed application that
offers the users to gain a quick and easy overview over different
jobs. Therefore I've thought of three database models:
1) The basic Material model. This model consists of simple fields like
the name of the material, its
On Oct 25, 4:53 am, Caisys wrote:
> > Just override the form in the inlne admin. All you have to do is set a
> > default in the field you want.
>
> I managed to do that but now all the extra fields have the default
> text not just one.
>
What about overriding the formset? You override the __init
Hiya Tim,
Thanx for the response. Thing is I already have queries running like this:
Customer.objects.filter(user=request.user).order_by('company_name')
The problem however is that I dont trust myself enough to never make a
msitake to show the wrong data to the wrong user. All my models have a
Gerard wrote:
> Hi all,
>
> I'm working on a safe way to get users to only see there own records. I've
> been working on subclassing model.Manager and requiring a 'owner' parm for
> filter() or otherwise returning an emtpy query set .. just to failsafe my
> own view coding.
>
> Then I figured
Hi all,
I'm working on a safe way to get users to only see there own records. I've
been working on subclassing model.Manager and requiring a 'owner' parm for
filter() or otherwise returning an emtpy query set .. just to failsafe my
own view coding.
Then I figured I could get records in my vie
> Just override the form in the inlne admin. All you have to do is set a
> default in the field you want.
I managed to do that but now all the extra fields have the default
text not just one.
> In this case i prefer the approach of creating a "fake" field called
> places, populated with the plac
30 matches
Mail list logo