I have similar problem
Perhaps this will help:
http://groups.google.com/group/django-users/browse_thread/thread/31229a89b792bc1d/62fb3b009566ba76
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Django
users"
On 28., 05:56, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote:
On 12/27/06, Vasily Sulatskov <[EMAIL PROTECTED]> wrote:
> I have models similar to following:
> class User(models.Model):
> name = models.CharField(maxlength=100)
> class Keyword(models.Model):
> name =
On 12/27/06, goodieboy <[EMAIL PROTECTED]> wrote:
Hi, I've been using Django for the past 2 weeks and I'm in love. Now,
I'm forced to build an app with PHP 4! The host does have Python. I'm
wondering... is it nuts to use PHP to talk to python, to take advantage
of something like SQLAlchemy? :)
On 12/27/06, goodieboy <[EMAIL PROTECTED]> wrote:
Hi, I've been using Django for the past 2 weeks and I'm in love. Now,
I'm forced to build an app with PHP 4! The host does have Python. I'm
wondering... is it nuts to use PHP to talk to python, to take advantage
of something like SQLAlchemy? :)
Hi, I've been using Django for the past 2 weeks and I'm in love. Now,
I'm forced to build an app with PHP 4! The host does have Python. I'm
wondering... is it nuts to use PHP to talk to python, to take advantage
of something like SQLAlchemy? :)
- matt
On Dec 27, 8:21 pm, Don Arbow <[EMAIL PROTECTED]> wrote:
On Dec 27, 2006, at 5:44 PM, Jason C. Leach wrote:
> Specifically, I'm curious how you do it without putting SQL in the
> view. From what I understand about the methodology of MVC this should
> not be done.I would only worry about that
On 12/27/06, Don Arbow <[EMAIL PROTECTED]> wrote:
On Dec 27, 2006, at 5:44 PM, Jason C. Leach wrote:
> Specifically, I'm curious how you do it without putting SQL in the
> view. From what I understand about the methodology of MVC this should
> not be done.
I would only worry about that if
On Dec 27, 2006, at 5:44 PM, Jason C. Leach wrote:
Specifically, I'm curious how you do it without putting SQL in the
view. From what I understand about the methodology of MVC this should
not be done.
I would only worry about that if you are concerned about
maintainability or want to avoid
The "view" in Django isn't the View in Model-View-Controller (MVC). The
V is more like the template, which, you're correct, should not have
business logic in it.
As a simple (very simple, please don't jump on me) analogy from MVC to
Django, the M does correspond to the database models, the C
On 12/27/06, Jason C. Leach <[EMAIL PROTECTED]> wrote:
Hi:
Specifically, I'm curious how you do it without putting SQL in the
view. From what I understand about the methodology of MVC this should
not be done.
Jason, I'd encourage you to read the first tutorial, then fiddle with
the
Hi:
Specifically, I'm curious how you do it without putting SQL in the
view. From what I understand about the methodology of MVC this should
not be done.
J.
On 12/27/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
On 12/27/06, Jason <[EMAIL PROTECTED]> wrote:
> What do we do in Django if we
On Dec 27, 2006, at 7:58 PM, [EMAIL PROTECTED] wrote:
Has anybody written a template filter to automatically convert inch
marks (") to the correct smart quotes, and (') to apostrophes? How do
you think is the best way for me to accomplish this?
Check out the Python version of Smartypants.
Hi,
Has anybody written a template filter to automatically convert inch
marks (") to the correct smart quotes, and (') to apostrophes? How do
you think is the best way for me to accomplish this?
Thanks and happy holidays,
Leon
--~--~-~--~~~---~--~~
You
On 12/27/06, Jason <[EMAIL PROTECTED]> wrote:
What do we do in Django if we want to use complex data models like
JOINs, or a shopping card with invoices and line-items? Do we try and
keep as much in the database as possible using stored procedures or
views?
What happens to the model when you
On 12/27/06, Vasily Sulatskov <[EMAIL PROTECTED]> wrote:
I have models similar to following:
class User(models.Model):
name = models.CharField(maxlength=100)
class Keyword(models.Model):
name = models.CharField(maxlength=100)
user = models.ForeignKey(User)
class
Thank! you are right that I am not allowed to define variavle as
wk-report but wk_report.
I think I have to know more about dictionary data type which is given
to the 'render_to_response' function and the data type dictionary which
is used normally in Python. It is a little for me confuse.
What do we do in Django if we want to use complex data models like
JOINs, or a shopping card with invoices and line-items? Do we try and
keep as much in the database as possible using stored procedures or
views?
What happens to the model when you want to do more than just SELECT x,
y, z FROM A?
On 12/27/06, Nader <[EMAIL PROTECTED]> wrote:
This is a definition of detail function in my views.py model
def detail(request, object_id):
wk-report = get_object_or_404(Report, pk=object_id)
return render_to_response('weekly/weekly_detail.html',
{'object':
This is a definition of detail function in my views.py model
def detail(request, object_id):
wk-report = get_object_or_404(Report, pk=object_id)
return render_to_response('weekly/weekly_detail.html',
{'object': wk-report})
Then I reference to the object
On 12/27/06, David Zhou <[EMAIL PROTECTED]> wrote:
*slaps forehead* Doh! You're right, of course. It should be a many
to one. Blame it on the post-Holiday slump.
For whatever reason, I had one to one fixated in my mind. With this
out of the way, the rest should be easy.
Cool. Glad we got
"Adrian Holovaty" <[EMAIL PROTECTED]> writes:
On 12/27/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
The users I create under a group can enter to the admin interface and
create/modify registers. What I want to do now is limit the choices
shown by the favorite_animals field based on the
On Dec 27, 2006, at 6:06 PM, Adrian Holovaty wrote:
On 12/27/06, David Zhou <[EMAIL PROTECTED]> wrote:
What are people using for OneToOne relations (Comment->Entry)? The
Django documentation says that it may change, and is not recommended
for use. What do you use instead, or do most people
http://en.wikipedia.org/wiki/List_of_NP-complete_problems
--~--~-~--~~~---~--~~
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
You're correct, we found the same thing on IRC. However, to get a
ChoiceField to render your choices in the Select widget, you set
field.widget.choices, not field.choices. This is, of course, not documented
and incredibly confusing. I'm filing a ticket on it now. Thanks for making
it clear.
On
On 12/27/06, David Zhou <[EMAIL PROTECTED]> wrote:
What are people using for OneToOne relations (Comment->Entry)? The
Django documentation says that it may change, and is not recommended
for use. What do you use instead, or do most people ignore and use
it anyways?
This doesn't directly
On 12/27/06, Jason Barrett Prado <[EMAIL PROTECTED]> wrote:
Is this even possible, or is it not implemented correctly yet? I have done
every last thing I can think of that makes any sense and the results are
never what I want.
if not request.POST.has_key('submit'):
s =
Hey,
I've been creating a blog app to get a handle on some of the more
basic Django stuff. Currently, I'm using FreeComments for
commenting, but don't really like the way it does some things (the
URL, for example). I figure it shouldn't be too hard to add in my
own commenting models
Thanks for the tip. That looks promising.
Where do you usually put your index page - as it's a landing page, and
a bit of a gateway to may of the apps that comprise your project? Do
you create an app for it, or generally stuff it in a flatpages and
hang your other apps off it (like a log in,
On 12/27/06 4:12 PM, LD 'Gus' Landis wrote:
Is the application driving that site available for somewhere? I
have a need For
this type of software, to use for a book that is being
collaboratively written.
It's not currently available. If I've got time, I might clean it up and
release it...
Hi,
I am referring to http://www.djangobook.com/en/beta/
I am very impressed with the way that the User Community Django book site
interacts with the authors and reviewers of the work in progress.
Is the application driving that site available for somewhere? I
have a need For
this type
Jeremy Dunck wrote:
> It sounds to me like it'd be better to make session lifetime more
> configurable than it currently is.
I'm going to give this a couple more days to see if anyone else has any
ideas, and if hacking SessionMiddleware turns out to be the only way
then I'll move this over
Hi, I'm trying to leave my own views and use the generic, everything
works fine if I want to create, the generic view creates it, but after
create, it send me to an url that gives me error, and I don't know
which url is. The same happens when I try to change an existing object,
it changes in the
Django Version: 4248
OS: Windows XP Pro
FF: 2.0.0.1
IE: 6.0
I'm seeing a weird behavior with a very basic form, I was hoping some
additional eyes might help.
This example exhibits the strange behavior:
I have an HTML page with the following form:
And the following in views.py:
def
Nevermind. I found Ticket #3089
[http://code.djangoproject.com/ticket/3089] after a little Google-ing.
I'll be interested in seeing what that one is all about.
Meanwhile, I'll continue to repeat to myself: "Google is my friend."
Thanks.
On 12/27/06, medhat <[EMAIL PROTECTED]> wrote:
...
Right now I return an
empty list, but this causes an error in generic views.
I think you want allow_empty=True.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Hi, I'm trying to leave my own views and use the generic, everything
works fine if I want to create, the generic view creates it, but after
create, it send me to an url that gives me error, and I don't know
which url is. The same happens when I try to change an existing object,
it changes in the
Hi everybody,
I'm newbie on django but I think is awesome, specially the admin
interface. I've created a (following the tutorial) a model and I can
edited from the admin view. So far so good. But now I want to do this:
I have a class pet with a field like this:
kind =
On 12/27/06, Jason <[EMAIL PROTECTED]> wrote:
So when I start a new project, it has some basic content like an index,
about, contact, and so on. Where does this go in relation to a apps and
projects? Should I create an app in my project of all this standard
stuff?
Hey Jason,
Sounds like a
I want to implement something like AJAX interface (using Yahoo User
Interface toolkit) for changing information in database.
I want it to make possible to create window for a model, and when user
wants to edit something he is shown a AJAX window with fields needed.
I wonder if it is possible
On 12/27/06, medhat <[EMAIL PROTECTED]> wrote:
Is there a way to create an empty queryset?! Let's say I have a manager
to return all the items with the given tags, and I want to return "no
items" if one of the given tags does not exist. Right now I return an
empty list, but this causes an error
I want to implement something like AJAX interface (using Yahoo User
Interface toolkit) for changing information in database.
I want it to make possible to create window for a model, and when user
wants to edit something he is shown a AJAX window with fields needed.
I wonder if it is possible
Hi:
So when I start a new project, it has some basic content like an index,
about, contact, and so on. Where does this go in relation to a apps and
projects? Should I create an app in my project of all this standard
stuff?
Later I'll add functionality. This may include a registration section
Hi,
Is there a way to create an empty queryset?! Let's say I have a manager
to return all the items with the given tags, and I want to return "no
items" if one of the given tags does not exist. Right now I return an
empty list, but this causes an error in generic views. Is there a way
to create
I have models similar to following:
class User(models.Model):
name = models.CharField(maxlength=100)
class Keyword(models.Model):
name = models.CharField(maxlength=100)
user = models.ForeignKey(User)
class Article(models.Model):
name = models.CharField(maxlength=100)
user =
Thanks. Probably the one thing I didn't try.
J.
On 12/27/06, Jorge Gajon <[EMAIL PROTECTED]> wrote:
On 12/27/06, Jason <[EMAIL PROTECTED]> wrote:
>
> So now that I add an about page, as www.foo.com/about what I get is a
> bunch of 404 errors because it's looking form my CSS and images in:
>
Hi,
I m new to django and i m having some trouble with comboboxes.
I have a model that have a "Project" class, and a "Version" class, the
Version is related to the Project, and i have a third class that have both
as foreign keys.
What i wanna do is, when i change the combo Project, i want the
On 12/27/06, Jason <[EMAIL PROTECTED]> wrote:
So now that I add an about page, as www.foo.com/about what I get is a
bunch of 404 errors because it's looking form my CSS and images in:
/about/css/styles.css (should be /css/styles.css) and images references
in the CSS in about/css/i/abc.png
Thanks so much, works perfectly!
--~--~-~--~~~---~--~~
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
Hi:
So I started a Django project, got my templates to serve, go my index
going, gome some static content to serve. My index page works on
http://www.foo.com/
So now that I add an about page, as www.foo.com/about what I get is a
bunch of 404 errors because it's looking form my CSS and images
change it to this:
recipe = models.ForeignKey(Recipe,edit_inline=models.TABULAR
,num_in_admin=x,num_extra_on_change=y)
Replace X with how many you want to appear on object creation (when you
click add) and Y with how many you want to appear on edit. You'll probably
want significantly more on
I've made a simple database for cooking recipes, whereby every Recipe
object contains a number of Ingredient objects. In particular, within
my Ingredient model, I have the line
recipe = models.ForeignKey(Recipe, edit_inline=models.TABULAR)
This is great, because the generated Admin interface
On 12/27/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
http://www.djangobook.com/en/beta/chapter02/
>>> import django
>>> django.VERSION
(1, 0, 'official')
Which is a bit confusing since there is no 1.0 yet. :) Perhaps we
should make an admonition to use -only- the dev version in the
On 12/26/06, Vadim Macagon <[EMAIL PROTECTED]> wrote:
I could probably write a new middleware class to replace
SessionMiddleware, with the only difference being the process_response()
method that would use a new request.SESSION_EXPIRE_AT_BROWSER_CLOSE
setting and if that wasn't set default to
Kenneth Gonsalves wrote:
that has already been answered in the django documentation. Django is
not a tool for endusers to create quicky web applications. It is not a
ready made CMS/blog/BBs etc.
I didn't say anything like this. Your question was why we would list
Django's restrictions. I
On 27-Dec-06, at 4:55 PM, Ivan Sagalaev wrote:
Why on earth would any web framework make a list of web apps that
it is not suitable for?
To be kind to a potential user when he might acquire a need to do
something the framework *is* suitable for.
that has already been answered in the
I'm not sure what you mean "what kind of failures can be expected"? If
we expected failures we'd fix them :)
Anyway, if you can have a try at the final CP 3 release. If you still
experiment issues it'd be useful to report them on the CP users list
directly. we could then help you out.
-
Kenneth Gonsalves wrote:
Why on earth would any web framework make a list of web apps
that it is not suitable for?
To be kind to a potential user when he might acquire a need to do
something the framework *is* suitable for.
No framework can do everything. And what is the best place to ask
Don Arbow wrote:
> Well, I meant bug in the sense of the book. I noticed that this same
> question was asked about a
> month ago. I'm not sure if the book emphasizes which version of Django to
> use for the tutorials.
http://www.djangobook.com/en/beta/chapter02/
>>> import django
>>>
58 matches
Mail list logo