My error is not being able to get the ID passed to the next
template.
The code:
http://dpaste.com/108580/
Thank you,
May
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To po
Hello,
I tried the URL and still received this error:
Page not found (404)
Request Method: POST
Request URL:http://127.0.0.1:8000/fsafety//commodity_detail/
I think now that the ID is not getting passed to this line:
Thank you for any help you can give.
May
On Jan 13, 10:25 am
Hello All,
Thank you for the suggestions. I am getting closer to figuring it
out. Now my error is this:
commodity() takes exactly 2 arguments (1 given)
My URL is:
(r'^commodity/$', 'commodity'),
The Form statement:
Thank you!
May
On Jan 13, 10:56 am, Wai Yi Le
hanks again!
May
On Jan 13, 1:11 pm, Wai Yi Leung wrote:
> You should rewite the method:
>
> def commodity(request, commodity_id):
> p = get_object_or_404(Commodity, pk=commodity_id)
> return render_to_response('fsafety/commodity_detail.html',
> {'co
SETTINGS_MODULE myprojects.settings
PythonDebug On
SetHandler None
SetHandler None
When I try to start Apache the error is "The requested operation has
failed!
My path is C:/django/myprojects
Thank you for any help!
May
--~--~-~--~~~---~--~~
You received this
Ad addendum to message:
This is a windows XP server.
May
On Jan 22, 8:55 am, May wrote:
> Hello,
>
> I'm trying to set up the Apache server with mod_python. The Apache
> server works, until I had the following code to the bottom of
> http.conf file:
>
> SetHandler p
Hello Tonu,
Yes, I tried that as well and still the server won't start.
Thanks,
May
On Jan 22, 9:01 am, Tonu wrote:
> I wonder if you need SetHandler None? Try eliminating those two
> lines. Other source of information for troubleshooting is apache
> error log file.
>
>
Oh, Thank you, Karen!! Yes, that was the problem.
May
On Jan 22, 9:12 am, Karen Tracey wrote:
> On Thu, Jan 22, 2009 at 11:55 AM, May wrote:
>
> > Hello,
>
> > I'm trying to set up the Apache server with mod_python. The Apache
> > server works, until I had
python
SetEnv DJANGO_SETTINGS_MODULE myprograms.settings
PythonDebug On
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE cpssite.settings
PythonInterpreter cpssite
PythonDebug On
Now the server quits at ch
Thank you Malcolm! Fixing the typo worked! It has been such a
struggle to find the right syntax for windows and mod python that I
had lost all confidence to think a typo could be the problem, so I
wasn't careful enough to check.
Thanks, again,
May
On Jan 22, 4:46 pm, Malcolm Tredi
file:
TEMPLATE_DIRS:
'C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/
templates',
INSTALLED_APPS:
'django.contrib.admin',
URL file:
(r'^admin/(.*)', admin.site.root),
Is there something I should be adding to the http.co
g On
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE cpssite.settings
PythonInterpreter /cpssite
PythonDebug On
SetHandler None
May
On Jan 23, 12:15 pm, Austin Gabel wrote:
> What do you have for MEDIA_ROOT, MEDIA_URL, and ADMI
Hello,
I changed the URL from this:
(r'^admin/(.*)', admin.site.root) (this works, but no CSS)
to this:
(r'^admin/', include('django.contrib.admin.urls')),
I received this error:
No module named urls
May
On Jan 23, 12:15 pm, Austin Gabel wrote:
>
Hello,
I'm converting PHP pages to Django. I'm using base.html for my
formatting. I've included the left-side bar in the base.html, which
includes links that do not require using a database, such as the
"contact us" page. Since I'm using localhost for testing my link
looks something like this
thru Django work.
>
>
>
> On Tue, 2009-01-27 at 08:42 -0800, May wrote:
> > Hello,
>
> > I'm converting PHP pages to Django. I'm using base.html for my
> > formatting. I've included the left-side bar in the base.html, which
> > includes li
>
> It is quite discouraged to have Django serve static pages on a
> production server since it's not meant for that, so it's slow and
> inefficient.
>
>
>
> On Tue, 2009-01-27 at 09:06 -0800, May wrote:
> > Hello,
>
> > The tutorial suggests not se
a temp place.
>
> Perhaps somebody else can better explain eggs.
>
>
>
> On Tue, 2009-01-27 at 09:42 -0800, May wrote:
> > Hello Adam,
>
> > Thanks! I have already set up several sections for the
> > django site, so I must not have the syntax quite right for apa
Hello,
I have the admin templates with CSS working under local server windows/
apache/modpython. Now I would like to get my site css files to work
under apache.
The settings and http.conf code is here:
http://dpaste.com/114010/
I can place mysite css and images under the apache htdocs, but I c
Hello,
I am extracting data from a postgres table into an html table. I have
two columns.
The user can select the link in this column, the link will be returned
through the URL and view.py to extract more information from the
postgres table:
{{ researchproject.restitle|
safe }}
This column wi
Thanks all! I needed to put the curly brackets around the website
variable. Dumb mistake on my part. It works now!
Thanks!
{{ researchproject.institution|
> > safe }}
On Jan 28, 2:15 pm, Karen Tracey wrote:
> On Wed, Jan 28, 2009 at 4:28 PM, May wrote:
>
> > Hello,
>
documentation it doesn't explain any of the
above very well. I am a PHP programmer, so maybe my previous
experience tainted me from looking at the django configuration
differently than how I would have built a web page in PHP under
Apache.
Than
ags for italics or two; suggest how to get the search to strip the
tags?
Thanks,
May
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-
')
if query:
qset = (
Q(pubtitle__icontains=query) |
Q(pubauthors__icontains=query)
)
Thanks!
May
On Feb 6, 11:52 am, Jeff FW wrote:
> The issue has nothing to do with your templates--it has to do with
> your data, and how you're searching
Creating a duplicate field without tags looks like it might be the way
to go, then. I just hate the redundancy of two fields of data.
Thanks to both you and Jeff!
May
On Feb 6, 12:30 pm, Karen Tracey wrote:
> On Fri, Feb 6, 2009 at 3:05 PM, May wrote:
>
> > I have data entry c
Hello,
I have spent too much time on this problem and am beginning to think
that it
can't be done in Django. I am pulling a list of pathogen names from a
postgres
database to a drop down box. The user selects the pathogen, which
requires the id
to be passed back through django to the database fo
I need to get the institution name through an intermediary table (two
foreign keys) to display in a template.
The code is here:
http://dpaste.com/122204/
Thank you anyone,
May
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
Hello Karen,
Here are my views and models:
http://dpaste.com/122204/
http://dpaste.com/14/
The manytomany table is actually a tertiary table. I was just trying
to use django terms, so people would understand what type of table.
Thanks for your help!
May
On Feb 18, 11:33 am, Karen
The complete view is here:
http://dpaste.com/17/
On Feb 18, 11:46 am, May wrote:
> Hello Karen,
>
> Here are my views and models:
>
> http://dpaste.com/122204/
>
> http://dpaste.com/14/
>
> The manytomany table is actually a tertiary table. I was just tryin
ts = Project.objects.filter(qset).distinct() # original
else:
results = []
return render_to_response("search/search.html", {
"results": results,
"query": query,
})
On Feb 18, 11:58 am, Karen Tracey wrote:
> On Wed, Fe
.
Thanks,
May
On Feb 18, 11:55 am, Angel Cruz wrote:
> this off topic, but i am saving these postings in my gmail. The problem
> with putting your code in dpaste is that in 29 days, that link is invalid,
> and when I look upon this thread in the future, I will have no idea what
> your
have. Resolving this problem will probably solve my admin template
issue, which is that on the publication screen, I can reveal a contact
for the publication, but I can't reveal the institutions the contact
is associated with.
May
On Feb 18, 1:01 pm, Karen Tracey wrote:
> On Wed, Feb 18, 20
I have a manytomany relationship between publication and pathology.
Each publication can have many pathologies. When a publication appears
in the admin template, I need to be able to see the many pathologies
associated with that publication. Here is the model statement:
class Pathology(models.Mod
hello .. please add me, i like to learn ..
On Saturday, February 1, 2020 at 4:42:52 PM UTC+3, Srikanth K wrote:
>
> Hi,
>
> I am from Hyderabad. I am Python Developer by Profession. I am eager take
> up any Python , Django Training (online Preferrable or Weekends). Members
> who require can c
silly to have to duplicate everything for every tag.
However the documentation seems to suggest it is not possible to
simplify this?
--
Brian May
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users"
eturn HttpResponseRedirect("/2009/message/%s/" % msg)
>
> return wrapper
> --end of decorator
>
> obviously this f(*args,**kwargs) is not the correct way to call the view. Any
> clues?
I have never written a decorator, so I may be completely off here, however
shou
do that?
The only line containing QWERTY is commented out, and even if it wasn't
commented out it does nothing. Maybe you meant to say:
self.fulltitle = self.title = 'QWERTY'
As such, what you have is:
self.fulltitle = self.title
self.title
mpt to pass kwargs instead of args (which doesn't work
- seems so obvious now...).
I think django is great, unfortunately sometimes the documentation is lacking.
--
Brian May
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Goo
-to-many relationships are a different story. You do have to be
careful here.
--
Brian May
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-use
On Fri, Jul 31, 2009 at 08:04:50AM -0700, When ideas fail wrote:
> Is there a way i can stopped people who are already logged in logging
> in again?
My initial thought - this sounds risky - for a website.
How do you know if the user is already logged in?
The computer they were using ma
sequence for the second parameter in
> this case, because we only want to pass keyword parameters, not
> positional ones.
> ---
> isn't it the right text?
Yes, you are right. Not sure how I missed this now. Repeatedly. :-(
--
Brian May
--~--~-~--~~---
uldn't it help here too?
{% for i in object.object_set.select_related %}
...
{% endfor %}
Or have I misunderstood how select_related works?
--
Brian May
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Dja
.
So I have two fields, one for the datetime in UTC, and another one for the
timezone. I have a template filter (or tag - my memory is fuzzy) to convert the
UTC time to the specified timezone for displaying.
--
Brian May
--~--~-~--~~~---~--~~
You received this m
ody
please provide a link to the discussion?
Thanks.
- Forwarded message from Brian May -
Date: Fri, 13 Mar 2009 12:26:12 +1100
From: Brian May
Subject: selecting foreign keys
To: undisclosed-recipients: ;
Newsgroups: gmane.comp.python.django.user
Hello,
A frequent problem people seem to
lresolvers import reverse
>>> reverse('person_list')
'/photos/person/'
So it would appear that on Debian Lenny, reverse URLs are broken when using
include(...)
Are there any known compatibility issues with Django and Debian Lenny?
If not, how do I debug this issu
On Fri, May 22, 2009 at 10:06:50AM +1000, Brian May wrote:
> urlpatterns = patterns('',
> [...]
> (r'^(.*)', include('microcomaustralia.zoph.urls'))
> [...]
> )
Errr... Sorry, found out it was my fault. That should be:
(r'^', include(
:
models.Photo.objects.filter(album=myalbum)[n]
However this would seem to mean that the URL in the search results
includes n (instead of the photo id), and as such may refer to the wrong
photo if the search results change.
Any ideas, suggestions?
Any better ways of doing this?
Thanks
On Tue, May 26, 2009 at 01:28:07AM -0700, antoxa.sido...@gmail.com wrote:
> Tried to do it with a Paginator class?
>
> Maybe this link can help You
> http://docs.djangoproject.com/en/dev/topics/pagination/
Yes, I guess I could do it with paginator, and 1 object per page.
Howeve
On Thu, May 21, 2009 at 10:45:06AM +1000, Brian May wrote:
> A frequent problem people seem to have with Django[1] is the default
> interface for selecting foreign keys is slow and clumsy to use if there
> are lots of selections. To the best of my knowledge there is no solution
> i
erent data types, and rather not have
to create a custom tag for every one. If I can help it.
Thanks.
--
Brian May
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this gr
On Thu, May 28, 2009 at 11:36:10PM -0500, Alex Gaynor wrote:
> Loops put some vary helpful variables in the context, so you can do
> something like:
>
> {% for pp in object.photoperson_set.all %}{{pp.person}}{% if not forloop.last %},
> {% endif %} {% endfor %}
Thanks. Looks l
On Fri, May 29, 2009 at 02:03:59AM -0700, Daniel Roseman wrote:
> Alternatively, you could use the join filter:
>
> {{ object.photoperson_set.all|join:", " }}
I considered that, however, I don't think I can set the tag for every
person, and the result would be I cna
On Fri, May 29, 2009 at 01:50:38AM -0700, V wrote:
> if you do this to get a comma separated list you might like
> https://launchpad.net/django-export-csv
No, I don't use CSV here, but it is nice to know such a facility exists - I have
used CSV for other projects. Thanks.
--
t one stage, and it seemed fine, until I realized non-ascii (UTF8
I think) characters were being siliently currupted.
Of course django has changed a lot since then so this may no longer be an issue.
I also tried sql dump with sql, however at the time I couldn't work out how to
get sqlite to du
in the
index,
meaning it can't be used.
--
Brian May
--~--~-~--~~~---~--~~
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 unsu
ase changed
after doing a loaddata/dumpdata. I could reproduce this on demand.
I don't expect anybody to take my claims too seriously, the problems I
encountered were probably fixed ages ago. I don't like to assume something is
fixed though unless I ha
> arguments '()' and keyword arguments '{'args': u'my_name'}' not found.
I haven't double checked, but I think that should read:
{% url public_comments user.username %}
or
{% url public_comments username=user.username %}
--
Brian May
--~--~---
apps may be written by multiple people.
This raises some issues:
* If you are writing an app that is designed to be reusable, and comes
with say a JavaScript file, what path should you use to reference the
file? Different people seem to have different directory structures for
media files, and the
Hi,
I have Django running under Apache with mod_wsgi. I've got a simple URL
handler that looks like this:
def handler(request):
response = None
if request.method == 'POST' or request.method == 'PUT':
response = HTTPResponse(status=201)
elif request.method == 'GET':
Assuming the code you've posted is a real cut and paste, you have
"HTTPResponse" for POST but "HttpResponse" for GET. Python is case-
sensitive, so only "HttpResponse" will work.
Thanks, that was it. Are errors like that written to a log file anywhere?
Thanks again,
Patrick
--
You received
Can you make it fail in the development server, with DEBUG turned on?
If so, you can get more helpful error display and/or do pdb.set_trace() and
poke around.
I'll give that a try, thanks!
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To p
I'm running Django using mod_wsgi under Apache. I'm trying to
write messages to the Apache error log with:
sys.stderr.write('Message...')
but for some reason they don't appear. This is under OS X (Snow Leopard). Do
I have to configure something in httpd.conf t
On Jan 5, 2:18 pm, Karen Tracey wrote:
> On Tue, Jan 5, 2010 at 1:55 PM, Patrick May wrote:
>
> > I’m running Django using mod_wsgi under Apache. I’m
> > trying to write messages to the Apache error log with:
>
> > sys.stderr.write(‘Me
On Jan 5, 2:29 pm, Karen Tracey wrote:
> On Tue, Jan 5, 2010 at 2:22 PM, Patrick May wrote:
>
>
>
> > On Jan 5, 2:18 pm, Karen Tracey wrote:
> > > On Tue, Jan 5, 2010 at 1:55 PM, Patrick May > >wrote:
>
> > > > I’m running Django
On Jan 6, 3:22 pm, Rob wrote:
> Have you managed to figure this out - I'm having a similar (I believe
> the same) issue.
It was the typo pointed out by Daniel Roseman. You may need to turn
on a more detailed debugging level in your httpd.conf to see it in the
log.
Good luck,
Patr
On Jan 5, 1:55 pm, Patrick May wrote:
> I'm running Django using mod_wsgi under Apache. I'm trying
> to write messages to the Apache error log with:
>
> sys.stderr.write('Message...')
>
> but for some reason they don'
Hello,
I would like to be able to create a Django Channels group such that:
1. Websockets can can subscribe and unsubscribe (or disappear) to group
that the client specifies.
2. When the first client subscribes to a group, it starts some process
(e.g. via celery task) that feeds thi
On Friday, 2 June 2017 13:04:48 UTC+10, Andrew Godwin wrote:
>
> You can't do what you ask with the current Groups system - it is
> deliberately very simple as anything more complex involves picking scaling
> tradeoffs that are particular to the thing it's powering. You'll have to
> layer some o
On Friday, 2 June 2017 14:08:40 UTC+10, Andrew Godwin wrote:
>
> I don't have any direct examples to hand - and this sort of thing does
> come all the time, but much like Django is not in the business of including
> a full CMS, Channels can't add lots of high-level features without really
> narr
You can use pyinstaller to convert your py file to exe
On Sun, Jul 21, 2019 at 5:57 PM Mike Dewhirst wrote:
> Try searching for python to exe
>
>
> *Connected by Motorola*
>
>
> Balaji Shetty wrote:
>
> Hi
>
> Can anyone please tell me
> how to convert django application to Windows exe format.
Pip install pyinstaller and then run “pyinstaller — onefile filename.py”
On Sun, Jul 21, 2019 at 6:01 PM Jonathan May wrote:
> You can use pyinstaller to convert your py file to exe
>
> On Sun, Jul 21, 2019 at 5:57 PM Mike Dewhirst
> wrote:
>
>> Try search
try this:
from django.db import models
# Create your models here.
class Product(models.Model):
item_name = models.CharField(max_length=100)
item_price = models.IntegerField()
item_image = models.ImageField()
def __unicode__(self):
return self.item_name
class Meta:
# Do no
71 matches
Mail list logo