Re: Exciting Opportunity: Join Our Django WhatsApp Bulk Messaging Project!

2024-02-18 Thread Colin Ado
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. >> >>

Re: UPLOAD STATIC FILES

2023-05-30 Thread Colin Ado
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

Dealing with global or session objects

2019-05-22 Thread Jean-Noël Colin
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

Best way to implement list pattern

2016-06-28 Thread Jean-Noël Colin
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

M2M with through model gives error fields.E336

2015-09-17 Thread Colin Ellis
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 =

Re: __unicode__() addition not working in basic poll application.

2012-11-13 Thread Colin Keenan
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

Re: __unicode__() addition not working in basic poll application.

2012-11-13 Thread Colin Keenan
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

Re: __unicode__() addition not working in basic poll application.

2012-11-13 Thread Colin Keenan
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

Re: __unicode__() addition not working in basic poll application.

2012-11-13 Thread Colin Keenan
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, >

Re: __unicode__() addition not working in basic poll application.

2012-11-13 Thread Colin Keenan
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

Testing Error Pages

2012-01-04 Thread Colin
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

Two Servers plus one Load Balancer Vip Advice for DB?

2011-11-30 Thread Colin
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

Re: Automatically direct unauthenticated users to homepage

2011-11-15 Thread Colin Bean
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

Re: Get latest item by many items in a queryset

2011-09-30 Thread Colin
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

Re: Get latest item by many items in a queryset

2011-09-30 Thread Colin
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

Get latest item by many items in a queryset

2011-09-29 Thread Colin
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

Re: Deleting a model object then returning it

2011-08-15 Thread Colin Bean
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

My DEF is not displaying on the Admin Form??

2011-05-11 Thread Colin Corbett
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 *

Re: Decimal * Float problem

2011-05-11 Thread Colin Corbett
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

Decimal * Float problem

2011-05-10 Thread Colin Corbett
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

Re: get_object_or_404

2010-11-15 Thread Colin Bean
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 --

Re: virtualenv used with mod_wsgi

2010-09-15 Thread Colin Bean
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

Using Mako as a templating language

2010-03-28 Thread Colin
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

Re: Database relations concepts

2010-02-19 Thread Colin Bean
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

Re: even and odd numbers within a template

2009-11-24 Thread Colin Copeland
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,

Re: Django/GoDaddy

2009-11-15 Thread Colin Bean
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

Re: SOLVED Is there a way to just submit a simple form? -- Mis-nested tags break things!

2009-10-30 Thread Colin Bean
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

10061 Connection refused - pyodbc - SQL Server 2008 - Win7

2009-08-25 Thread -colin-
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

Re: Model instance refreshing

2009-08-17 Thread Colin Bean
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

Re: Views runs twice when using custom context processor

2009-05-22 Thread Colin Bean
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

Re: HTML works directly in browser, but not in DJango... Why???

2009-05-19 Thread Colin Bean
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

Re: Limiting the queryset for a foreign key field in the admin change_list view

2009-05-14 Thread Colin Bean
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

Re: disable django cache

2009-05-14 Thread Colin Bean
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

Re: Signals giving: global name 'MyModel' is not defined

2009-05-14 Thread Colin Bean
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

Re: Template issue

2009-05-07 Thread Colin Bean
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

Re: Really really basic,,, use of @ sign in code

2009-05-05 Thread Colin Bean
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

Re: Authenication for django.views.generic Views

2009-04-16 Thread Colin Bean
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

Re: Linking Back to Home Page from Template

2009-04-10 Thread Colin Bean
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

Re: referencing a specific item in a list...

2009-04-09 Thread Colin Bean
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.

Re: troubleshooting runserver

2009-03-20 Thread Colin Bean
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

Re: Is safe unsafe?

2009-02-23 Thread Colin Bean
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,

Re: WYSIWYG Image upload challenge

2009-02-19 Thread Colin Bean
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:

Re: WYSIWYG Image upload challenge

2009-02-18 Thread Colin Bean
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

Re: Django doesn't like serving a view to Apache

2009-01-21 Thread Colin Bean
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

Re: Django doesn't like serving a view to Apache

2009-01-21 Thread Colin Bean
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.

Re: xml -> django model

2008-12-23 Thread Colin Bean
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

Re: time it takes django to read database?

2008-12-09 Thread Colin Bean
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

Re: time it takes django to read database?

2008-12-09 Thread Colin Bean
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

Re: time it takes django to read database?

2008-12-09 Thread Colin Bean
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 --~--~--

Re: Ruby on Rails vs Django

2008-12-05 Thread Colin Bean
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

Re: problem saving form data in sams "24 hour" book example

2008-12-02 Thread Colin Bean
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

Re: Develop in windows, serve in linux

2008-11-25 Thread Colin Bean
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

Re: localhost host only webservices/authentication in general

2008-11-05 Thread Colin Bean
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

Re: Caught an exception while rendering: no such table: django_admin_log

2008-11-04 Thread Colin Bean
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

Re: Building Django web application

2008-10-10 Thread Colin Bean
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.

Re: login problem, Django 1.0

2008-10-09 Thread Colin Bean
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

Re: login problem, Django 1.0

2008-10-09 Thread Colin Bean
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

Re: Strange, one app only appears rarely in the admin interface on apache2 (a reload sometimes works)

2008-09-29 Thread Colin Bean
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 >

Re: IE Hell. Blank Page

2008-09-18 Thread Colin Bean
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

Re: Take an integer and string and make one string

2008-07-16 Thread Colin Bean
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: > > ==

Re: Django, Apache, and CSS

2008-07-08 Thread Colin Bean
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

Re: I'm sure this is one of those clueless newbie mistakes

2008-06-26 Thread Colin Bean
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

Re: serving root from static

2008-06-10 Thread Colin Bean
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

Re: serving root from static

2008-06-09 Thread Colin Bean
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

Re: why so slow?

2008-06-03 Thread Colin Bean
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

Re: why so slow?

2008-06-03 Thread Colin Bean
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

Re: cut-and-paste traceback error actually the error from the time before --

2008-04-29 Thread Colin Bean
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

Re: Has anyone made an MS excel exporter in a django site yet?

2008-04-09 Thread Colin Bean
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

Re: Finding out the index of a model instance in a list

2008-03-29 Thread Colin Bean
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

Re: usernames and case sensitivity

2008-03-28 Thread Colin Bean
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

Re: Trouble with static content guide for development

2008-02-24 Thread Colin
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 &

Trouble with static content guide for development

2008-02-24 Thread Colin
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

Re: Multiple apps on one page, how?

2006-01-02 Thread Colin Howlett
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

Re: Trouble with Apache 1.3 and FCGI on Mac OS X

2005-11-16 Thread Colin Howlett
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

Re: Trouble with Apache 1.3 and FCGI on Mac OS X

2005-11-11 Thread Colin Howlett
. 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

Trouble with Apache 1.3 and FCGI on Mac OS X

2005-11-11 Thread Colin Howlett
anybody got Django up and runnning with the default apache on OS X 10.3.9? If so how? Thanks Colin