Hi all,
How do I use widgets on the field of a template(not forms)? Let's say
I have a field called Member, and this field should be in select form
that has choices from members table (field: member_name)?
tried using select option on html, but it ain't seem to work. any
inputs? Thanks.
--
You
On Friday, March 18, 2011 2:08:02 AM UTC, django beginner wrote:
>
> Hi Django users,
>
> I am having some dilemma over converting simple admin page *Template*(without
> having to use the built in django-admin functionality) by using
> forms, and not templates, I have the following sample Admin
On Friday, March 18, 2011 7:29:09 AM UTC, django beginner wrote:
>
> Hi all,
>
> How do I use widgets on the field of a template(not forms)? Let's say
> I have a field called Member, and this field should be in select form
> that has choices from members table (field: member_name)?
>
> tried us
On 17 Mar, 22:54, Matt Robenolt wrote:
> You set up a 'media.aplikacje' alias in your nginx config, but your
> media is still attempting to be pulled from 'aplikacje/media/', so at
> this point, your MEDIA_URL is wrong. MEDIA_URL needs to be 'http://
> media.aplikacje/'
I change it couple times
Hello
As we know, Exchange is a very demanding solution, and in many if not
all cases requires a dedicated engineer for maintenance.
If you just want to share the outlook data with multiple computers and
be able to grant access rights to shared folders.
You can just check to see whether WinPST can
has anyone got any code to share on how to make the email appear to be
from the person who is submitting the form.
you'd think it'd be simple, but i cant work out how to do it.
i run a local smtp server on the django server, so if its about not
appearing to relay for spam reasons, i can get past
I found it !!
I figured that for intranet use I don't need two server{} statment in
conf, I just delete the one with media and re-write location to
second. And now it's workin super.
Thanks to everyone for help.
On 18 Mar, 10:18, maciekjbl wrote:
> On 17 Mar, 22:54, Matt Robenolt wrote:
>
> >
Hi all
I'm running on Windows 7 64-Bit
The Pyton version is:
Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit
(Intel)] on win32
Django-version: 1.2.5
I have just installed this on a new machine, on the older one it
worked with no problem.
The new machine is Lenovo Thinkpad
Hi All,
I did not find anything about that topic so I am probably missing one
big thing here. I would be really glad to have your opinion so first
let me start by quoting the Djangobook:
"""
A Word About Pretty URLs
If you’re experienced in another Web development platform, such as PHP
or Java,
On Friday, March 18, 2011 10:34:03 AM UTC, Christophe wrote:
>
> Hi All,
>
> I did not find anything about that topic so I am probably missing one
> big thing here. I would be really glad to have your opinion so first
> let me start by quoting the Djangobook:
>
> """
> A Word About Pretty URLs
It is because your admin models are registered in models.py. If you
register them in admin.py you will not observe this problem. Just move
the RecordAdmin class and the registration into admin.py (although if
you want to, I'm pretty sure only the registration has to be in admin.py
if you impo
Hiya, thanks for the reply.
So in this case the extra fields are actually denormalized subsets of the
original field, and the reverse relation can use the main field. (At least,
at the moment, that's my plan, but that could change. Which I guess goes to
show how rare this case probably actual
Is there any secury issues by using adminfield in normal user forms?
2011/3/17 Shawn Milochik
> I believe you can filter them using ModelAdmin.formfield_for_choice_field.
>
> Check out the docs here:
> http://docs.djangoproject.com/en/1.2/ref/contrib/admin/
>
> Shawn
>
> --
> You received this m
The formfield_for_choice_field method can be overridden to change the
default formfield for a field that has declared choices. For example, if the
choices available to a superuser should be different than those available to
regular staff.
That doesn't seem to be the case, because the staff and th
On Fri, Mar 18, 2011 at 11:07 AM, shofty wrote:
> has anyone got any code to share on how to make the email appear to be
> from the person who is submitting the form.
>
> you'd think it'd be simple, but i cant work out how to do it.
>
It is simple:
https://bitbucket.org/ubernostrum/django-contac
If I want to define a global variable that can be accessible by all of
my views can I just define it at or near the top of my views.py and
and also outside of any defined view?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this grou
Hi everyone!
Without using raw SQL queries how can I make multiple joins using this
model?
I'm trying to get something like this:
SELECT Package.package, Release.release, Release.version,
ContribComment.*
FROM ContribComment
INNER JOIN Contrib
ON Contrib.id = ContribComment.fk_contrib_id
INNER J
Can you set it in the settings.py file for your project? You can then import
the Django settings in your views with:
from django.conf import settings
and call the variable with settings.my_var_name when needed.
--
You received this message because you are subscribed to the Google Groups
"Djan
If it doesn't change, you can put it in the settings.
On Mar 18, 2011 9:30 AM, "hank23" wrote:
If I want to define a global variable that can be accessible by all of
my views can I just define it at or near the top of my views.py and
and also outside of any defined view?
--
You received this me
Thank you for your prompt reply Daniel!
Let me clarify by detailing the example provided above:
In my hypothetical form "formexample" on my hypothetical page "time/
plus/3/", do you agree that if I put a relative URL in the action
field, like: action="myscript" it will eventually trigger a call t
I'm currently working on a new project which will have multiple
applications built within it, and which will all be using the same
database. I'd like to setup a global name for each application so I
can use them to format audit fields for each application whenever
database updates are taking place
On Fri, Mar 18, 2011 at 1:57 PM, Christophe wrote:
> Thank you for your prompt reply Daniel!
>
> Let me clarify by detailing the example provided above:
>
> In my hypothetical form "formexample" on my hypothetical page "time/
> plus/3/", do you agree that if I put a relative URL in the action
> fi
If I'm understanding your correctly, you don't have a Django problem here.
You are instead looking to change the way that browsers submit forms, or
at least make it look that way.
If you can require your users to enable JavaScript on your pages, you con
include a script that is called upon submit
newbie here,
I'm running into a template syntax error where (as far as I can tell)
there shouldn't be one (yes, I've loaded my tags file before I tried
invoking my tag). I'm looking for help on how to debug it. I'm running
Django trunk.
I'm using template inheritance with a custom tag for paginati
Tom, thank you for redirecting me to reverse() and {% url %}, I
suppose it will solve my problem.
Btw, I tend to disagree when you write "never use relative URLs", for
the reason I stated above (relocating a webapp), on the other hand I
totally agree with "never manually create a URL"!
Bill, I do
On Fri, Mar 18, 2011 at 10:02 AM, Christophe wrote:
> Btw, I tend to disagree when you write "never use relative URLs", for
> the reason I stated above (relocating a webapp), on the other hand I
> totally agree with "never manually create a URL"!
if you let Django manage the URLs, it won't have
On Fri, Mar 18, 2011 at 2:57 PM, mik3langelo wrote:
> i got a problem that drains me. I created an application/interface
> that a certain thing would need to create a file on a particular
> share. problem is that I get IOError code 13. There are some
> restrictions in Django that they not know?
>
Are you certain that your base template is structured properly? Check
for missing closing tags.
It may be that your template is correct but just inheriting a syntax problem.
Shawn
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this
Thanks Shawn,
That's a good tip. I'll check when I get back home and give an update
On Mar 18, 8:17 am, Shawn Milochik wrote:
> Are you certain that your base template is structured properly? Check
> for missing closing tags.
> It may be that your template is correct but just inheriting a syntax
You can't import a specific variable, you import the settings "package" and
access the variable from it:
from django.conf import settings
print settings.APP_NAME1
But as Calvin says, this should not change throughout the project. It's
essentially a constant.
--
You received this message becau
On Friday, March 18, 2011 2:48:31 PM UTC, Mazery Smith wrote:
>
> newbie here,
> I'm running into a template syntax error where (as far as I can tell)
> there shouldn't be one (yes, I've loaded my tags file before I tried
> invoking my tag). I'm looking for help on how to debug it. I'm running
That is correct. The point of the separate subdomain is to help deployments
for the web. It's nicer and simpler sometimes to separate a domain or even
an entire server dedicated for media or S3.
On an intranet, you have a bit more flexibility. :)
--
You received this message because you are su
Hi,
I need some help about how to create a postgres database for django in
Ubuntu.
I am planning to use the authentication feature of Django and the first step
is to have a DB already created but i don't know how to do it.
Thanks,
--
You received this message because you are subscribed to the
I have rights to read / write on that share. If I run the console the
same thing I want to make it into the interface it works.
On Mar 18, 5:10 pm, Tom Evans wrote:
> On Fri, Mar 18, 2011 at 2:57 PM, mik3langelo wrote:
> > i got a problem that drains me. I created an application/interface
> > th
Log into the PostgreSQL console using the psql command. Or manage.py dbshell.
CREATE USER username PASSWORD 'secret' CREATEDB;
CREATE DATABASE dbname OWNER username;
That ought to do it. Also, you only need the CREATEDB if you plan to
run unit tests, so don't bother with it in production. It give
On Fri, Mar 18, 2011 at 3:51 PM, mik3langelo wrote:
> I have rights to read / write on that share. If I run the console the
> same thing I want to make it into the interface it works.
>
Computers aren't magic - if 'you' have access to read/write that
'share', and 'django' doesn't, then the logica
On Fri, Mar 18, 2011 at 4:00 PM, Juan Gabriel Aldana Jaramillo
wrote:
> Hi,
> I need some help about how to create a postgres database for django in
> Ubuntu.
> I am planning to use the authentication feature of Django and the first step
> is to have a DB already created but i don't know how to do
Is it possible to move data from one posted screen text field to
another? I have a group of three screen text fields which are
identical in all ways except one. Only the first one is required,
while the other two are optional. So if a user mistakenly enters data
into say field two or field three, w
OK thanks.
On Mar 18, 10:35 am, Matt Robenolt wrote:
> You can't import a specific variable, you import the settings "package" and
> access the variable from it:
>
> from django.conf import settings
> print settings.APP_NAME1
>
> But as Calvin says, this should not change throughout the project.
It's possible to do this by manipulating the post data. It's probably
cleaner (and more easily reusable) to do it in the form's __init__
than in the view itself, though.
I don't know what these fields are meant to contain, but assuming one
is more important than the others, what if they leave the
Thanks for the response DR.
Isn't the "template tag library" already loaded in my example with
this line:
{% load page_tags %}
My pagination_links tag is in the page_tags.py file. So that should
work. Unless you are saying that the parent template (base.html that
introContent.html extends) needs
On Fri, Mar 18, 2011 at 12:32 PM, Shawn Milochik wrote:
> It's possible to do this by manipulating the post data. It's probably
> cleaner (and more easily reusable) to do it in the form's __init__
> than in the view itself, though.
>
> I don't know what these fields are meant to contain, but assu
On Friday, March 18, 2011 4:35:12 PM UTC, Mazery Smith wrote:
>
> Thanks for the response DR.
>
> Isn't the "template tag library" already loaded in my example with
> this line:
>
> {% load page_tags %}
>
> My pagination_links tag is in the page_tags.py file. So that should
> work. Unless you
On Mar 18, 2011, at 6:38 AM, Ricardo F. Teixeira wrote:
> Hi everyone!
>
> Without using raw SQL queries how can I make multiple joins using this
> model?
>
Do a search for "django select_related reverse one to many" for some
alternatives
> I'm trying to get something like this:
>
> SELECT
Those all are good ideas DR (especially the last resort pyc b/c I
heard that screws things up once in awhile) and I will try them when I
get home and update.
Really, any ideas helps. Thanks a ton!
On Mar 18, 9:50 am, Daniel Roseman wrote:
> On Friday, March 18, 2011 4:35:12 PM UTC, Mazery Smith
The order or priority of the fields are not important, but having a
minimum of at least one is, so that's why I wanted to save the user
some keystrokes by putting any data input into either field two or
three into field one if it's empty. I'm looking at the form and field
documentation now to try t
I saw this one-liner and didn't think it was a very good solution. I'd be
interested to hear others weigh in.
It's not very readable, and readability counts. What is that [0] doing
there? You have to rack your brain a little to recall that get_or_create
returns a tuple of (object, created).
Secon
Today is a good day for rolling another release. FeinCMS 1.3.0.pre1
was released today and is ready for testing and feedback. Please keep
in mind that this isn't a final release yet.
PyPI: http://pypi.python.org/pypi/FeinCMS/1.3.0.pre1
Github: https://github.com/matthiask/feincms/tree/v1.3.0.pre1
Hi Jason.
You are correct, Package.objects.all() does the job partially, but I
forget to mention (sorry) that what I want is all coments from a
specified package.
WHERE Package.name = 'some_package_name'
So using Packages.objects.all() does not retrieve, or dos not select,
all the comments from
On Fri, Mar 18, 2011 at 12:55 PM, hank23 wrote:
> The order or priority of the fields are not important, but having a
> minimum of at least one is,
If that's the case, then just don't make any of those fields required,
then in the clean() of your form check the cleaned_data to ensure that
at leas
I have been working on a fun-plug distribution of debian for my dlink
dns-323 nas and I've been writing the web interface using django which works
fine except I need to get it running with something other than the
development server.
My question is what is the best web server combo with the low
I use gunicorn with nginx, albeit on a much more powerful machine.
I think you'll find nginx or lighttpd recommended for a lightweight server.
--
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@goo
Perhaps a cheerypy/python based webserver? (So you only need one process)
On 18 March 2011 17:35, Shawn Milochik wrote:
> I use gunicorn with nginx, albeit on a much more powerful machine.
>
> I think you'll find nginx or lighttpd recommended for a lightweight server.
>
> --
> You received this
In an ajax-based site, where the page is static, and makes ajax calls
after loading, how would one get a csrf cookie? There aren't any
templates associated with the views (they just return json strings).
Setting of the cookie seems to be a side effect of serving forms in
django, but the client does
Hello,
I want to annotate a Queryset, order it by the annotated field and
then return a simple (ordered) values_list of the ids of the objects:
Wizard.objects.filter(**filterargs).annotate(wpower=Sum('creatures__power')).order_by('-
wpower').values_list('id', flat=True)
The 'Creature'-Model has
The current screen I'm working on has a lot of data on it, with most
of the fields not being required. However it seems like all of my data
gets lost as soon as I submit the screen, even though a lot of the
data does not have any errors, none of the data appears to come back
to the screen for the s
What are you doing to the post data in the view?
What are you doing in the form?
If you overrode any clean() methods, did you take care to return the
required value/object?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group,
In the view for the most part I'm just returning the same screen back
if there are errors, and if there are no errors then it should go to a
completely different screen and just output some messages. Right now
view code is little better than a skeleton, because I just started it
and I'm just checki
If you post code I will look at it, but I'm not keen to guess.
--
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
django-users+unsubs
Not a problem. Tell me where I can post it and what you'd like to see
and thanks for the help.
On Mar 18, 1:49 pm, Shawn Milochik wrote:
> If you post code I will look at it, but I'm not keen to guess.
--
You received this message because you are subscribed to the Google Groups
"Django users"
http://dpaste.com/ always works.
I guess the view and the form.
--
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
django-users+unsu
OK. It'll be there shortly. I'll send you a note directly once it's
there. Thanks.
On Mar 18, 2:08 pm, Shawn Milochik wrote:
> http://dpaste.com/always works.
>
> I guess the view and the form.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
T
On Friday, March 18, 2011 07:03:25 am hank23 wrote:
> I'm currently working on a new project which will have multiple
> applications built within it, and which will all be using the same
> database. I'd like to setup a global name for each application so I
> can use them to format audit fields for
Do you know for certain that you're getting past this line?
if request.method == "POST" and referer.endswith('upload/'):
Also, you might want to add some logging to your app (or use pdb) to
get information about what's going on at runtime.
Some things I would check:
You have a LOT of fi
Hi,
After seeing this [1], I use a "conf" package inside all my apps, with a
'settings.py' file.
Done properly, this enables you to provide defaults with your apps while
allowing to define custom settings at project level if iinside you
apps.conf.settings you check first if this value is set
What do you mean by custom settings?
--
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
django-users+unsubscr...@googlegroups.com.
F
OK I'll start checking stuff then. Even when you have errors on a
screen all of the data previously entered should still be returned
back to the screen with the errors right?
On Mar 18, 2:47 pm, Shawn Milochik wrote:
> Do you know for certain that you're getting past this line?
>
> if request
Hank,
Would you mind posting the link on the list? I may be wrong, but I
believe that sending a message directly to someone is not in the
"etiquette". You'll also help keeping this list stalker friendly.
Regards,
--
You received this message because you are subscribed to the Google Groups "D
Not not at all. Sorry didn't realize that not posting it was bad form.
Here's the link:
http://dpaste.com/514877/
On Mar 18, 3:12 pm, werefr0g wrote:
> Hank,
>
> Would you mind posting the link on the list? I may be wrong, but I
> believe that sending a message directly to someone is not in th
Hi Everyone,
Hope you are doing good. This is our Direct
Client.
I came across your details in Google Groups for Python
Developer position at San Antonio , TX . Please find a job description
for a below Position . So, I hope you are interested in this position
an
I can't help you with your WebFaction questions, but I'd like to hear more
about your needs for reselling Django hosting for your customers. Do you
expect that you will give your customers access to their own hosting
account, or will you manage this for them and just pass on the costs to
them?
I've been running nginx with fcgi and it works ok but the memory use is
higher than I'd like.
--
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, se
You may want to check out http://scrumdo.org which is a Scrum-based project
management software package written in Django. There is a hosted version
(http://scrumdo.com) as well.
Nate
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to
I'll give that a try
--
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
django-users+unsubscr...@googlegroups.com.
For more options,
Reg: Python developer? Surely that's a low-budget sitcom?
Or, perhaps, a skit from (Monty) Python - Michael Palin as the hapless
developer Reg, who has to deal with the increasingly strange development
requests from his boss (John Cleese) while trying to ignore the random
dancing being performe
On Fri, 2011-03-18 at 16:10 +, Tom Evans wrote:
> > I need some help about how to create a postgres database for django
> in
> > Ubuntu.
> > I am planning to use the authentication feature of Django and the
> first step
> > is to have a DB already created but i don't know how to do it.
> > Than
Hello,
I want to store costs (prices) in my DB. The obvious field type is
Integer, storing the cost in cents (strings prevent arithmetic
operations, floats are entirely inappropriate).
For input via a form, I have a nice CostField defined as follows:
class CostField(forms.CharField):
def
On Fri, 2011-03-18 at 17:57 -0700, Darren wrote:
> I want to store costs (prices) in my DB. The obvious field type is
> Integer, storing the cost in cents (strings prevent arithmetic
> operations, floats are entirely inappropriate).
I thought that is what the DecimalField is for
--
regards
KG
ht
hi
congratulations to the devs for being once again selected for Gsoc - I
hope we have got more slots this time.
--
regards
KG
http://lawgon.livejournal.com
Coimbatore LUG rox
http://ilugcbe.techstud.org/
--
You received this message because you are subscribed to the Google Groups
"Django user
I have tried both solutions but could not achieve the results. here is
the actual code that I started working with. This is the simplest
version that I did to test this feature.
Model--
class Post (models.Model):
name = models.Ch
Use static fixtures in testing is a terrible idea. I would like to
show a new and complete tool to create dynamic model instances for
testing purposes.
Check for "Comparison with another fixture tools":
http://code.google.com/p/django-dynamic-fixture
It works with Django MPTT.
This tool can be t
I have read several answeres to similar questions but didn't
understand enough.
Like others I need to use CSS external file, images and background
images. At the beginning I try to use images.
0) I use Django 1.2.5 and development web server.
1) I inserted to setting.py (there was not this paramete
On Friday, March 18, 2011 10:39:18 pm Vladimir wrote:
> return
> render_to_response('index.html',,context_instance=RequestContext(request))
>
> Such version lead to an error message: SyntaxError at/index/ , invalid
> syntax (views.py, line 5)
> What are my mistakes please?
xtra comma in rend
Thank You very much!
I found one more mistake, I need to replace in views.py:
from django.template import loader, Context
with
from django.template import RequestContext
Now there is no syntax mistake but there is no image. How many other
mistakes I have done?
--
You received this message becaus
On Friday, March 18, 2011 11:12:52 pm Vladimir wrote:
> Thank You very much!
> I found one more mistake, I need to replace in views.py:
> from django.template import loader, Context
> with
> from django.template import RequestContext
>
> Now there is no syntax mistake but there is no image. How ma
85 matches
Mail list logo