ocgstyles,
Tried it...still no good
(r'^(?P[a-zA-Z]+)_(?P[a-zA-Z]+)/$', 'showline'),
On Jan 1, 11:23 pm, ocgstyles <[EMAIL PROTECTED]> wrote:
> I'm confused now too... :-/
>
> Try taking out the hyphen and see what happens...
>
> On Jan 1, 11:45 pm, Greg <[EMAIL PROTECTED]> wrote:
>
> > Todd,
http://www.djangoproject.com/documentation/django-admin/#runserver-optional-port-number-or-ipaddr-port
"Note that the default IP address, 127.0.0.1, is not accessible from
other machines on your network. To make your development server
viewable to other machines on the network, use its own IP
I'm confused now too... :-/
Try taking out the hyphen and see what happens...
On Jan 1, 11:45 pm, Greg <[EMAIL PROTECTED]> wrote:
> Todd,
> My app works fine. When I have the following line in my url file then
> everything works fine
>
> (r'^(?P[\w-]+)/(?P[\w-]+)/$', 'showline'),
>
>
Keith wrote:
> Is there a way to
> connect with the development server remotely
Absolutely!
By default the development server --only-- runs on localhost. If you
want to make it accessible via another interface (like the internet) run
it like this:
python manage.py runserver xxx.xxx.xx.x:8000
Greetings:
I am an absolute beginner at Python / Django / Web development. (Old
school COBOL, VB desktop apps. developer trying to update my skills.)
My son gave me some space to play in on an Apache server he rents. I
set up Django, created my first project, and ran it in the
development
> Hi everyone,
> Its almost the new year here, so Happy new year!
> Let me just say a big thanks to every one on the django-users list,
> who helped me with most of my questions, many of them inane. In
> particular James Bennet and Malcolm Tredinnick were very helpul.
> Django wont be as much fun
Hello,
I'm trying to install django following directions in The Django Book.
I would like to run with Postgres on my Debian etch system.
When I try to build psycopg2.0.6 I get the error messages shown below.
Would much appreciate any help to enable me to bring up a healthy
system.
All the
Thanks James. I dug further and noticed, that form.as_(table, p, ul)
are all part of the newforms library, and are not in the old. I'm
still fairly new to Django, so what do you think is the best approach
to handle these auth views at the moment, generic or custom?
On Jan 1, 10:09 pm, "James
Todd,
My app works fine. When I have the following line in my url file then
everything works fine
(r'^(?P[\w-]+)/(?P[\w-]+)/$', 'showline'),
/
It just doesn't work with I take out the '/' and replace it with the
'_'
On Jan 1, 10:25 pm, "Todd O'Bryan" <[EMAIL PROTECTED]> wrote:
>
Have you added the app to your INSTALLED_APPS ?
Maybe you should paste in your site's urls.py as well as the app's.
On Jan 1, 2008 11:09 PM, Greg <[EMAIL PROTECTED]> wrote:
>
> ocgstyles,
> I've tried the following combinations however I still get the Page Not
> Found error:
>
>
ocgstyles,
I've tried the following combinations however I still get the Page Not
Found error:
(r'^(?P[a-zA-Z-]+)_(?P[a-zA-Z-]+)/$', 'showline'),
(r'^(?P[-a-zA-Z]+)_(?P[-a-zA-Z]+)/$', 'showline'),
(r'^(?P[a-zA-Z\-]+)_(?P[a-zA-Z\-]+)/$',
'showline'),
(r'^(?P[a-zA-Z_]+)_(?P[a-zA-Z_]+)/$',
I thought you wanted to capture either words or hyphens, so I just
replaced \w, which also consumes underscores, with [a-zA-Z], which
doesn't consume the underscores. So the new regex
[a-zA-Z-]+
will consume one or more letters or hyphens. The one I replaced it
with should work for
No, because he doesn't want it to match the underscore. I think this works:
[-a-zA-Z]
because a hyphen in the first position matches a literal hyphen.
However, to be sure, you can use a backslash
[a-zA-Z\-]
For all regex questions, I highly recommend the Kodos app. It lets you
enter Python
I think that should be an underscore: [a-zA-Z_]
Owen
-Original Message-
From: Greg <[EMAIL PROTECTED]>
Sent: Tuesday, January 1, 2008 10:36pm
To: Django users
Subject: Re: Can I use a underscore in my url to separate variables?
ocgstyles,
I'm not sure
ocgstyles,
I'm not sure what's going on. What does the last '-' mean in the
following code [a-zA-Z-]? Occasionally I'm going to have the a url
that is going to have a '-' in the variable. For example
http://mysite.com/sprint-phone_cellphone. So I'm not sure if [a-zA-
Z-] is going to work.
On
On Jan 1, 2008 8:01 PM, ocgstyles <[EMAIL PROTECTED]> wrote:
> {{ form.as_table }}
>
> to print out the fields, but that's not happening. Any idea why?
Because not all components of Django have yet been rewritten to use
the newforms library; the fact that the form used here is defined by
Using the newforms-admin branch, you there are queryset hooks to aid
in this. Not tested, but you should be able to do something like this
in your model's admin class:
class SomethingModelAdmin(admin.ModelAdmin):
def queryset_change(self, request):
return super(SomethingModelAdmin,
worked for me using the following:
[urls.py] (i removed the single quotes around the view)
from myapp.views import showline
(r'^(?P[a-zA-Z-]+)_(?P[\w-]+)/$', showline),
[views.py]
def showline(request, manufacturer, line):
return HttpResponse('manu = ' + manufacturer + 'line = ' +
line)
ocgstyles,
I tried the following however I'm still getting a page not found
error:
(r'^(?P[a-zA-Z-]+)_(?P[\w-]+)/$', 'showline'),
On Jan 1, 8:23 pm, ocgstyles <[EMAIL PROTECTED]> wrote:
> Hi Greg,
>
> The problem is that "\w" is consuming the underscore. Instead of
> using [\w-], use
Hi Greg,
The problem is that "\w" is consuming the underscore. Instead of
using [\w-], use [a-zA-Z-]. The pattern would then look like:
(r'^(?P[a-zA-Z-]+)_(?P[\w-]+)/$', 'showline')
Hope that helps.
Keith
On Jan 1, 9:05 pm, Greg <[EMAIL PROTECTED]> wrote:
> Hello,
> I orginially had my url
Hello,
I orginially had my url like this:
(r'^(?P[\w-]+)/(?P[\w-]+)/$', 'showline')
Which would work fine when going to the url 'www.mysite.com/sprint/
cellphone/'
//
However, I want to change my url structure so that all of my pages are
as close to the root as possible. So I
Hello,
I am just curious if there is anyone out there that has used django to
create things other than web applications.
I've seen it done where I work-- we use django for our print accounting
scripts.
Does anyone else use django for a framework?
Jeff Anderson
signature.asc
Description:
I have a questions regarding the generic authentication views. Lets
take the password_change view for example:
django.contrib.auth.views.password_change
When I look at the source, I can see that the view returning the form
PassswordChangeForm as part of the context. So I would imagine in my
On Jan 2, 2:06 pm, crybaby <[EMAIL PROTECTED]> wrote:
> I have commented out this from settings.py,
> #'django.contrib.contenttypes',
>
> and syncdb and fixtures are working.
>
> I am running python 2.4.3 on Fedora 6 and django svn revision # 6980.
>
> What impact commenting out contenttypes
I have commented out this from settings.py,
#'django.contrib.contenttypes',
and syncdb and fixtures are working.
I am running python 2.4.3 on Fedora 6 and django svn revision # 6980.
What impact commenting out contenttypes would have on django project?
I was reading and poking around, and I found this:
http://code.djangoproject.com/wiki/CookBookNewFormsDynamicFields
I believe it explains how to accomplish what you want to do.
Cheers!
Jeff Anderson
Jeff Anderson wrote:
> Actually, I just got an idea for a simple website, and it would need the
I'll suggest the sortable in ui.jquery.com for front end. On
ordering you may want to run some serialize function in JavaScript and
submit with AJAX to a function that writes the order. Another flavor
is to simple put move_up and move_down functions to your model. There
is an example of this on
I'm having a strange problem trying to get a django site running on a
Solaris-8 server. (This OS is definitely not my choice, but it's what
I must use..)
I have a simple project set up using a the postgresql_psycopg2 backend
and I am able to use the 'manage.py shell' to connect to the postgres
> Would a separate model be appropriate to accomplish this?
Perhaps. You didn't say how large the data set is. If there is only
one ordering, then simply having an additional integer field on the
model might be more useful. That way you can do something like:
objs =
Thank you Chris, I will definitely go over the tutorial as well as
reading the URL dispatch. Incidentally, I notice Apache has the
mod_write URL rewriting engine.
Cheers.
On Dec 30 2007, 3:45 pm, SmileyChris <[EMAIL PROTECTED]> wrote:
> On Dec 31, 7:03 am, goober <[EMAIL PROTECTED]> wrote:
>
>
I tried out this change, and it works well. I've created a ticket
(http://code.djangoproject.com/ticket/6295) with a patch.
--Ned.
http://nedbatchelder.com
Ned Batchelder wrote:
> Malcolm, thanks for continuing this (I was away for a few days). I
> was thinking about the forloop internals as
Hello,
I'm trying to create an app that uses "dynamic" forms, where the
number of fields can be increased and decreased by the user. It would
be something like this: the form starts out with fields to input a
mailing address. Then, when the user is finished adding that address,
he has the option
hedronist wrote:
> 1. How many objects are we talking about? 10? 100? 10^6?
No more than 10
> 2. Can a single object participate in multiple orderings?
>
no, there would be one order for the set of objects
> If the amount of data is small, you could simply save the ordering in
> a
> I want to give my users the ability to drag the objects around (or use
> some other method) to define a new sort order.
>
> This sort order has nothing to do with the data. I want to save this
> order in the database, so it can display them in that order.
Ah! Now I see. Let me try again to be
Thanks Todd.
I came up with this:
def get_services():
d = {}
for p in Profile.objects.all():
for s in p.services.all():
if not d.has_key(s.slug):
d[s.slug] = s.name
return d
So I pass this function as extra context (service_list) to the
template. When I try
This message has been reported to Google.
On Jan 1, 2:07 pm, aziz <[EMAIL PROTECTED]> wrote:
> Hi Hi Hi
>
> My name is aziz, I am from ( saudi ),
>
> I’ve seen many places of the world on TV screen and few that I’ve
> visited either for fun or/and business
>
> As you know when we travel
Hi Hi Hi
My name is aziz, I am from ( saudi ),
I’ve seen many places of the world on TV screen and few that I’ve
visited either for fun or/and business
As you know when we travel we meet a lot of different cultures and
people,
I found in many places I’ve been to; that people
hedronist wrote:
> Google is your friend.
>
> http://www.google.com/search?q=javascript+table+sort
>
> I particularly like jQuery as a Javascript library, so I suggest
> looking at:
>http://tablesorter.com/docs/
>
Sorry, I already ran that google search and found that same widget,
hence my
Er, correction, you *do* want the trailing /.
> urlpatterns = patterns('',
> (r'^subDir/djangoApp/',include('app_dir_name')),
> )
> Note: No $ -- this is a head match.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
> And when I want to edit 'Something' on the admin site then the
> companies also appear in this order within the select element. Is it
> possible to change this?
Good question! I don't have the One true Answer, but I do have a hack.
WARNING: The following is a vile and despicable hack!
On Jan 1, 2008 10:30 AM, Przemek Gawronski <[EMAIL PROTECTED]>
wrote:
>
> > can you explain a bit clearly what you want to do?
>
> If I have a form (newform) with a ImageFiled (probably the same with a
> FileField) and in the template I use {{ form }} to display this form,
> the text field and
>The problem I am having is HOW to I get the
> now-run WSGI app to display as the page in Django?
The following is a bunch of off-the-top-of-my-head rambling.
1. If hgweb is running independently:
1a. Let Django generate a page that uses frames or an iframe to
encapsulate the hgweb page.
> I'll probably need some sort of custom javascript sorting widget thingie
> to get it to behave and look nice. I have no idea where I might find
> one.
Google is your friend.
http://www.google.com/search?q=javascript+table+sort
I particularly like jQuery as a Javascript library, so I suggest
Sure enough it was a "doh"moment, one too many "media_path"s, which
Django was resolving to "media_path/media_path/someFile".
Thanks for all the help,
Cheers!
On Jan 1, 1:26 am, Jeff Anderson <[EMAIL PROTECTED]> wrote:
> I am sure it is just one of those "doh!" issues where it is something
>
> can you explain a bit clearly what you want to do?
If I have a form (newform) with a ImageFiled (probably the same with a
FileField) and in the template I use {{ form }} to display this form,
the text field and the button you press to select a file are right next
to each other, and I want some
On 01-Jan-08, at 6:36 PM, Przemek Gawronski wrote:
> Hi, I want to separate the file name text field from 'select'
> button in
> ImageField from newforms. What would be the cleanest way to do this?
can you explain a bit clearly what you want to do?
--
regards
kg
maybe you'll use a set on the result so you don't have duplicates,
a least i think so..
On Jan 1, 2:04 am, "Todd O'Bryan" <[EMAIL PROTECTED]> wrote:
> There's probably an easier/more efficient way to do it, but you can do
>
> services = []
> for p in Profile.objects.all():
> services +=
Hi, I want to separate the file name text field from 'select' button in
ImageField from newforms. What would be the cleanest way to do this?
Przemek
--
AIKIDO TANREN DOJO - Poland - Warsaw - Mokotow - Ursynow - Natolin
info: http://tanren.pl/ phone:+4850151 mailto:[EMAIL PROTECTED]
Hi Friend,
I wish u a HAPPY AND PROPURS NEW YEAR 2008.
IF you want to meet your old school & college mate's of your life
there is a chance, just enter school or college details in the below
site
http://www.batchmates.com/MGMhome.asp?refid=1529710=31481
PLEASE REGISTER
Hello,
I have a model that would like to be manually sorted. Currently, I am
just using at integerfield, and sorting it in the view by that field. I
have to assign completely arbitrary values to the integerfield to get
the desired results. I'd like to make it a bit more user friendly if
possible.
50 matches
Mail list logo