Flat-file Field

2009-01-03 Thread Randy
ces that I missed please let me know. Thanks, Randy --~--~-~--~~~---~--~~ 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

newbie question

2007-01-18 Thread Randy
d_python PythonHandler mod_python.testhandler thanks for any help, Randy --~--~-~--~~~---~--~~ 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@googlegro

Re: newbie question

2007-01-18 Thread Randy
. ^now/$ 2. ^now/plus(\d{1,2})hours/$ The current URL, /fun/, didn't match any of these. When I try to go to: http://localhost/now , I simply get: The requested URL /now was not found on this server. -Randy --~--~-~--~~~---~--~~ You received this me

Re: newbie question

2007-01-18 Thread Randy
, didn't match... http://localhost/now --> URL was not found... I'm starting to feel really dense. Can someone offer a clue? -Randy On Jan 18, 5:49 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: How about try this url? http://localhost/fun/now Your application

Re: newbie question

2007-01-18 Thread Randy
Just to report some progress... if I change the line in my .../fun/urls.py from: (r'^now/$', current_datetime), to: (r'/now/$', current_datetime), then the following link will execute the 'current_datetime' method properly: http://loc

Re: avoid cascade delete

2008-11-17 Thread Randy Barlow
x27;t expect, and you won't have even noticed that it happened! -- Randy Barlow http://electronsweatshop.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send e

Re: Django and PyAMF - RemotingError

2009-06-25 Thread Randy Barlow
Noxxan wrote: > I'm trying to place in my app an amf gateway, > so I make one gateway with code: > > #-*- coding: utf-8 -*- > from pyamf.remoting.gateway.django import DjangoGateway > > from my.views import some_view > > services = { > 'some_service.hello': some_view.get_smt, > } > > echoG

Re: Model Inheritance question

2009-06-25 Thread Randy Barlow
LeeRisq wrote: > If I am looking to use an abstract base class with multiple models, > which is assigned the primary key id? The child or the parent? Abstract classes don't get database tables at all, so only the child will have the key. --~--~-~--~~~---~--~~ You

Re: How to code for multiple sub-types of a model

2009-07-01 Thread Randy Barlow
ot; of all our models. That way, if we did have a User and a ResearchUser, if we had queried for the User, we can call a special method we made on the user, user.downcast_completely(), and it will give us back the ResearchUser version of the object. Neato, eh? - -- Randy Barlow Software Dev

Re: Admin login needs to be https

2009-07-08 Thread Randy Barlow
sing Apache for this, you can configure it to redirect for that URL. Something like this: RedirectMatch (.*) https://example.com$1 - -- Randy Barlow Software Developer The American Research Institute http://americanri.com 919.228.4971 -BEGIN PGP SIGNATURE- Version: GnuPG v2

Re: Model Inheritance

2009-07-09 Thread Randy Barlow
model objects don't know what their most specific type is, and thus can't determine whether they are a Document or a Media. Hopefully, this will be fixed soon! You should know that this will generate three DB tables. The media and document tables will share primary keys, with the medi

Re: Model Inheritance

2009-07-09 Thread Randy Barlow
Javier Guerra wrote: > On Thu, Jul 9, 2009 at 5:52 PM, Randy Barlow wrote: >> sjtirtha declared: >>> class Media(Document): >>>link = >>>type = >>>class Meta: >>>abstract = True >>> >>> cl

Re: unittest DB questions

2009-07-13 Thread Randy Barlow
n it is the > live site data anyway? I highly highly recommend that you separate your development, testing, and production instances of your DB and web server. You should never ever develop or test on a production system! - -- Randy Barlow Software Developer The American Research I

Re: TransactionMiddleware not working

2009-07-21 Thread Randy Barlow
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Parag Shah declared: > I am using MySql. I believe it does support transactions. MySQL only supports transactions if you are using INNODB tables. This is not the default. - -- Randy Barlow Software Developer The American Research Institute h

Re: How to tell if a fields was modified

2009-07-24 Thread Randy Barlow
er(self.__class__, self).save(stuff_and_junk) - -- Randy Barlow Software Developer The American Research Institute http://americanri.com 919.228.4971 -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.11 (GNU/Linux) Comment: Using GnuPG with Mozilla

