I ran into this same issue, you will need to recompile python with the
following (somewhat unintuitive option): --enable-unicode=ucs2, and
then recompile psycopg2. I've gotten that far with stackless on my
machine, and runserver, etc. works ok.
On May 30, 3:25 am, Chandrashekar Jayaraman
Hello,
I have a small issue in terms callable objects inside of contexts. I'm
having trouble figuring out how to have the call evaluated everytime
the context is used/rendered. An example:
some_context = {
'random': random(),
}
def some_view(request):
return
I have the four models ,
1. Patient has 2.doctors and 3.pills
the 3.Pills have 4.rders
In the aadmin screen the displays are in
Doctors Orders Patients Pills
I would like to be able add a pillto the file and then add all orders
for that pill
On my order screen, how can I display the title from
On Monday 08 June 2009 21:07:57 Necmettin Begiter wrote:
> Your best bet would be using a CMS like Joomla, because, don't get me
> wrong, but if you do not know the difference between a web application
> and a web framework, you better stick to already-mature web
> applications (since you are
Hi group. I need to pull a directory listing and populate a dropbox.
I know how to do this with a queryset but how could i do it with
something like this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django
I go into the admin section of my site, click on Users, then on the
'Add User' button. It takes me to a screen that asks me to put in a
username and password and click 'Save'. At this point I get an error:
ValueError at /admin/auth/user/add/form_url
invalid literal for int() with base 10:
On Jun 8, 3:54 pm, Alex Gaynor wrote:
> On Mon, Jun 8, 2009 at 3:42 PM, Don Spaulding wrote:
>
>
>
>
>
> > Hi there,
>
> > While playing around with the aggregation support in trunk, I came up
> > with the need for the following SQL query:
>
> >
Im developing a childcare app and I have a problem when I want to
relate an object of a table with a UserProfile field so for example:
user:some_parent
In a view, I want to see only the childs of that parent.
In python manage.py shell:
-Example: Parent case-
For simple input fields, I'm echoing back the data from database to
form like this:
Your Domain (example: JohnDoe.com)
If I don't put the "if" statement there, I get the value "None"
appearing, which is not desireable from a user's perspective. In this
case "session" is the name of
Hello,
I'm getting going with the tutorial, it's so exciting to see the admin
panel, but I've got a problem with the breadcrumbs.
So I'm working from this page:
http://docs.djangoproject.com/en/dev/intro/tutorial02/#intro-tutorial02
and when I select my poll to change, it says:
Home › Polls ›
For those who have used django-authopenid [1], can you tell me if it
interferes with the built-in django user authentication system (users,
permissions, groups, etc). I am going to attempt to get it running on
a small project, but I won't bother if it interferes with auth.
Thank you in advance
Template/Form looks like this:
English:
Spanish:
Portuguese:
Database model defines column:
languages = db.StringListProperty() #stores multiple
languages
I stored data into Google/BigTable like this:
session.languages = self.request.get_all('language')
That part
On Jun 4, 2:45 pm, Matt wrote:
> It looks like you're right and the login page isn't actually logging
> users in.
>
> Any idea why that might be? I'm using the auth.login view and a
> template that looks like this:
Your template code looks fine.
> Any thoughts on what
I use the admin.ModelAdmin with a list_display to display columns on
the edit list page.
I need another one , looking the same as the current edit list page
but with other columns taken from my model.
Is there a way to override easily the list_display in a new view to do
that ?
Thank you.
On 08/06/09 11:37 AM, Necmettin Begiter wrote:
> On Mon, Jun 8, 2009 at 16:39, Olav wrote:
>> I am convinced that Django is a great framework, but I need to know
>> how much of the stuff I might need is available or can easily be
>> integrated?
>>
>> How much is available
On 08/06/09 11:30 AM, Masklinn wrote:
> On 8 Jun 2009, at 15:39 , Olav wrote:
>> I am convinced that Django is a great framework, but I need to know
>> how much of the stuff I might need is available or can easily be
>> integrated?
>>
>> How much is available compared to Drupal, Joomla or
On Mon, Jun 8, 2009 at 3:19 PM, pingwin wrote:
>
> Hi,
>
> This is frustrating and against a true MVC methodology. I want to have
> something like this for the designer in the template.
>
> {% if user.is_authenticated %}
> {% extends "auth_base.html" %}
> {% else %}
> {%
On Mon, Jun 8, 2009 at 3:57 PM, zayatzz wrote:
>
> Well now this is working just fine:
>
> [snip AccountForm]
>
> But this (code below) still does not return me any error messages from
> form validation.
>
>form = AccountForm(request.POST)
>
Hi,
This is frustrating and against a true MVC methodology. I want to have
something like this for the designer in the template.
{% if user.is_authenticated %}
{% extends "auth_base.html" %}
{% else %}
{% extends "base.html" %}
{% endif %}
However this obviously fails. I do not think it
Thanks Karen - I think I will start doing that from now on.
Thanks everyone else - For now I'm just rolling back a bit before I
started getting the error and go from there. It seems that my project
scope has changed a bit midstream anyway so I guess this really isn't
the end of the world. If I
On Mon, Jun 8, 2009 at 3:55 PM, Andy Dietler wrote:
>
> Thanks.
>
> How do I overwrite the definition of rating, like this?:
>
> class Rating(models.Model):
>rating = models.IntegerField()
>
>
> class ShowForm_Rate(forms.ModelForm):
>class Meta:
>model =
Thanks.
How do I overwrite the definition of rating, like this?:
class Rating(models.Model):
rating = models.IntegerField()
class ShowForm_Rate(forms.ModelForm):
class Meta:
model = Rating
rating = forms.ChoiceField(widget=forms.RadioSelect
On Mon, Jun 8, 2009 at 3:42 PM, Don Spaulding wrote:
>
> Hi there,
>
> While playing around with the aggregation support in trunk, I came up
> with the need for the following SQL query:
>
> SELECT
>DATE_TRUNC('day', datestamp) AS rec_day,
>COUNT(id) AS
I'm trying to get into a better testing flow with Django. One of
things I'm trying to figure out how to test are templates. Using the
Django Test Client works fine, for instance, in detecting whether I
have a missing template tag (because it'll explode) or if I don't pass
a particular variable to
Hi there,
While playing around with the aggregation support in trunk, I came up
with the need for the following SQL query:
SELECT
DATE_TRUNC('day', datestamp) AS rec_day,
COUNT(id) AS count
FROM stats_record
GROUP BY rec_day
How would I construct this same query via the ORM?
So I am implementing a couple custom admin interfaces for a project i
am working on. I wanted to limit the choices for a few of my models,
so i overrode the ModelAdmin.queryset method and that worked well. But
the one thing i noticed was that any other models (one being Study)
that have
On Jun 8, 6:12 pm, Bo Zhao wrote:
> sorry all, i find it..in the 1.0 version, the subcommand install is removed.
> but my question is how to automatically import a model without edit the
> INSTALLED_APPS?
>
> On Mon, Jun 8, 2009 at 1:08 PM, Bo Zhao
On Jun 8, 8:23 pm, Andy Dietler wrote:
> I'm trying to make one of the fields in my model display radio buttons
> with the options 1-5. I can't find a way to do this with a model form
> and I can't get anything I find in documentation to work properly.
>
> What I have
Well now this is working just fine:
class AccountForm(forms.Form):
username = forms.CharField(max_length=100, help_text="Enter Username
of your account", label="Your username")
email = forms.EmailField(max_length=100, help_text="Enter your e-mail
address", label="Your e-mail
On 8 Cze, 17:31, grimmus wrote:
> Hi,
>
> I have a simple blog application
>
> I would like to be able to create a post and assign it to multiple
> categories
>
> category = models.ForeignKey(BlogCategory)
ForeignKey allows you to assign post only to one
I'm trying to make one of the fields in my model display radio buttons
with the options 1-5. I can't find a way to do this with a model form
and I can't get anything I find in documentation to work properly.
What I have below results in me getting the following error:
TypeError: __init__() got
Thanks Alex! Now I know where to start.
On Jun 8, 10:18 am, Alex Gaynor wrote:
> On Mon, Jun 8, 2009 at 12:14 PM, David wrote:
>
> > Hello,
>
> > Following the online tutorial I have created "mysite" project. After I
> > have logined into admin, I can
I'm getting an error using Django 1.0 when trying to log a new user
in. When I call
login(request)
On a new user I will occassionally (not very often) get an error (the
cache number values will be different):
Permission Denied: /tmp/python.cache_root/8/7/2
Which is an:
OSError in
On Mon, Jun 8, 2009 at 12:14 PM, David wrote:
>
> Hello,
>
> Following the online tutorial I have created "mysite" project. After I
> have logined into admin, I can see Auth --- Mysite Sites.
>
> Now I would like to use the same layout/template for my user home page
> as
Hello,
Following the online tutorial I have created "mysite" project. After I
have logined into admin, I can see Auth --- Mysite Sites.
Now I would like to use the same layout/template for my user home page
as this admin page. I have read django/contrib/admin/sites.py but
could not find
sorry all, i find it..in the 1.0 version, the subcommand install is removed.
but my question is how to automatically import a model without edit the
INSTALLED_APPS?
On Mon, Jun 8, 2009 at 1:08 PM, Bo Zhao wrote:
> Hi all,
>
> a quick and mightbe stupid question, I want to
Hi all,
a quick and mightbe stupid question, I want to use the subcommand install
within manage.py, but it seems not exist. Since I need to automatically
import model but not manually edit the INSTALLED_APPS.
anyone has some idea on this?
best,
Bo
--
Bo, Zhao
GIS Intern, Center for
Well, I guess a good nights sleep did me well
I discovered my error, the problem was within my loops...
I had to move one of my appends outside the inside for loop...
for a in range_list:
for b in used_number_list:
if str(b) == str(a):
try:
prod
I think i already tried that, Michael, and i got some error that had
something to do with nonetype... since there is no pwd in data, you
cant compare if its equal or not to ''
Alan.
On 8 juuni, 17:24, Michael wrote:
> On Mon, Jun 8, 2009 at 10:09 AM, zayatzz
Nice, thanks for the update, Russell and Alex !
-d
On Jun 5, 10:10 pm, Russell Keith-Magee
wrote:
> On Sat, Jun 6, 2009 at 7:55 AM, Alex Gaynor wrote:
>
> > On Fri, Jun 5, 2009 at 12:03 PM, Darren wrote:
>
> >> That's
On Mon, Jun 8, 2009 at 5:39 AM, Chris Stoyles wrote:
> Hi Thomas,
>
> The reason I want to be able to rollback (but still commit by log entries)
> is because it is sometimes valid for this particular view to throw an
> exception and fail. If this happens, I need to rollback
On Mon, Jun 8, 2009 at 16:39, Olav wrote:
>
> I am convinced that Django is a great framework, but I need to know
> how much of the stuff I might need is available or can easily be
> integrated?
>
> How much is available compared to Drupal, Joomla or DotNetNuke for
>
On Mon, Jun 8, 2009 at 3:46 AM, Chris Stoyles wrote:
> The problem is that there is no "number_list" key in your context, there is
> only a "range" and "range_list" key (take a look at where you call
> "render_to_response"). I think what you want to do is actually pass your
>
Hi,
I have a simple blog application
I would like to be able to create a post and assign it to multiple
categories
Currently my model looks like below. I was thinking i could render the
categories in the admin as checkboxes and then check multiple ones, if
required, but i am not really sure
On 8 Jun 2009, at 15:39 , Olav wrote:
> I am convinced that Django is a great framework, but I need to know
> how much of the stuff I might need is available or can easily be
> integrated?
>
> How much is available compared to Drupal, Joomla or DotNetNuke for
> example?
Drupal and Joomla are
Cool tip!
> You're allowed to do admin.site.register([Model1, Model2, Model3]) to
> register multiple models. Note the creation of the list there, not directly
> calling the method with the objects as argumne.ts
--~--~-~--~~~---~--~~
You received this message
On Mon, Jun 8, 2009 at 5:29 AM, phred78 wrote:
>
> I think you need separate admin registers, like so:
>
> admin.site.register (Patient)
> admin.site.register (Doctor)
> admin.site.register (Pills)
> admin.site.register (Orders)
>
> You'd only put two together if you created
Chris Stoyles schrieb:
> Hi Thomas,
>
> The reason I want to be able to rollback (but still commit by log entries)
> is because it is sometimes valid for this particular view to throw an
> exception and fail. If this happens, I need to rollback any model objects
> that have been created and
On Mon, Jun 8, 2009 at 10:09 AM, zayatzz wrote:
>
> So i change pwd and pwdc to required=False and in clean i do
> if pwd in data (or if ["pwd"] not in data):
>if data.get("pwd") != data.get("pwdc"):
>raise forms.ValidationError("Passwords do not match")
So i change pwd and pwdc to required=False and in clean i do
if pwd in data (or if ["pwd"] not in data):
if data.get("pwd") != data.get("pwdc"):
raise forms.ValidationError("Passwords do not match")
return data
and i get errorfree clean function?
Alan
On Jun 8, 4:29 pm, Michael
I am convinced that Django is a great framework, but I need to know
how much of the stuff I might need is available or can easily be
integrated?
How much is available compared to Drupal, Joomla or DotNetNuke for
example?
If I want to use another framework and have it appear as the same
site,
On Mon, Jun 8, 2009 at 2:05 AM, zayatzz wrote:
>
> Great :). Thanks...
>
> Wish i had read your post more thoroughly the first time.
>
> This takes care of my second problem, but what about the first one -
> why do password fields need to be filled? Because empty(or
the form is working fine now , actually my form was inside another
form , that was the problem
On May 22, 6:55 pm, watad wrote:
> hi karen , actually im runing this code , after submit i can see all
> the data inside the model ,only the filefield resume is empty , of
> course
One more requirement..
4. The application must be self contained i.e contain its own django
installation (which has the quick start web server) and sqlite db
module.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
I need to write a small application and considering django but am
wondering how the model backend copes with the following scenario..
The admin user needs to be able to upload/download new dbs and switch
the current backend database file and run the app portably on
different machines. The
I would have your internal model how you like for the best application
design and then write cron scripts that import into your main db from
the other disparate format databases. Have a field in your internal
model so you know the original source of each entry. Reimport when the
third party DBs
Thanks for the link. The description sounds like just what I need.
On Fri, 2009-06-05 at 20:46 -0700, Graham Dumpleton wrote:
> Have a look at:
>
> http://www.openfusion.com.au/labs/mod_auth_tkt/
>
> Graham
>
> On Jun 6, 6:26 am, Adam Stein wrote:
> > I'm trying to
Thanks for responding and for the idea. I'm also migrating, but
security seems to be a bigger deal than getting the rest migrated at the
moment, hence the need to authenticate for the old stuff.
On Fri, 2009-06-05 at 16:43 -0700, BenW wrote:
> I did something similar while migrating an old app
Solved it, replace get_fieldsets with my custom function, returning:
[(None,
{'fields': [('field1','field2),]})]
On Jun 5, 5:23 pm, Denis Cheremisov
wrote:
> I saw the method using fieldsets, by grouping several fields in a
> tuple. But this method didn't suit
I think you need separate admin registers, like so:
admin.site.register (Patient)
admin.site.register (Doctor)
admin.site.register (Pills)
admin.site.register (Orders)
You'd only put two together if you created some special instructions
for the admin. Then you'd have something like:
On Mon, Jun 8, 2009 at 1:45 PM, jayvandal wrote:
>
> I have four tables
> 1 Patient
> 2 has many doctors
> 3 doctor issues pills
> 4 order many pills
> when I run syncdb I get the 3 levels showing in adminstrative screen.
> I can't get it
Hi all ,
I am trying to develop a web app that searches products on some
local stores and give the price.Now I can obviously have a format for stores
to feed my database but rather than that .What I want is that the local
stores be able to dump their database/feeds on my Server . It
Hi Mitch,
I haven't read through your example in detail, but just glancing over it I
think that I can see the mistake you're making
The problem is that there is no "number_list" key in your context, there is
only a "range" and "range_list" key (take a look at where you call
Hello everyone,
Besides django-mailer, has anyone had experience on how to queue e-
mail? I'm writing an application that sends newsletters to roughly
around 3000 subscribers and I don't want the hosting company -
mediatemple - complaining about reaching their 500 e-mail per hour
limit. Are
Hi Thomas,
The reason I want to be able to rollback (but still commit by log entries)
is because it is sometimes valid for this particular view to throw an
exception and fail. If this happens, I need to rollback any model objects
that have been created and saved up to the point at which the view
Thanks to a comment on my blog: the below is null and void: the
request object can be retrieved directly from context: context
['request'].
On Jun 2, 2:55 pm, BluMarble wrote:
> On Jun 1, 7:53 pm, "bax...@gretschpages.com"
> wrote:
>
> > I'm
if I'm not mistaken then the default ordering is used, that is given
by your model's Meta class [1]
otherwise, if you need a special ordering you might want to define
your own model manager with a method that does just what you want, and
call that method for the queryset
[1]:
you can run ./manage.py test yourapp with --settings=mysetting
so, I would recommend to create a settings file with the given setting
left out
V
On Jun 7, 1:51 pm, Julien Phalip wrote:
> Hi,
>
> In a unit test, I'd like to test the behaviour of a middleware in the
> absence
Hi Chris,
please explain in more depth what you want to do. If you
do rollback, all changes won't be written to the database. Even
all savepoints won't be stored.
Why do you want to rollback? If you want your changes
to get saved, you need to call transaction.commit() at the end.
ChrisStoyles
Great :). Thanks...
Wish i had read your post more thoroughly the first time.
This takes care of my second problem, but what about the first one -
why do password fields need to be filled? Because empty(or nonexisting
data) fields cannot be compared in 2nd if ?
Then what is the syntax for
Found the answer here;
http://groups.google.com/group/django-users/browse_thread/thread/89b4146892801ed4/17f2d26e10709ba0?lnk=gst=foreignkey+list_filter#17f2d26e10709ba0
Short version: "If you only have one record in the table related to
your foreign key,
then the filter list will not show up
71 matches
Mail list logo