I am on it,
Please I will be grateful to be part of this journey.
Interested!
Thank you
On Sun, 18 Feb 2024 at 22:42, REAGAN.M.E.M wrote:
> I am interested ..Lead me on
>
> On Sun, Feb 18, 2024, 22:29 fextha satria wrote:
>
>> I'm interesting in this project. Please allow me to join.
>>
>> Sat
1. Create a folder called static, and inside the static folder create
another folder
2. Go to settings.py AND add this:
STATIC_URL = 'static/'
STATICFILES_DIRS = [
BASE_DIR / 'static'
]
3. Go to your .html file and like the .css file using:
On Mon, 29 May 2023 at 18:31, Obiorah Callistus wr
Hi,
I'm coming from a java world, where there exists different scopes for
objects: application-, session-, request scopes all define different
lifecycle for objects. I have some difficulties in finding an equivalent
approach in Django.
Here's the need: my project stores its custom configurat
Hi
I'm rather new to Django, but familiar with Java based web framework; I'd
like to implement a simple list&detail screen, so in the top part, have a
list of objects, and when selecting one of them, loading the details in a
form at the bottom where you can edit; there should also be a link in t
Greetings,
I'm trying to create a M2M relation between an abstract base class and a
model that extends the same base.
I have the following code:
#Base object:
class BaseObject(models.Model):
datetime = models.DateTimeField(auto_now_add=True)
shared = models.ManyToManyField('userp
Hello, I know there are a bunch of threads on this topic (on stacked
overflow at least), but I am having trouble understanding something.
In this post:
http://stackoverflow.com/questions/1921523/django-what-is-the-difference-b-w-httpresponse-vs-httpresponseredirect-vs-rende
-- the accepted
by the time 1.6 is really out, I'll
be all set.
On Tuesday, November 13, 2012 10:10:27 AM UTC-6, Tom Evans wrote:
>
> On Tue, Nov 13, 2012 at 8:35 AM, Colin Keenan
> >
> wrote:
> > I found out the reason `__str__()` worked for me but `__unicode__()`
> didn
Thanks for the advice. It's true that I'm just learning django, and because
I wanted to use python3, I installed via the most up-to-date development
source code. My experience with development versions of stuff has actually
been better than the fully supported versions of the same product for s
As of the moment I'm writing this post, my first post hasn't shown up yet.
I'm having the same problem. After posting my situation, I decided to also
write a __str__(self) method. That worked! But, the tutorial clearly states
that we should not be doing the usual __str__, and instead doing
__un
I found out the reason `__str__()` worked for me but `__unicode__()`
didn't. It's because python3 already uses unicode in the `__str__` method,
so if using python3, don't use `__unicode__`.
On Monday, May 16, 2011 7:32:41 AM UTC-5, maaz muqri wrote:
>
> Hi,
> ___
I also found this by searching from google. I am also having the exact same
problem. I know python well enough not to make a "spacing" error. The
people that were having this problem over a year ago seem to have never
gotten the solution to their problem.
I installed everything myself from dev
stops
my error pages working properly.
What's the best way to go about testing them please?
Cheers,
Colin
--
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 u
Hi Django users,
So I have two servers behind a vip. I currently have it setup so if
one server goes down it uses the other http server which works great.
However I tried to set up mysql master - master and I keep getting
duplicate key errors and grind the process to a hault and causes a
real head
at
> http://groups.google.com/group/django-users?hl=en.
>
>
You can use middleware to redirect all unauthenticated users to your
login page, something like this:
http://stackoverflow.com/questions/3214589/django-how-can-i-apply-the-login-required-decorator-to-my-entire-site-excludi
Colin
--
Yo
ends).latest()
>
> Regards,
> Dmitry
>
> On Sep 29, 7:36 pm, Colin wrote:
>
>
>
>
>
>
>
> > Hi Users,
>
> > So I have a DB that has a list of backends and there properties and I
> > have a table that gets updated with if it is able to access a
Thanks for the info guys!
Is there any changes I could make to my model? Right now I have about
165k backends and a huge number of statuses. But they are small if you
only grab the last 10 or so minutes of statuses.
On Sep 30, 10:43 am, Tom Evans wrote:
> On Fri, Sep 30, 2011 at 2:48 PM, John w
Meta():
get_latest_by = 'timestamp'
What I would like to do is get the latest status reported for the last
ten minutes. Without having to loop through a list querysets and
performing the .latest() function on it.
Is this possible?
Thanks,
Colin
--
You received th
com/group/django-users?hl=en.
>
Hi Kevin,
It looks like you're calling delete on a queryset rather than
individual objects. I think [i.delete() for i in object] would do
what you want, although I haven't tested it.
Colin
--
You received this message because you are subscri
Hello,
My DEF is not displaying on the Admin Form.
models.py =
class OurProducts(models.Model):
code = models.CharField(max_length=60)
price = models.DecimalField (max_digits=8, decimal_places=2)
def combined_price(self):
from decimal import Decimal
return round(self.price * Decim
Thanks! Solved:
In models.py:
class OurProducts(models.Model):
code = models.CharField(max_length=60)
name = models.CharField(max_length=80)
price = models.DecimalField (max_digits=8, decimal_places=2)
def combined_price(self):
from decimal import Decimal
return round(self.price
models.py
class OurProducts(models.Model):
code = models.CharField(max_length=60)
rrp = models.DecimalField (max_digits=8, decimal_places=2)
def __unicode__(self):
return self.name
def discount_amount(self):
discount=0.65
amount=self.rrp*discount
return amount
My variab
scr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>
The answer is in your subject line :)
http://docs.djangoproject.com/en/dev/topics/http/shortcuts/#get-object-or-404
Colin
--
You received this message becaus
Have you tried the steps described here:
http://code.google.com/p/modwsgi/wiki/VirtualEnvironments ?
Colin
On Tue, Sep 14, 2010 at 10:44 PM, Jagdeep Singh Malhi
wrote:
> I am try to use Multiple version of Django on same machine.
> I am using the Virtual Python Environment builder (virt
After struggling with Django's templating language for a while, I
decided I wanted to switch to something with a bit more power. In
particular, I liked what I saw of Mako (being able to instantiate new
variables, and write functions for subroutines like making a row or
something).
After some googl
; 6 or 7 exits. With such a small set, I doubt there would be database
> efficiency reasons to use a table. So I'd prefer a list if possible.
>
> Cheers.
>
> -Tim
>
>
Take a look at the CommaSeparatedInteger Field:
http://docs.djangoproject.com/en/dev/ref/models/fields/#co
Juan,
The "cycle" template tag may help you here:
http://docs.djangoproject.com/en/dev/ref/templates/builtins/#cycle
colin
On Nov 24, 2009, at 8:39 AM, Juan Hernandez wrote:
> Hey there people...
>
> I've been coloring html tables using javascript for a while and
it's a normal CentOS 5 install you should be able to yum install
httpd-devel to get aspx. If your pysqlite build is failing because of
prerequisites, there might be other development packages that you
could install with yum (python-devel at the very least, probabaly
sqlite-devel too). 'y
>
Cool, never realized that about the validator code.
The web developer toolbar extension for firefox will upload a local
page to the validator for you:
https://addons.mozilla.org/en-US/firefox/addon/60
Colin
--~--~-~--~~~---~--~~
You received this message
had it all working with the same versions on Win XP
with SQL Server on the same Win 2003 box. I suspected there was an
issue with the added security on Win 7, so I am allowing python.exe
through the firewall. That didn't solve it. Any other ideas?
Thank you for you
in the old data. What would be a good strategy to make
> shure that all objects in a session get fresh data on every request?
>
> Marc
>
> PS: Hopefully going live in 2 weeks ... to be continued
> >
>
I would only store the PK in the session and use it to get
examining your server's request logs / console output.
Colin
--~--~-~--~~~---~--~~
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
cromedia.com/go/getflashplayer" />
>>
>>
>>
>
> The browser probably isn't rendering it because there are no starting
> tag, or tag, which are required by the spec AFAIK.
>
> Alex
>
> --
> "I disapprove of wh
y handles django models, and you can select a subset of
fields to include, etc. Instead of your simplejson call, you can use:
serializers.serialize("json", resourcesToReturn)
To take a stab at your third question, JSON is literally a bit of
javascript syntax that gets evaluated (JavaScript Ob
27;home.html' to other page i always get the same
> result.
>
>
> Thanks
>
What are the TEMPLATE_DIRS that you're using in your settings file? Do
they point to the same file you're editing? Any chance you copied the
project from somewhere else and it's loading th
t;
>
>
>
> Using Django version 1.1 beta 1,
>
>
>
>
>
> >
>
What error were you getting?
Those signals both take a "sender" argument as the first instance, so
you might try something like:
def keep_version(sender, instance, **kwargs):
"S
formation about your setup and how you're serving static media.
Colin
--~--~-~--~~~---~--~~
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@googlegr
stion, so a group like
comp.lang.python might be a more appropriate place to ask it. But
what you're seeing is a decorator:
http://docs.python.org/glossary.html#term-decorator
Colin
--~--~-~--~~~---~--~~
You received this message because you are subscribed t
obvious to me how I can do that.
>
> Can someone give me a hand please?
> >
>
Middleware would be one option. You could write a process_view
function that checks request.user and redirects requests with no
authentication. This will all happen before the view gets called.
More h
of your URL patterns.
Colin
On Fri, Apr 10, 2009 at 11:50 AM, Anthony wrote:
>
> Hi Everyone,
>
> This is really basic and I tried looking up this question since it
> can't be a new one, but the closest thread I found was this one:
>
> http://groups.google.
rectly, without having to loop
> through them. How can I do this?
>
> I've tried project_list[1] but that just errors out.
>
> Thanks,
> Walt
>
> -~
>
> >
>
The default "dot" lookup works with array indices, so you c
e webpage
>
> Any recommendations on how to resolve or troubleshoot this?
>
> >
>
Firewall rules perhaps? You could see if running the dev server on
port 80 gets through.
Colin
--~--~-~--~~~---~--~~
You received this message because you are s
>
> - VS
> >
>
Perhaps you're looking for request.raw_post_data ?
http://docs.djangoproject.com/en/dev/ref/request-response/#attributes
(towards the bottom)
You'd have to do the processing yourself, but this should give you the
original request body.
Colin
--~--~-~-
I doubt you'd want to risk
either of these things on your site. I'd recommend you read up on
cross site scripting (XSS) to get a better idea of the risk involved.
Colin
> On Feb 23, 2:48 pm, Mark Jones wrote:
>> Kind of sucks that you are worried about your server, but not worrie
details for
every request that your browser sends in a separate window.
Colin
> On Feb 18, 8:23 pm, Colin Bean wrote:
>> On Wed, Feb 18, 2009 at 10:50 AM, phoebebright
>>
>>
>>
>> wrote:
>>
>> > The javascript makes a call to this view
t's being sent to the
>> browser. Also, could you clarify the above "response to PHP"
>> statement? Perhaps explaining the technical details of what's going on
>> would be of some help?
> >
>
Tools like Tamper Data (firefox extension) or WebScarab
te:
>>
>> > It works and outputs what it should:http://dpaste.com/111584/
>>
>> > I'll try commenting out some lines and seeing how far it gets.
>>
>> > On Jan 21, 3:10 pm, Colin Bean wrote:
>>
>> > > On Wed, Jan 21, 2009 at 11:34 AM, jo
which might take a while). Either way, I'd put some
debugging statements in your view and see how far it gets...
Colin
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To pos
(got nothing instead)
>
> i've also tried
> save = getattr(createobj, "save")
> save(createobj)
>
> unbound method save() must be called with Foo instance as first
> argument (got ModelBase instance instead)
>
> i've probably gone about t
t django/python is
> reading the incorrect time. I've attempted to update the server time
> using the usual date "time" crap and was told the procedure was not
> allowed, i assume this is due the server being a virtual server.
>
> what would the best
.generic.date_based.archive_index.
According to the docs, "Objects with a date in the future are not
included (in latest) unless you set allow_future to True."
http://docs.djangoproject.com/en/dev/ref/generic-views/#django-views-generic-date-based-archive-index
Any chance t
s... i'll go ahead and add another
> entry, so at the very least there will be 4 titles and three available
> entries...
>
> what would possibly cause this?
> >
>
Also, what kind of server setup are you using? Can you reproduce this
issue on a local development server?
Coli
numerous helper functions to generate common
html elements, and a bundled javascript framework. Django leaves the
javascript framework and HTML generation largely up to you (you can
create your own shortcuts with templatetags, of course).
Although I've used and enjoyed Rails, I pr
pdate button, the is_valid
> ()
> method returns false and the errors that get printed to the form are:
> * Person with this UserID already exists
> * Person with this Email already exists
>
> It seems like update is trying to create a new person with the
> same UserID, when r
gt;
> Take care!
>
> Jeff Anderson
>
>
To add one more suggestion to what Jeff said, if you're using revision
control you can commit your files in Windows, then check out the
latest version of your code onto your remote server when you deploy (I
usually write a script to
ll:
> http://foo.com/ws/blah
> they will get permission denied.
>
> tnks,
> g'craic
> >
>
In your view, you could check the value of
request.META['REMOTE_ADDR'] and return a 404 if it's not coming from
an allowed location.
You cou
em? All I have is a very simple model and a
> modified urls.py file.
>
> Any help would be appreciated.
> >
>
Did you run manage.py syncdb after adding django.contrib.admin to your
installed apps?
Colin
--~--~-~--~~~---~--~~
You received this mess
tion. I wouldn't worry too much about the
overhead of multiple python interpreters -- if python is using shared
libraries, they will use a little extra ram, but I doubt they will
exhaust your system resources before something else does. I don't
have any numbers to back this, but I've r
You said you moved from a
dev setup under 0.96, are you running another dev setup under 1.0, or
something else? If you're using something else, have you tried it
under the dev server? That would probably be the simplest possible
case...
Also, does the session id stay
you can do (below the django level) is to use TamperData for
firefox or something similar to examine your headers and make sure the
session cookie is indeed being set, with the right path. Always good
to confirm that if you're having weird session behavior. Are you
experiencing this on
Sounds like you could have some apache processes holding on to old
versions of your code... have you restarted apache recently?
Colin
On Mon, Sep 29, 2008 at 1:00 PM, rmnl <[EMAIL PROTECTED]> wrote:
>
> I'm experiencing a strange problem with my project. I have an app
> nam
On Thu, Sep 18, 2008 at 3:57 PM, lingrlongr <[EMAIL PROTECTED]> wrote:
>
> Strangest thing...
>
> I primarily use and develop on Ubuntu and use Firefox. So I went to
> check out how many bugs IE was generous enough to give me to fix.
> Using the Django development server, I can connect fine from
Format strings are your friend:
"%s: %d" % (self.consequence, self.slope_height_rr)
Colin
On Wed, Jul 16, 2008 at 8:14 AM, Molly <[EMAIL PROTECTED]> wrote:
>
> I am trying to add an integer and a string:
>
> ==
thout seeing at the source of your base.html, but I'd start
there.
Colin
On Tue, Jul 8, 2008 at 7:47 PM, foo <[EMAIL PROTECTED]> wrote:
>
> First, I want to thank you for your reply Milan! I just recently
> joined the group and I'm impressed at how active the group is
For a start, you want your KVM model to subclass models.Model.
Colin
On Thu, Jun 26, 2008 at 11:59 AM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
> Karen;
>
> On Jun 26, 12:56 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
>> If you post the contents
On Mon, Jun 9, 2008 at 10:58 PM, Andre Meyer <[EMAIL PROTECTED]> wrote:
> thanks a lot, Colin, i will contact the WebFaction guys for the apache
> setup. they are always very helpful ;-)
>
> HOWEVER: for testing purposes only, using only runserver and sqlite, how to
> preceed
cept to take away, remember
that if apache's serving a static file, apache handles absolutely
every step of the process, and if python/django got involved in any
way you'd lose the performance benefit of serving directly from from
apache.
Colin
--~--~-~--~~~---~--
On Tue, Jun 3, 2008 at 4:01 PM, <[EMAIL PROTECTED]> wrote:
>
> now i see, ty very much. django seems awesome though now that it is
> working for me.
>
> On 4 Juni, 00:57, "Colin Bean" <[EMAIL PROTECTED]> wrote:
>> On Tue, Jun 3, 2008 at 2:00 PM, &l
bet is
probably to setup apache, but you'll need to restart that every time
you want changed code to take effect.
Colin
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post
In this situation it might be helpful to use tamper data (or something
similar) to examine the all of the requests / responses and see
exactly what your server is sending and when Could at least
determine if this is broswer behavior or if Django is really sending
the incorrect trace.
Colin
If your users don't need a binary .xls file, there's an XML-based
format for excel. I've rolled my own python code to export data to
it, it's pretty easy to do and the excel users didn't seem to notice
the difference :)
Colin
On Wed, Apr 9, 2008 at 3:45 PM, Jeff A
es[lPosition-1]
> if lPosition < lImagesInAlbum-1:
> lNextImage = lAlbumImages[lPosition+1]
> break
>
Pagination might be what you're looking for:
http://www.djangoproject.com/documentation/pagination/
Colin
>
>
> On Saturday 29 Mar 2008, Ti
would get
Charlie, charlie, or any other case variation... That way you could
also the original username value in the template, complete with
capitalization.
Colin
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Dj
Nevermind, as soon as I posted this I found my typo. [sigh]. Sorry.
On Feb 25, 1:52 am, Colin <[EMAIL PROTECTED]> wrote:
> Hey,
>
> I just started working with Django, and don't want to deal with
> setting up Apache or anything else on my development box for static
t seem to be
an error when I looked it up). When I hit the template, it's making
the same HTTP request, but I'm getting different results. Any ideas?
Thanks.
-Colin
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Goog
In addition to what James and Luke have to say, you might want to look
at this thread on the developers list:
http://groups.google.com/group/django-developers/browse_frm/thread/53ce5282c9e29df8/
You should mostly ignore my incoherent ramblings there, but Robert
Wittams identified an elegant solu
Kenneth,
The the object_list generic view accepts a paginate_by argument see
here:
http://www.djangoproject.com/documentation/generic_views/#using-list-detail-generic-views
Is that what you're looking for?
Colin
Kenneth Gonsalves wrote:
> On Friday 25 Nov 2005 9:38 am, Clint Eck
+1 to putting the request object into the context as standard, or at
least into DjangoContext. I've only been playing with Django for a few
days, and it's already obvious that this single change would make
writing useful custom tags a whole lot easier.
Colin
idance for others.
regards
Colin
hugo wrote:
> >Well, I never got a reply, and I never got python-eunuchs working.
>
> Maybe giving us a bit more than just one day to react? :-)
>
> >However, upgrading my python to 2.4 (and then basically reinstalling
> >everything in th
.
Maybe someone with the same problem as me will stumble across this
thread.
Colin
Colin Howlett wrote:
> Hi,
>
> I've been trying to get up and running with Django on Mac OS X 10.3.9.
> I installed Django, and with Django's built-in webserver it works fine.
> Due to the
chs on Mac OS X
gives compilation errors.
So I'm stuck. Has anybody got Django up and runnning with the default
apache on OS X 10.3.9? If so how?
Thanks
Colin
80 matches
Mail list logo