Re: Counting results

2009-08-05 Thread Randy Barlow
ay it, the blog posts are shown on a > seperate page to the comments but i guess you would still have to > create the query set in the posts view so that you can count the > results. Try appending '.count()' to the end of your query! http://docs.djangoproject.com/en/dev/ref/m

Re: Bulk data insert

2009-08-20 Thread Randy Barlow
SV import system for my project... - -- Randy Barlow Software Developer The American Research Institute http://americanri.com 919.228.4971 -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - htt

Re: Error in setting up psycopg2

2009-08-21 Thread Randy Barlow
the password is wrong. I > cannot go any further as your advised. What should I do? I am not too > familiar with using Linux. Please help. The problem is that su wants a username and you are giving it a user id. You can look in /etc/passwd to see what user has UID 70 and then su - . - -

Re: Python FOR loop syntax question

2009-08-21 Thread Randy Barlow
ead: >>> import decimal >>> tst = {'myTst': (decimal.Decimal, 0)} >>> for key in tst.keys(): >>> print('%s: %s'%(tst[key][0], tst[key][1])) - -- Randy Barlow Software Developer The American Research I

Re: django & flex

2009-08-31 Thread Randy Barlow
that protocol to set and retrieve data. The AMF protocol allows the use of ordinary Python data types, so no need to worry about XML or JSON - just use strings, dicts, and lists as usual! - -- Randy Barlow Software Developer The American Research Institute http://americanri.com 919.228.4971 -BE

Re: Django ORM - Table Changes

2009-09-10 Thread Randy Barlow
but Django does not handle migration of DB schemas for you. One way to handle that is to run ALTER TABLE yourself. Another way to do it is to dump the data from your DB to a serialized format (like JSON), alter that dump using REGEXes, build a brand new DB (using syncdb), and then load the

Re: ManyToManyField() causes bugs when using 'ModelName' instead of 'self'

2009-04-02 Thread Randy Barlow
t have a problem with requiring self to be there (though I do think using the model class's name is more natural, self is OK too), but it would indeed be helpful if there were an exception. Perhaps you could bring this up on django-developers? - -- Randy Barlow Software Developer The American

Re: OperationError: fe_sendauth: no password supplied

2009-04-08 Thread Randy Barlow
>>>> from django.db import connection >>>> cursor = connection.cursor() > > Then I get the error. Any ideas? Did you configure a DB password in settings.py? - -- Randy Barlow Software Developer The American Research Institute http://americanri.com 919.228.4971 -

Re: OperationError: fe_sendauth: no password supplied

2009-04-08 Thread Randy Barlow
LeeRisq wrote: > I have also tried entering a password (same one I use to logon to the > network) in settings.py, but when I do that I get this: > This is almost certainly your problem. You need a username and a password to the database you are using. It sounds like you are trying to use

Re: annotate over period of time

2009-04-22 Thread Randy Barlow
AND operation, so you are filtering for all PrecioPrubas with producto=producto OR mercado=mercado, when I think you want to filter for all the price points for a particular product in a particular market, which is an AND operation. Try filter(mercado=mercado, producto=producto, etc...) instead!

Re: python manage.py syncdb error (L@@K)

2009-09-14 Thread Randy Barlow
self). Should be: def __str__(self): - -- Randy Barlow Software Developer The American Research Institute http://americanri.com 919.228.4971 -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http

Re: template modules like joomla

2009-09-15 Thread Randy Barlow
milar. Is it possible? Store your templates in the DB! - -- Randy Barlow Software Developer The American Research Institute http://americanri.com 919.228.4971 -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmai

Re: template modules like joomla

2009-09-15 Thread Randy Barlow
ed revision control, then you can simplify this, but I think it's pretty simple as is! - -- Randy Barlow Software Developer The American Research Institute http://americanri.com 919.228.4971 -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - ht

How to add files to the django built-in webserver

2008-05-22 Thread Randy Barlow
Hi all, I'm new to the group with a fairly simple question. I'd like to use the Django webserver to demo a site I'm working on, and I would like to be able to add a file I've created to the document root. The file is a simple crossdomain.xml file for flash, and I'd like it to be accessible at ht

