Re: Formwizard and customizing the template layout

2009-11-02 Thread Mark L.
> Is there any way to have individual templates for each form To define, which template should be used for which step, you can override the get_template(self, step) method of the wizard (it must return the name of the template), that way you can use separate templates for certain steps (step numb

Re: model-validation: Excessive (and weird) queries during validation

2009-11-02 Thread Mark L.
On Nov 2, 10:27 pm, Karen Tracey wrote: > On Mon, Nov 2, 2009 at 1:41 PM, Mark L. wrote: > > > As the subject states, I am using the model-validation branch at the > > moment, which allows me to do, well, validation in the models. > > > I've however, noticed

Keeping state in the FormWizard: instance attributes considered harmful?

2009-11-03 Thread Mark L.
). This, however, seems impossible to implement. I'd be most grateful, if someone could give me an idea or two or, at least, point me into a right direction. Mark --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Strange SQL Query

2009-11-04 Thread Mark L.
= 45))', which makes perfect sense to me (this observation was made by another django-users member, so I am not the one to be thanked here). Anyway, I haven't (yet) read the source of ModelFormSet, so I can't give you any direct advice as to how to get rid of these queries. Coul

Re: Trace SQL back to python statement

2009-11-04 Thread Mark L.
"False", you will be able to see the whole stacktraces. You can read up on the rest of the options on the related package index page (at least, that's where I've learned about them). Hope that helped Mark --~--~-~--~~~---~--~~ You received this mes

Re: Trace SQL back to python statement

