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.
>>
>>
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
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
Hi
I'm rather new to Django, but familiar with Java based web framework; I'd
like to implement a simple list 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 the
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 =
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
> <colinn...@gmail.com>
> wrote:
> > I found out the reason `__str__()` worked for me but `__unicode__()`
> didn't.
> > It's bec
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
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
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
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 unsubs
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
ptions, visit this group 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
tus.objects.filter(backend__in=backends).latest()
>
> Regards,
> Dmitry
>
> On Sep 29, 7:36 pm, Colin <cwoo...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hi Users,
>
> > So I have a DB that has a list of backends and there properties and I
> > have a ta
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
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 this message
roup at
> http://groups.google.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
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 *
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
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
send email to
> django-users+unsubscr...@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
--
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
<singh.malh...@gmail.com> wrote:
> I am try to use Multiple version of Django on same machine.
> I am using the Vi
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
and there is no province with more than
> 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.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 now,
l=.
>
>
>
If 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-de
must act -- hesitate.
>
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 t
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 your help,
-colin
sion
> still contain 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 t
mperData, or just
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
disapprove of what you say, but I will defend to the death your right to
> say it." --Voltaire
> "The people's good is the highest law."--Cicero
>
> >
>
Also, your embed code is trying load several things (flash file, MP3
file) from a "file:///" url. Your browser might ha
rn)
To take a stab at your third question, JSON is literally a bit of
javascript syntax that gets evaluated (JavaScript Object Notation :).
So from a serialized queryset you'll get (on the javascript side) a
list of objects with field names / data. So {'foo':'bar'} would give
you a javascript object (cal
er i changed '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 somew
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):
"Sender" will be class of the mode
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@googlegroups.com
To unsubscribe f
eneral python question, 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 s
alled.
More here:
http://docs.djangoproject.com/en/dev/topics/http/middleware/#process-view
Colin
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send emai
of your URL patterns.
Colin
On Fri, Apr 10, 2009 at 11:50 AM, Anthony <alantho...@gmail.com> 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://gro
y, 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 can do
project_list.1
project_list.
t display the 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
ubt 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 <mark0...@gmail.com> wrote:
>> Kind of sucks that you are worried about your server,
It should provide details for
every request that your browser sends in a separate window.
Colin
> On Feb 18, 8:23 pm, Colin Bean <ccb...@gmail.com> wrote:
>> On Wed, Feb 18, 2009 at 10:50 AM, phoebebright
>>
>>
>>
>> <phoebebright...@gmail.com> wrote:
t;> the exact response (mostly, response headers) that'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
gt;> On Jan 21, 3:14 pm, joshuajonah <j...@joshuajonah.com> wrote:
>>
>> > 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, Co
emote session, 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.
problem all wrong, so feel feel to
> correct this approach if it is way off base
>
> >
>
Does this work?
from myproject.test.models import Foo
f = Foo(name="bar")
f.save()
Colin
--~--~-~--~~~---~--~~
You received this message because yo
that 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 way
neric.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 the dates o
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?
Colin
--~--~--
rous 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 prefer the D
e update is trying to create a new person with the
> same UserID, when really I want to just be modifying the person
> with that UserID.
>
> Can anyone tell me what I'm doing wrong?
>
> Thanks,
>
> Margie
>
>
>
> >
>
Change the way you create your form from
ake 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 do this). Of c
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 could write a decorator
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 message because you are su
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 run several django instances
on a single host with no problem, and it seems to be fairly common
practice.
aid 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 the same
o (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 the development
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
>
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:
>
> ==
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 and how
> helpful all
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
ndles 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
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Dj
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
start 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 to this group, send email to django-users@googlegroups.com
T
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 Anderson <[EMAIL PROTEC
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, Tim Saw
iation... 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
"Django users" group.
To post to this group, send ema
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
&
g
the same HTTP request, but I'm getting different results. Any ideas?
Thanks.
-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-use
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
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 the new site
.
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 issues wit
anybody got Django up and runnning with the default
apache on OS X 10.3.9? If so how?
Thanks
Colin
76 matches
Mail list logo