Re: How to add files to the django built-in webserver

2008-05-22 Thread Randy Barlow
Turns out that this can be done with what is described at [1]. [1] http://www.djangoproject.com/documentation/static_files/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Dev server won't run. (Complete Newbie)

2008-05-27 Thread Randy Barlow
or this group for that matter that > addresses this issue. > > Any suggestions? Are you running the web browser inside the VM, or on the host machine? - -- Randy Barlow Software Developer The American Research Institute http://americanri.com 919.228.4971 -BEGIN PGP SIGNATURE

Re: Setting a ManyToMany default

2008-06-04 Thread Randy Barlow
y obvious? How about writing your own constructor that takes an argument of type and has a default value assigned there? - -- Randy Barlow Software Developer The American Research Institute http://americanri.com 919.228.4971 -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.9 (GNU/Linux

Re: Setting a ManyToMany default

2008-06-04 Thread Randy Barlow
as the default, unless it is passed another type of wine. Would anybody care to comment on whether this is possible? - -- Randy Barlow Software Developer The American Research Institute http://americanri.com 919.228.4971 -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.9 (GNU/Linux) Comment: U

Re: Use django0.97 with cmemcached

2008-06-09 Thread Randy Barlow
tpd. ...so does your user have write permissions to that directory? - -- Randy Barlow Software Developer The American Research Institute http://americanri.com 919.228.4971 -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARE

Re: DB relations and delete question

2008-07-03 Thread Randy Barlow
any? same question applies to > update My understanding is that deletion is a cascading operation, following all relations in the database. So use it very carefully! -- Randy Barlow Software Developer The American Research Institute http://americ

Re: sessionid

2008-07-10 Thread Randy Barlow
t though! -- Randy Barlow Software Developer The American Research Institute http://americanri.com 919.228.4971 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, se

Re: Problem setting up django server

2013-06-18 Thread Randy Baxley
Glad and sad that you are going through this. Sad in that the process seems too complicated. Glad in that I have failed miserably in trying to get virtualenv, vagrant, and other packages to install both in Windows and in Xubunto. I have run python27 and 33 without problems but even in the 27 dir

Re: Help in finding how to learn Django

2013-07-02 Thread Randy Baxley
Thank you for your list of things to learn Django. I had already worked through dr chucks web site and MOOC, U of Toronto first and second course at Coursera, Rice's Interactive Python also at Coursera and most of Udacity CS 101 so was getting very familiar with python. Working now through the

Re: Missing peice before best practises

2013-07-07 Thread Randy Baxley
I use a desktop at home and a laptop when I go attempting to hack in the open community. The hack experiances always seem so messy to me. Most recently I am trying to help with a project called SUMO but there are tons of download requirements outside of the python and django. I have also tri

Chapter 5 problems

2013-07-12 Thread Randy Baxley
randy@randy-Inspiron-530s:~/dj/mfp/mysite$ python manage.py shell Python 2.7.3 (default, Apr 10 2013, 05:46:21) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> from django.db

Re: Chapter 5 problems

2013-07-12 Thread Randy Baxley
dj/mfp/mysite/mydb.db' > > John > > On 12/07/13 19:33, Randy Baxley wrote: > > randy@randy-Inspiron-530s:~/dj/mfp/mysite$ python manage.py shell > > Python 2.7.3 (default, Apr 10 2013, 05:46:21) > > [GCC 4.6.3] on linux2 > > Type "help", "c

Re: Chapter 5 problems

2013-07-12 Thread Randy Baxley
permissions for randy on mydb.db are read and write. On Fri, Jul 12, 2013 at 3:05 PM, Jonathan Baker < jonathandavidba...@gmail.com> wrote: > Does the file have the correct permissions? > > > On Fri, Jul 12, 2013 at 2:03 PM, Randy Baxley wrote: > >> that has been my f

Re: Chapter 5 problems

2013-07-12 Thread Randy Baxley
randy@randy-Inspiron-530s:~/dj/mfp/mysite$ sqlite3 /home/dj/mfp/mysite/mysite/mydb.db SQLite version 3.7.9 2011-11-01 00:52:41 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> but at least now I know I have SQLite3 though I did not before

