Am Donnerstag, 23. Mai 2019 20:06:31 UTC+2 schrieb cixtus anyanwu:
> Guys am following the django girls pdf tutoril but am stuck here. Its saying:
>
>
>
> django.urls.exceptions.NoReverseMatch: Reverse for 'post_details' with
> keyword arguments '{'pk': 3}' not found. 1 pattern(s) tried:
es.address
Thanks
Rock
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this group, send e
Need to develop a project for file uploading and generating
its(files's) URL, which could be shared. Are there any particular
libraries or simple means in Python,(Django) that would be handy and
efficient.? ~ Newbie trying a Herculean Task~ Thanks in Advance :)
--
You received this message
I want to take forward the application creating experience with
django, by integrating the polls and admin applications. As far as my
knowledge is concerned in the polls appl we developed anyone could
enter the url and cast their vote. I wish if we could integrate the
admin apppl, and allow only
hi al
almost done with the django tutorial#4.. But my app doesnt use the
html pages, n doesnt load the radio buttons and results page.. Other
than those the app is displayed in the default template and shows al
the pages of groups users n polls.. i have placed the html templates
in templates
I have generated several static sites using Django aym-cms,
blueprint.css and markdown. This worked so well that I created a
django app that encapsulates blueprint.css so that I now have the
ability to manipulate layouts dynamically. Next up is to hook up
"pagelets" (i.e., django-chunks,
Elementtree is now part of the python distribution. I am using it in a
Django app I created for a client to extract data from XML provided by
a web service. It works well but the documentation could be clearer.
On Jan 6, 9:27 am, "shi shaozhong" wrote:
> I am reading in
Steve,
I think that the book by Forcier, Bissex and Chun called "Python Web
Development with Django" is worth looking at with regards to ideas for
a lesson plan. To me it seems that it would be an excellent workbook
for a very full week of classes. Their chapter 1 on python and the
first few
I had the same problem recently in a template that was created for use
in an inclusion_tag. My workaround was to the perform the reverse call
in the templatetag and pass in the resulting url.
If that is not an appropriate workaround for you, perhaps a "with"
will do the trick. If that doesn't
I took a similar path. I cloned the run_tests function from
django.tests.simple.py and put it in my project directory as
test_setup.py while adding this near the top of the function:
if settings.TEST_APPS:
settings.INSTALLED_APPS += settings.TEST_APPS
That at least allows me to define
http://www.eflorenzano.com/blog/post/easy-multi-database-support-django/
On Nov 26, 8:30 am, "Austin Gabel" <[EMAIL PROTECTED]> wrote:
> Hello,
> I am currently attempting to roll my own multiple database support for
> django for a new project. I have attempted to search for examples of this
>
First you have to figure out how you want to map your users to their
pages.
Do you want to use subdomains? How about something like the
delicious.com scheme
(i.e., http://delicious.com/username/ ) Or perhaps you have something
else in mind.
After you figure out your URL mapping, the rest looks
Take a look at http://code.google.com/p/django-reversion/ which may be
more than what you need, but certainly fills the bill for your general
use case.
On Nov 10, 1:03 pm, Tim <[EMAIL PROTECTED]> wrote:
> Basically, I want to be able to do something if the value of a field
> changes in a model.
I have used both approaches on different occasions. I feel the choice
boils down to the quantity of shared stuff that you need. For a large
app I recently created a "common" app that ended up having no models,
but did include a large assortment of shared views, choices, forms,
templatetags,
You are going to have better luck using David Cramer's project which
is up to date with Django 1.0:
http://code.google.com/p/django-sphinx/
On Nov 11, 6:05 am, dusans <[EMAIL PROTECTED]> wrote:
> Has onyone been able set make Sphinx Search ORM to
>
I have looked for this myself and in my opinion the answer is no.
There are several mini-crm prototypes that were started in pre-1.0
days and abandoned. None of them includes a basic design that I find
compelling.
The minibooks app is the closest thing to a working Django CRM, but it
has several
In the meantime, creating and executing your own update command is not
difficult.
Here is a snippet for a custom PositionField that updates itself when
necessary with an SQL UPDATE:
http://www.djangosnippets.org/snippets/884/
--~--~-~--~~~---~--~~
You received
In brief, your forms field for province does not have to have anything
to do with your corresponding model field.
Just make a forms.ChoiceField with the data filled in that you need
(or else look up the pattern for loading dynamic data into a
forms.ChoiceField and do something like that.) If you
I tried to do this several months ago during the run up to the 1.0
release and, at that time, the capability was broken. Furthermore I
recall having a discussion with some core developer that it was not on
the short list to fix for 1.0. I didn't submit a ticket for this, but
it may have been
A very common problem is that the timezone or system clock is off.
Most Blog implementations allow you to create a blog entry "in the
future" so it shows up on your web page only after a specified time.
This capability plays havoc with noobies who haven't bothered to set
their timezone correctly
Satchmo is your best bet at this time. It provides a rather complete
Django-based web storefront and includes explicit support for
subscription management.
See satchmoproject.com for more information.
There is a Google group for satchmo users called satchmo-users.
On Oct 10, 7:19 am, Wayne M
No. Typically you would make a stand-alone template that does not
extend anything else. This template only renders the contents of the
container in question. It can be used by your AJAX view to create an
updated container which can be passed back to the browser. But the
same template can also be
On Oct 2, 2:00 am, Jarek Zgoda <[EMAIL PROTECTED]> wrote:
> Wiadomość napisana w dniu 2008-10-02, o godz. 01:03, przez Rock:
>
> > Have you tried setting the order within your model? I think that is
> > the only simple way to tackle this at this time.
>
> >
is works out for you.
Rock
--~--~-~--~~~---~--~~
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
I can't show you the code yet since I haven't got permission to post
it cleared from my company, but I got this working. (It was not easy
and req
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
Have you tried setting the order within your model? I think that is
the only simple way to tackle this at this time.
class Meta:
ordering = ("fruit",)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Hmmm... Here are some guesses:
If that return statement in render is a single doublequote instead of
2 singlequotes, then your code probably won't parse and, even if it
does, get_latest certainly won't be found.
It seems to me like you need to coerce the string being assigned to
self.num as
Oops. I meant intermediary class, not intermediary field.
On Sep 26, 1:39 pm, Rock <[EMAIL PROTECTED]> wrote:
> It may be as simple as creating an intermediary field between Document
> and agency called Study. (See the Django docs regarding adding extra
> fields to a many-to-ma
of time and money in the long run.
Rock
--~--~-~--~~~---~--~~
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,
You need an empty __init.py__ in the directory or else the python
files there will not be found.
On Sep 25, 10:29 pm, Matthew Crist <[EMAIL PROTECTED]> wrote:
> Here's my template:
>
> {% load get_latest %}
> "http://www.w3.org/TR/html4/loose.dtd;>
>
>
> My Site -
I have no idea, but it only took me a few minutes to create a filter
you can put in some templatetags module:
from django import template
from django.conf import settings
from django.template.defaultfilters import stringfilter
register = template.Library()
@register.filter
@stringfilter
def
In my code I have a reference and a name such that I can do perform a
"get" to procure the reference to the correct intermediate object.
Then I simply interrogate that object directly. It should be possible
to do a "values" style query instead if you only want a particular
field or set of fields.
We rolled our own LDAP authorization. First I created a python module
that imported ldap from the python-ldap-2.2.1 package and wrapped in
functions that performed authentication and pulled selected data from
our corporate LDAP server. Then one of my partners used that to create
our own
as
they almost never fix bugs of that nature.)
Fortunately the menus provide access to current events so maybe this
SNAFU is ignorable.
Also I noticed "The Portal to the Universe" project. Are you guys
doing that one? If so, how can I help?
Rock
On Sep 11, 9:16 am, "[EMAIL PROTECTED]&quo
While I have used Django to emit csv files, I have also found
that my users are quite happy at times with simply cutting and
pasting data that I display in HTML tables via Django directly
into their spreadsheats. You might want to see if this is an
adequate option for some of your use cases. It
I can't believe that no one has mentioned the xlrd package:
http://scienceoss.com/read-excel-files-from-python/
http://pypi.python.org/pypi/xlrd/0.5.2
Then again I haven't used this one yet, much less tried to incorporate
it with Django.
Brox ... Nice writeup! Many thanks!
Now for my thoughts...
I have been using PyTables as an adjunct datastore along with
the Django ORM for almost a year. To me, BigTable looks a lot
like PyTables and, as such, I know that it can be be a great
supplement to the Django ORM in certain
I have no fixtures/initial_data-files anywhere in my project tree!
Actually, the only file named "initial_data" on my system is djtrunk/
tests/modeltests/fixtures/fixtures/initial_data.json. And that file
doesn't contain much.
The "ghost-users" only show up when I'm running "./manage.py test".
Thanks Russ, for your helpful comments!
I'm now searching for the initial_data fixture. I have looked through
all files in this project without success. When I run
python manage.py test
there is no such sentence as "Loading 'initial_data' fixtures", but
maybe there shouldn't be one? I've also
I'm using the unittesting-environment for test-driven-development in
Django. It works excellent, but one matter is puzzling. The Django
documentation tells me this:
"The test database
Tests that require a database (namely, model tests) will not use your
"real" (production) database. A separate,
You can create an intermediate base class that extends your base class
and includes elements like:
{% if actions %}
... show action table ...
{% endif %}
{% if element %}
... show edit element form ...
{% else %}
... show add element form ...
{% endif %}
and so forth and so on. Now your page
Put shared in site-packages right alongside django. Problem solved.
--~--~-~--~~~---~--~~
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
The templates have to be within a directory named "templates" found in
the /var/www/ directory.
BUT DON'T PUT TEMPLATES THERE! Put the templates dir in the same
directory as your settings.py
file and set the path accordingly in the settings.py file.
Here is another good alternative:
Comment
I would move the logic into a custom filter. This keeps it out of the
view and radically simplifies the template logic. It is easy to create
a filter that takes an argument, so the fact that you have two
inputs (page_number and current_page) is no problem.
On Jan 9, 11:02 am, "Prof. William
On Dec 5, 7:02 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
>
> If you're using CACHE_MIDDLEWARE_ANONYMOUS_ONLY you need a different
> middleware ordering, as the error message says. That setting is a real
> hack and I'd love to implement it in a better way some day. At the
> moment, though,
I wrote a utility to parse a model files as well as embedded comments
that provided data loading hints. It was trivial to do.
The utility used "cog" to generate a data loading program. That worked
like a charm even as the underlying models evolved. (This approach was
a "win" since the data
>
> > Talking through my hat?No, I think not -- I think that syntax
> > (``queryset.groupby(field).max()``)
> actually looks like the best proposal for aggregates I've seen thus far...
>
Sounds pretty good to me. Besides the usual min, max and such, I also
like:
queryset.groupby(field).stats()
applications based on Django and our ability to quickly
respond to requests for improvements has changed the dynamics of how
our entire division does much of its work.
Rock
On Nov 29, 11:51 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> On 11/30/06, Rob Hudson <[E
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?
> >
. It would be
nice to know what, if anything, is happening along these lines. I might
even be willing to spend some time on this during the holidays.
Rock Howard
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"D
One of my django apps contains testing data about every item our
company has manufactured over the last year or so. The database has
over 50 million rows of data. Despite this I have successfully migrated
the database several times. Sometimes it is trivial. Back up the data
for safety and then
how to upload a picture ,then add the url link of the picture to the
page's textarea content. Some bbs can do this . But how can I do like
this in django, any advice would be appreciated
--~--~-~--~~~---~--~~
You received this message because you are subscribed
I forget the details, but this has something to do with your time
and/or timezone setup. The default blog app doesn't post items that are
set "in the future". The time you set by seleting "now" in the admin
may or may not be the time that you think it should be because of the
server clock and
Well I switched to per view caching and it went off quite easily.
Thanks for the encouragement.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
I can confirm that the odd behavior that you are seeing comes from
setting up the global caching for a site. I see the same thing on a
site under 0.91 that uses global caching, but not at all on other
non-caching sites. (BTW, the work around is to periodically blow away
the files *admin* in the
This is not quite precise. I use two different databases on a single
installation. In fact, using the virtual hosting capability of apache
and modpython, I have one set of Django applications uses a PostgreSQL
database and an entirely different set of Django applications that use
a MySQL
falcon wrote:
> I still believe that
> many 'developers' could benefit from defining simple to moderately
> complex models on the web. If code needs to get more complex,
> developers can just switch back to using models.py.
>
I have gone in a different direction. I have written a tool to
I found a tiny difference in the http.conf files (AllowOveride was set
to "FileInfo" instead of "None".) I made that change, even though I
seriously doubted that it would make a difference. Then I bounced
apache and amazingly enough the new urls.py showed up.
I set the AllowOverride setting back
Yes I did. No help.
Then I forced the creation of a new urls.pyc by importing urls.py in
"python manage.py shell" and importing urls.py and explicitly checking
that the correct number of urlpatterns were defined. Still no joy in
the browser though.
Note that the access_log shows my request but
I have a development site where I can update myproject.urls.py and the
changes are acted upon immediately by my server. I just cloned this
site onto another computer and everything seems to be in order except
that on this new system, changes to urls.py are entirely ignored.
Nothing I do seems to
about in order to create my own filter?
Rock
--~--~-~--~~~---~--~~
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
Dropping down to the raw SQL level is easy...
Assuming my_sql_command is a string with your select statement...
from django.core.db import db
cursor = db.cursor()
cursor.execute( my_sql_command )
row = cursor.fetchone()
result = row[0]
You might prefer fetchall(), but I leave the data
Search for "forward reference" in this group. (Basically you cleverly
locate your import statement inside a function call.)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this
Mary,
In your templates directory you need a template named default.html.
Here is what mine looks like:
http://www.w3.org/TR/REC-html40/loose.dtd;>
{{ flatpage.title }}
{{ flatpage.content }}
--~--~-~--~~~---~--~~
You received this message because you are
Good catch, but this was just an example to show the poblem I was
facing.
FWIW, if someone really wanted to implement _pre_delete for Reporter as
discussed, they should add this version of the function to class
Reporter:
def _pre_delete( self ):
for article in
Ahhh. That makes sense. Thanks!
--~--~-~--~~~---~--~~
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 to
You would think so, but somehow that didn't work...
Precisely what import statement would you use.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
Well this is more of a python question I guess, but here goes.
Let's say that I am using the example model from
http://www.djangoproject.com/documentation/models/many_to_one/;>this
page in the documentation.
I decide to add a _pre_delete function to class Reporter that will
delete any articles
Wrong I think. There are already several Djangoids looking at making a
discussion forum together as an open project. I expect there will be
plenty of similar activities.
The problem is that Django is changing fast right now without regards
to backwards compatability. Wait until 1.0 hits and soon
"Django" is pronounced correctly in the screencast.
My view code for my calendar app can detect when a user supplies a bad
year, month or day, but I have no idea how to get Django to display an
application specific "500" page. I put a 500.html in my templates
subdir for the calendar app, but it is not found when a raise an
exception. It does look
71 matches
Mail list logo