2009-11-04 Thread Mark L.
On Nov 4, 3:44 pm, Knut Nesheim wrote: > 4 nov 2009 kl. 13.34 skrev Mark L.: > > > I guess by "debug toolbar" you mean the django-debug-toolbar (http:// > > pypi.python.org/pypi/django-debug-toolbar/0.8.0). If that is the case, > > django-debug-toolbar has

Re: Keeping state in the FormWizard: instance attributes considered harmful?

2009-11-07 Thread Mark L.
e user does not like them allowing them to go back and change them > so any ideas or solutions would be appreciated. > > txranger > > On Nov 3, 1:30 pm, "Mark L." wrote: > > > Just to sparkle your imagination, the desired workflow of aFormWizard > > I am trying

Re: What would cause an app to not register?

2009-11-16 Thread Mark (Nosrednakram)
il silently and ./manage.py validate won't find any errors. Hope this helps let us know what you find please. Mark On Nov 15, 4:12 pm, Joshua Kramer wrote: > Howdy Everyone! > > After having installed a fresh version of Pinax 0.7.1, I have an > interesting problem with the behavior

Re: Django/GoDaddy

2009-11-16 Thread Mark (Nosrednakram)
I'd check rpmforge see: http://wiki.centos.org/AdditionalResources/Repositories/RPMForge for centos notes On Nov 15, 3:27 pm, mkumm wrote: > Colin thanks - I will try installing all of the -devel stuff. ha - 2.4 > - thanks! > > On Nov 15, 2:32 pm, Colin Bean wrote: > > > On Sun, Nov 15, 2009 at

Re: Initial values for formwizard form

2009-11-18 Thread Mark L.
self.initial[] list. It means, that to set set initial values for the form in step X you do the following: init = { 'key1':'val1', 'key2':'val2', etc.. } self.initial[X] = init The best (and, indeed, about the only place to handle this) is the proc

Multiple sites on a single server

2009-11-19 Thread Mark Freeman
I currently have a working site running Django and now want to move a couple of other of my sites to Django as well. I'm in the process of moving off a hosted VPS to my own local server, where the existing Django site is. My questions is more of best practice when deploying multiple sites to the s

Re: Designing base template - how to include media properly?

2009-11-23 Thread Mark (Nosrednakram)
se.html but you can take a look at if for there media blocks I believe are something like extrastyle etc... {% block extramedia %} {% if forms %} {% for form in forms %} {{ form.media }} {% endfor %} {% else %} {{ form.media }} {% endif %} Mark On Nov 23, 1:31 pm, Todd B

Content types and interaction with DeferredAttribute models

2009-11-25 Thread Giovannetti, Mark
FYI: Trying to run unittests. Using the .only() method on a queryset causes the content types machinery to find and attempt to use a model with Deferred attributes. This function (with print and verbosity added): def update_contenttypes(app, created_models, verbosity=2, **kwargs): """

Test Application Without it's own models

2009-12-04 Thread Mark (Nosrednakram)
ate tables from within the test script Is there a standard way to do this I haven't found? If not any suggestions on the ideas? Thoughts on above? Other examples are online table exporter, chat. Thank you, Mark -- You received this message because you are subscribed to the Google Groups

Re: Test Application Without it's own models

2009-12-04 Thread Mark (Nosrednakram)
ctice though. Thanks Again, Mark On Dec 4, 5:37 am, "Mark (Nosrednakram)" wrote: > Hello Django Users, > > I have a few applications that don't have defined models but that > interact with other models.  The most recent is a full text search > engine based on Whoo

Re: Coltrane Weblog Practical Django Projects 2nd Ed, page not found for http://127.0.0.1:8000/weblog/

2009-12-09 Thread Mark Freeman
Bernard, You need to put the url for weblog above flat pages. The empty string '' is catching everything and it never sees your weblog url. Mark On Dec 8, 7:39 am, bernard wrote: > Hi all, > > I am reading through the Practical Django Projects 2nd Edition book > and

Re: Coltrane Weblog Practical Django Projects 2nd Ed, page not found for http://127.0.0.1:8000/weblog/

2009-12-09 Thread Mark Freeman
s, it does so in the order you have them listed. Mark On Dec 8, 7:39 am, bernard wrote: > Hi all, > > I am reading through the Practical Django Projects 2nd Edition book > and i am now on the weblog entries_index part (page 84) where im > trying to view the weblog entry index but I

return a dynamically generated image to the user?

2009-12-10 Thread Mark Freeman
I have recently created a python module which parses an input string and invokes the program lilypond to generate a music score image. All of this works fine as a standalone python app. I'm now looking to add this to my django site so users can enter the text on a form, hit submit, and have the si

Re: Queryset filter on foreign key

2009-12-10 Thread Mark Schuuring
split them up into two columns depending > on the blog id? In which case, you could do it like this: > > blogs_one = Post.objects.filter(author=user, blog__id=1) > blogs_two = Post.objects.filter(author=user, blog__id=2) > > and then iterate through blogs_one and blogs_two

Re: {{ form.as_table }} not displaying in template

2009-12-13 Thread Mark Schuuring
ion? So far in /blogs/blogs.html >> >> >>         >>             {{ form.as_table }} >> >>                 >>                   >>                 >>                     >>                 >>             >>        

Re: {{ form.as_table }} not displaying in template

2009-12-13 Thread Mark Schuuring
Oh and I am not familiar with Ajax I am sorry because I've been told that's a way to handle it... Regards 2009/12/13 Mark Schuuring : > Hey guys thanks for your respond.  First of all i read the tutorial > and the form works in /search with the template and the view. For now

Admin + non-model Users from custom backend?

2009-12-14 Thread Mark Paschal
to make really-foreign keys that don't even reference models, but rather call into the auth backend system. I realize I'm talking about essentially extending the auth backend interface to include fake models, so really I just wonder if anyone has experience to share about trying to get the

Re: choice model with objects.values_list options

2009-12-20 Thread Mark Schuuring
ed this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visi

Saving the query object for later

2010-04-28 Thread Mark Jones
When someone searches for something on the site and finds nothing, I want to save that query for later reuse (so I can run it each night to see if anything new matches their request, and email what is found to the user). What is the best way to go about this? 1. Save the SQL that is generated an

Re: Saving the query object for later

2010-04-28 Thread Mark Jones
I was thinking I could pickle/unpickle the request then run it thru with an extra flag of (send email) thru the same code that wsgi uses. If I jsonify the data, how would I get that back into a python object? Is it really as simple as str=json.dumps(request) and request = json.loads(str) I don't

newbie problem -- cant import library

2010-04-30 Thread Mark Serva
something wrong with the configuration, but I cant pin down what it is. Many thanks for any help. Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscr

Re: Looking for unavailable table?

2010-06-25 Thread Mark Linsey
I don't quite understand what changes you made before producing this error, and I'm totally unfamiliar with sqllite. But I do know that for many (really, most) different model changes, just running syncdb will not make the appropriate changes to your tables. You probably need to look into south m

Re: Filter based on result of model method

2010-07-05 Thread Mark Linsey
Perhaps someone with much more Django experience will correct me, but I am 99% sure that this is impossible. As I understand it, parameters passed to filter() are translated into SQL statements. An arbitrary python method that you write for your object can do any number of things, which might not

Create files and directories from Django 1.2.1

2010-08-14 Thread Mark Mooij
gh my external script. I hope anybody can help me. Thanks, Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-user

Re: Create files and directories from Django 1.2.1

2010-08-15 Thread Mark Mooij
maps/"+str(id)+"/"+str(id) + ".kml" f = open(writefile, 'wb') ... I hope this helps? On 14 aug, 21:55, Mike Dewhirst wrote: > On 15/08/2010 12:10am, Mark Mooij wrote: > > > Hi all, > > > I recently migrated from Django 1.1.1 to 1.2.1. In

Re: Create files and directories from Django 1.2.1

2010-08-16 Thread Mark Mooij
any directory structure in the path, the file is created in the root of the website, if I try creating a directory with os.mkdir() it should take the root as well I presume, but no directory is created. It seems that Django 1.2.1 has problems calling the os.mkdir() and makedirs() commands ? Mark

Re: Create files and directories from Django 1.2.1

2010-08-16 Thread Mark Mooij
Also I find it strange that makedirs command rises an error when calling from Django ("mkdir() takes exactly 1 argument (2 given)"), but again outside Django this works just fine.. Hope anybody has any suggestions.. Mark On 16 aug, 14:22, Doug Blank wrote: > On Mon, Aug 16, 2010 at

A replacement for fixtures

2010-08-22 Thread Mark Sandstrom
ip install factory_boy ...which installs a package named 'factory'. Enjoy! - Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this gr

newbie question

2010-10-04 Thread mark jason
silly one,but please understand that I am a newcomer to django and python..and programming in general thanks and hoping for guidance mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: newbie question

2010-10-04 Thread mark jason
thanks guys mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For mo

unique constraint

2010-10-04 Thread mark jason
do I do that?I was thinking of specifying creator_of_entry.username+url as unique.How do I do this in django? Also,there is the case of 2 different people with same name.I would very much like some pointers as to how this can be tackled.If someone can advise ,please do thanks, mark -- You

Re: unique constraint

2010-10-04 Thread mark jason
thanks Shawn.. I set the meta option and now it correctly throws an IntegrityError when I try to enter the duplicate value for the url. Now should I catch this in clean() method of the model and raise an error message when user enters the duplicate value? mark On Oct 5, 1:19 am, Shawn Milochik

Re: unique constraint

2010-10-04 Thread mark jason
thanks Shawn.. I set the meta option and now it correctly throws an IntegrityError when I try to enter the duplicate value for the url. Now should I catch this in clean() method of the model and raise an error message when user enters the duplicate value? mark On Oct 5, 1:19 am, Shawn Milochik

Re: unique constraint

2010-10-04 Thread mark jason
thanks Shawn.. I set the meta option and now it correctly throws an IntegrityError when I try to enter the duplicate value for the url. Now should I catch this in clean() method of the model and raise an error message when user enters the duplicate value? mark On Oct 5, 1:19 am, Shawn Milochik

Re: unique constraint

2010-10-04 Thread mark jason
thanks Shawn.. I set the meta option and now it correctly throws an IntegrityError when I try to enter the duplicate value for the url. Now should I catch this in clean() method of the model and raise an error message when user enters the duplicate value? mark On Oct 5, 1:19 am, Shawn Milochik

Re: unique constraint

2010-10-05 Thread mark jason
ate url') return url I couldn't figure out how to get the user_given_urls through filter method on MyModel..can anybody help? thanks mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, se

Re: unique constraint

2010-10-05 Thread mark jason
.user mymdl.save() Is there some other way to get user_given_urls other than the list comprehension above?If so please tell me thanks mark On Oct 5, 6:45 pm, Shawn Milochik wrote: > Why not just use a ModelForm? > > You can override the form's clean() or add a clean_url() me

Feedback on New Database Template Application

2010-11-19 Thread Mark (Nosrednakram)
n create/delete/etc new templates with the demo account. Thank you, Mark Anderson -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, se

Re: A Model to store links to other models

2010-11-20 Thread Mark (Nosrednakram)
ou to store any object using two fields and re-generate it easly in two calls. Hope This Helps, Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from

Re: handling generated files

2010-12-08 Thread Mark (Nosrednakram)
et a few thing up in you http response to serve up a proper csv file. response = HttpResponse(mimetype='text/csv') response['Content-Disposition'] = 'attachment; filename=%s' % 'MyRandomFileName' response.write(FILE_CONTENT) return response You can set other he

django-reroute: a drop-in replacement for django.conf.urls.defaults that supports HTTP verb dispatch and view wrapping.

2010-12-10 Thread Mark Sandstrom
l('GET', '^employees/(?P\d+)$', 'show_employee') verb_url('PUT', '^employees/(?P\d+)$', 'update_employee') verb_url('DELETE', '^employees/(?P\d+)$', 'delete_employee'), url('^employees/(?P\d+)/', i

Re: django-reroute: a drop-in replacement for django.conf.urls.defaults that supports HTTP verb dispatch and view wrapping.

2010-12-10 Thread Mark Sandstrom
Getting started is as simple as: ... easy_install django-reroute, or pip install django-reroute ;) - Mark On Fri, Dec 10, 2010 at 4:12 PM, Mark Sandstrom wrote: > Hello all, > > This is a pretty common pattern in django: > > def view(request): > if requ

Help with plug-in system

2010-01-03 Thread Mark (Nosrednakram)
er list, if you know of one please let me know. If you have any advice on the following code please let me. Thank you, Mark >>>>>>>>>>>>>>>> The Code <<<<<<<<<<<<<<<<<<<<<<<<<

Python based web reporting tool?

2010-01-07 Thread Mark Freeman
python based so I can hook into it. Thanks! Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-user

Re: Python based web reporting tool?

2010-01-09 Thread Mark Freeman
Thanks everyone. A lot of great suggestions here. It looks like reportlab is going to fit my needs nicely! On Jan 8, 7:38 am, tom wrote: > You could tryhttp://www.xhtml2pdf.com/ > > It's xhtml+css -> pdf converter. Then you should be able to use django- > templates and create from this templates

Re: Text Search using Python

2010-01-14 Thread Mark (Nosrednakram)
f you want/need both. I would probably write a manager for indexing static media that would take an OS path and base URL to prepend to it and run it when needed. If you want to try whoosh feel free to ask me questions. Mark On Jan 14, 4:04 am, Amit Sethi wrote: > Hi , I have  a project wi

HTTP 500 error in apache but not in test server

2010-01-24 Thread Mark Underwood
data = urllib.urlencode(values) req = Request(url, data) print req.get_full_url() try: response = urlopen(req) except URLError, e: print e.code print e.read() exit() the_page = response.read() print the_page the thing that is puzzling me (apart form how to fix it) is that the test ser

Re: HTTP 500 error in apache but not in test server

2010-01-24 Thread Mark Underwood
the end it turns out made some silly mistakes. Cheers Mark On Jan 25, 10:43 am, Graham Dumpleton wrote: > On Jan 25, 12:54 pm, Mark Underwood wrote: > > > > > > > Hi all, > > > Ive already posted a lot of information > > herehttp://serverfault.com/qu

getting a view function from a view name

2010-02-18 Thread Ryan Mark
Any thoughts as to how I could get the view function from a url name? Is there something like django.core.urlresolvers.resolve() that takes a url name and returns a view function? Thanks! -- Ryan Mark -- You received this message because you are subscribed to the Google Groups "Django

Re: Modeling question

2010-03-02 Thread Mark (Nosrednakram)
show examples of using self referencing m2m. Mark On Mar 2, 10:01 am, Jeffrey Taggarty wrote: > Hi Guys, > > I have a website (go figure!) where there is a main navigation, there > is going to need to be sub pages for each main nav item, but this sub > page can belong to more

Re: Modeling question

2010-03-02 Thread Mark (Nosrednakram)
show examples of using self referencing m2m. Mark On Mar 2, 10:01 am, Jeffrey Taggarty wrote: > Hi Guys, > > I have a website (go figure!) where there is a main navigation, there > is going to need to be sub pages for each main nav item, but this sub > page can belong to more

Strange behaviour with select_related and model inheritance

2010-03-19 Thread Mark L.
et it turns out, that no queries are run at all. Is it supposed to be like that? In plain SQL this would be an inner join from A to Base followed by a left outer join with B. Is it possible to make it work at all? If you don't derive A from Base, it works perfectly (creates a left outer join fr

RE: Displaying the fields of two tables on the same admin page

2010-03-31 Thread Giovannetti, Mark
> > I am entering them on the same page otherwise I will have to note down > the ids of people and publications table and then go to bridge table > and insert the ids there. So the reason I want to enter in the same > page is I will insert the ids into bridge table whenever I click save. > I am

choices/ and getting rid of the dashes?

2007-09-06 Thread Mark Green
#x27; ) Using form_for_model() on the above model results in HTML like this: - Male Female How do I get rid of the first option (the dashes)? I would prefer to have the -widget default to my default-value. Any help appreciated! -mark --~--~-~--~~~---~-

Re: Form field deletion

2007-09-07 Thread Mark Green
o? my form adds a second password field like this: class JoinForm(forms.BaseForm): def __init__(self, *args, **kwargs): self.base_fields['pw2'] = forms.CharField( label = 'again', min_length = 3 ) self.base_fields['pw2&#

Re: *Occasional* PostgreSQL Error

2008-01-29 Thread Mark Green
st curious, what's the state of connection pooling in django? And what does the user see when such an error occurs, I guess an error 500 message? -mark --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

Re: *Occasional* PostgreSQL Error

2008-01-29 Thread Mark Green
On Tue, 2008-01-29 at 22:07 -0600, James Bennett wrote: > On Jan 29, 2008 10:04 PM, Mark Green <[EMAIL PROTECTED]> wrote: > > Just curious, what's the state of connection pooling in django? > > My personal opinion is that the application level (e.g., Django) is > t

Re: *Occasional* PostgreSQL Error

2008-01-30 Thread Mark Green
On Tue, 2008-01-29 at 23:33 -0600, James Bennett wrote: > On Jan 29, 2008 11:18 PM, Mark Green <[EMAIL PROTECTED]> wrote: > > I agree on the loadbalancer front but the overhead for all > > those TCP connections (and pgpool managing them) worries me a bit. > > I'v

Re: *Occasional* PostgreSQL Error

2008-01-30 Thread Mark Green
On Wed, 2008-01-30 at 11:03 -0600, James Bennett wrote: > On Jan 30, 2008 8:57 AM, Mark Green <[EMAIL PROTECTED]> wrote: > > Well, "Build for failure". Temporary overload can happen at any > > time and I'd expect django to behave exceptionally bad in that &g

Re: *Occasional* PostgreSQL Error

2008-01-30 Thread Mark Green
On Wed, 2008-01-30 at 19:34 -0600, James Bennett wrote: > On Jan 30, 2008 6:01 PM, Mark Green <[EMAIL PROTECTED]> wrote: > > Ahem, there's a huge difference between being confronted with > > a spinner/progress bar or an error page. The former speaks > > "Pleas

Re: synchronization problem

2008-03-30 Thread Mark Green
it > is not, then throw an error. and rollback the transaction. Ehm, and how would you "check on commit"? -mark --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to t

Re: Normalized dates

2008-04-15 Thread Mark Reynolds
have tzinfo, so I always store without it. I.e., I assume all datetimes are UTC, but without a tzinfo, until I convert it at the last moment for rendering a template. -Mark gmacgregor wrote: > Some of my project app's models have a DateTimeField where the value > is UTC while oth

Many-to-many search

2007-02-25 Thread Mark Jarecki
, core=True) Any ideas how to implement this? Cheers Mark --~--~-~--~~~---~--~~ 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 unsu

Re: Only getting 500 error, not 404

2007-03-03 Thread Mark Engelberg
? I DID look in the server log though, and it appears that it's simply not finding 404.html. I haven't created my own custom 404.html, so I would expect it to have no trouble finding the default one. Any idea why it might not be finding it? Thanks, Mark On 3/3/07, James Bennett <[EM

Re: Only getting 500 error, not 404

2007-03-04 Thread Mark Engelberg
OTECTED]), ) EMAIL_HOST='mail3.webfaction.com' EMAIL_HOST_USER='username' EMAIL_HOST_PASSWORD='password' EMAIL_PORT='25' DEFAULT_FROM_EMAIL='[EMAIL PROTECTED]' SERVER_FROM_EMAIL='[EMAIL PROTECTED]' 'username' is my default webfaction mailbox

Duplicating model/view structure across several Django apps

2007-03-12 Thread Mark Engelberg
directory), but in fact, there is only one. However, I'm testing this on a Windows machine before deploying it, so I'd like to find a solution that also works under Windows. Any suggestions? Thanks, Mark --~--~-~--~~~---~--~~ You received this message

Re: Duplicating model/view structure across several Django apps

2007-03-12 Thread Mark Engelberg
Well, as far as I can tell, for each entry in my INSTALLED_APPS (from settings.py), it looks in that directory, and expects to find a models.py there. So I'm looking for an alternative to duplicating the same models.py file in multiple directories. --Mark On 3/12/07, akonsu <[EMAIL P

Re: Duplicating model/view structure across several Django apps

2007-03-12 Thread Mark Engelberg
work. Django does not process these imported models. But yes, if I could make this work, it would be an acceptable solution. --Mark On 3/12/07, akonsu <[EMAIL PROTECTED]> wrote: > > yes, i was thinking that may be models.py might import actual models > from elsewhere? if it can

Sort by output of arbitrary method

2007-03-13 Thread Mark Engelberg
attribute that isn't a field of the database, but is there an easy way to make the admin do this anyway? Barring that, since most databases support min max and average, is there a way to sort on those aspects of a field? Thanks, Mark --~--~-~--~~~---~--~~ Yo

Saving a model instance multiple times

2007-03-14 Thread Mark Jarecki
Hi, I was wondering how you would go about saving a model instance multiple times (having seperate db entries) while changing just one or two fields each time. I'm wanting to use a single series of inputs that define the parameters to create/save multiple event objects to the database. J

Copying objects in admin

2007-03-14 Thread Mark Jarecki
Hi guys When you click the "Save and Add Another button" in the Admin, the values are cleared and all need to be re-entered for the new object. How would I go about saving that existing object and then transferring the field values to the new object. This would save a lot of time for some

Best way to implement user-specific content?

2007-03-21 Thread Mark Soper
/CookBookThreadlocalsAndUser). I'm hoping there's a preferred/standard way to set this up, but haven't been able to find it here or in the django docs/code. Thanks, Mark --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

Adding a field to a model

2007-03-24 Thread Mark Engelberg
I know that, unfortunately, there's no painless way to migrate all the data in your database when you add a new optional field to your model. Pity. So what is the MOST painless way to do this? --Mark --~--~-~--~~~---~--~~ You received this message becaus

List of unchecked checkboxes?

2007-03-31 Thread Mark Engelberg
the list of ids dynamically. I want to approve the checked items, and delete the unchecked items. Make sense? Thanks, --Mark --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gr

Which button was clicked?

2007-03-31 Thread Mark Engelberg
When there are multiple submit buttons, how do you extract the clicked one from the request.POST? Thanks, Mark --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this g

unique_together Validator for a model with an (editable=False) field

2007-04-05 Thread Mark Soper
stom manager or manipulator or in some other way that doesn't require changes to the admin views, models, etc.? Thanks! Any insight is appreciated. Mark --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups &quo

Re: unique_together Validator for a model with an (editable=False) field

2007-04-06 Thread Mark Soper
access to model instance info in the manipulator context, allowing me to write model-aware validators here without changing any django code. I haven't tried this yet. I'll keep you posted on how it goes. If you have any insight on pros and cons of this approach, please let know. Mark

Re: unique_together Validator for a model with an (editable=False) field

2007-04-09 Thread Mark Soper
this seems to work. Mark - class MymodelManager(models.Manager): def get_query_set(self): current_user=threadlocals.get_current_user() if current_user.is_superuser: return super

get_application_name() ?

2007-04-16 Thread Mark Engelberg
ation that it is a part of, so it can use that name for disambiguation purposes. Is there a way to do that? In other words, is there something called get_application_name() or something similar? Thanks, Mark --~--~-~--~~~---~--~~ You received this message becau

Psychopg 2 Install

2007-04-17 Thread Mark Jarecki
Hi I'm trying to set-up a django system comprising a separate web server, static server and database server. Where does Psychopg live: on the web or database server? And how would I go about configuring the two? Cheers Mark --~--~-~--~~~---~--~

Re: Psychopg 2 Install

2007-04-17 Thread Mark Jarecki
Realised that Psycopg sits on the database server and you refer to it through the settings.py file. Should get more sleep On 18/04/2007, at 11:23 AM, Mark Jarecki wrote: Hi I'm trying to set-up a django system comprising a separate web server, static server and database server. Where

Re: Psychopg 2 Install

2007-04-17 Thread Mark Jarecki
right direction. I guess I want to know how to make the Apache server and the Postgres server talk to each other over a network connection and not locally on the same machine. Thanks Mark On 18/04/2007, at 12:43 PM, Brian Luft wrote: Hi Mark, In direct answer to your question, psycopg provi

Re: Psychopg 2 Install

2007-04-17 Thread Mark Jarecki
recommended solution? Or will a lot of customisation be necessary? I notice that quite a few sites are running set-ups that separate the servers according to their function (web, static and database), so this can't be a rare set-up. Thanks in advance Mark On 18/04/2007, at 1:04 PM,

Mac OS X + Django; how do I invoke the fcgi?

2007-04-30 Thread Mark Phillips
orts but I have a few questions; it seems like a lot of effort just to get Apache2 running and when done I will have a "non-standard" server. Mark Phillips --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

Re: Mac OS X + Django; how do I invoke the fcgi?

2007-04-30 Thread Mark Phillips
and open the browser. Then I enter URL that is mapped to that server, e.g. dev.mophilly.com. The web server returns the main page. With that I want to open the Django admin pages to make things are working. - Mark On Apr 30, 2007, at 10:39 AM, Joseph Heck wrote: > Hi Mark, > > Y

Re: Mac OS X + Django; how do I invoke the fcgi?

2007-04-30 Thread Mark Phillips
t; > Do you have this in place? Did you change this at all? If so, what > do you have there? Did you restart the Apache server after you > modified the configuration file? > > -joe > > > On 4/30/07, Mark Phillips <[EMAIL PROTECTED]> wrote: > Thank

operationalError 2002, mysql on osx 10.9

2007-05-02 Thread Mark Phillips
installed. Can someone point me in the right direction? - Mark Traceback = admin$ python manage.py syncdb Traceback (most recent call last): File "manage.py", line 11, in ? execute_manager(settings) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/

Re: operationalError 2002, mysql on osx 10.9

2007-05-02 Thread Mark Phillips
On May 2, 2007, at 12:25 PM, Michael K wrote: > > On May 2, 10:09 am, Mark Phillips <[EMAIL PROTECTED]> wrote: >> Being a newbie has its challenges... > > I know exactly what you mean. > >> The server is running mysql, I use phpMyAdmin and a couple of other >

Re: operationalError 2002, mysql on osx 10.9

2007-05-02 Thread Mark Phillips
ect closely. I should have went > with my gut feeling that it was Mac OS X :) > > > Michael No problem, Michael. All is well. - Mark --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

db class from SQL create table statements

2007-05-02 Thread Mark Phillips
I am not quite sure how to search for this... I have an existing database in mysql; a great many tables and columns are involved. Is there a way to create the django data classes by reading the database schema or create table statements? - Mark, a lazy man by trade, a curious sort by

Re: db class from SQL create table statements

2007-05-02 Thread Mark Phillips
On May 2, 2007, at 12:47 PM, Brandon Low wrote: > python manage.py inspectdb Thanks! --~--~-~--~~~---~--~~ 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

loaddata issue

2007-05-03 Thread Mark Jarecki
ython/lib/python2.5/site-packages/django/db/backends/ postgresql/base.py", line 44, in execute return self.cursor.execute(sql, [smart_basestring(p, self.charset) for p in params]) psycopg.ProgrammingError: ERROR: relation "guide_venuetype_id_seq" does not exist SELECT setval

Re: loaddata issue

2007-05-04 Thread Mark Jarecki
ango/db/backends/ postgresql/base.py", line 44, in execute return self.cursor.execute(sql, [smart_basestring(p, self.charset) for p in params]) psycopg.ProgrammingError: ERROR: relation "guide_venuetype_id_seq" does not exist SELECT setval('Guide_venuetype_id_seq&

date not saved in tutorial 2

2007-05-04 Thread Mark Phillips
Action displays "no fields were changed." I am working on OS X 10.9, python 2.4, intel based Mac. I ran validate polls, and syncdb. No errors were reported. Where should I be looking? - Mark --~--~-~--~~~---~--~~ You received this message becau

Re: date not saved in tutorial 2, a little more info

2007-05-04 Thread Mark Phillips
On May 4, 2007, at 10:39 AM, Mark Phillips wrote: > I am walking through the tutorial again; new machine, new issues. > > In Tutorial 2, when I run the server, log in, and edit the Poll by > changing the date using the Today link and click Save, django says > the operation was co

<    1   2   3   4   5   6   >