Re: Chapter 5 problems

2013-07-13 Thread Randy Baxley
bump On Fri, Jul 12, 2013 at 4:20 PM, Randy Baxley wrote: > randy@randy-Inspiron-530s:~/dj/mfp/mysite$ sqlite3 > /home/dj/mfp/mysite/mysite/mydb.db > SQLite version 3.7.9 2011-11-01 00:52:41 > Enter ".help" for instructions > Enter SQL statements terminated with a "

Re: Chapter 5 problems resolved

2013-07-13 Thread Randy Baxley
File > "/usr/local/lib/python2.7/dist-packages/django/db/backends/sqlite3/base.py", > line 296, in _sqlite_create_connection > self.connection = Database.connect(**kwargs) > OperationalError: unable to open database file > > This one is resolved: 1. not sure why but I had to sudo sglite3 2.

Re: Getting started with django( the new one is confusing , especially first episode)

2013-07-14 Thread Randy Baxley
http://docs.python-guide.org/en/latest/dev/virtualenvs.html https://github.com/applicationsonline/librarian http://docs.vagrantup.com/v2/why-vagrant/index.html Now maybe you can help me by telling me what episode you are refering to? On Sun, Jul 14, 2013 at 5:05 AM, wrote: > What is vagrant

Re: create random string for username

2013-07-20 Thread Randy Baxley
The Django tutorial is not quite making it for me. This is a very complicated language and all the pieces seem to not match up for me. This I think is my fault and most of it seems to be in the use of the r hat for root and exactly how that points to views, models and dbs. I may get there but it

Learning how to build a web site for my python games and a blog

2013-07-27 Thread Randy Baxley
Is anyone working through The Django Book that would like to form a fb page just for that or knows of a good tutorial where questions will get answers? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop recei

Re: Learning how to build a web site for my python games and a blog

2013-07-30 Thread Randy Baxley
level? On Saturday, July 27, 2013 8:57:45 AM UTC-5, Randy Baxley wrote: > > Is anyone working through The Django Book that would like to form a fb > page just for that or knows of a good tutorial where questions will get > answers? > -- You received this message because you ar

Re: Learning how to build a web site for my python games and a blog

2013-07-31 Thread Randy Baxley
ue, Jul 30, 2013 at 3:07 PM, Randy Baxley > > > wrote: > >> I am trying to learn Django. I have a good base in Python having worked >> several basic MOOCs and second level classes. My major short term goal is >> to build a web site where I will have a blog on smok

Tutorial Part 1

2020-05-08 Thread Randy Zeitvogel
I just started working with Django in the last couple of days. First environment is Ubuntu 19.10, python 3.7.5 and Django 3.1. Second environment is Fedora 31, python 3.7.5, and Django 3.0.6. In both cases after I create the polls app and try it out, I get this: Page not found (404) Request Me

Re: Tutorial Part 1

2020-05-09 Thread Randy Zeitvogel
Nagaraju Singothu < nagarajusingoth...@gmail.com> wrote: > Dear Sir, > > First add your app in settings.py,then after > URLs.py > from django.urls import path,include > from ur(appname) import views > > On Sat 9 May, 2020, 5:42 AM Randy Zeitvogel, >

Re: Django - How to add a link to a table that will open another page(django app) from an html template and pass a variable with it.

2019-09-25 Thread Randy Hughes
views.py class *viewLit*(TemplateView): def get(self, request, strategy=None): circuit_id = self.request.query_params.get('circuitid', None) urls.py path('viewlit/', viewlit.as_view(), name='viewlit') search_custom.html {{ circuit.circuitid }} ''' this is an example using a query paramet

Re: redirect authenticated user in CreateView

2019-09-25 Thread Randy Hughes
from django.shortcuts import HttpResponseRedirect class ExampleView(TemplateView): template_name = 'pages/example.html' def get(self, request): if not request.user.is_authenticated: return HttpResponseRedirect('login') On Wed, Sep 25, 2019 at 1:09 PM saeed albooyeh wrote: > hi > i used Create