Re: Synchronising Database.

2007-07-18 Thread Kenneth Gonsalves
On 19-Jul-07, at 11:08 AM, Dmitriy Sodrianov wrote: > How should the process of synchronisation be performed? > To my mind only dropping table and recreating it should do the task. for example: http://www.djangosnippets.org/snippets/188/ -- regards kg http://lawgon.livejournal.com

Re: Synchronising Database.

2007-07-18 Thread James Bennett
On 7/19/07, Dmitriy Sodrianov <[EMAIL PROTECTED]> wrote: > After typing manage.py syncdb again the table is not synchronised with > the model despite the name of the command syncdb. http://www.djangoproject.com/documentation/django-admin/#syncdb > How should the process of synchronisation be

Synchronising Database.

2007-07-18 Thread Dmitriy Sodrianov
Hi to all! Imagine a situation when a Django model is installed into the database with well-known command manage.py syncdb and then it is altered, let's say a new field is added to model. After typing manage.py syncdb again the table is not synchronised with the model despite the name of the

django foreignkey

2007-07-18 Thread james_027
hi, I have a model with a field models.ForeignKey(), with manage.py validate I check if my code are right, then run manage.py syncdb. When I was checking the tables generated I don't see any foreign key created? Is there something wrong? where should I check? I am using django 0.96, mysql 5 on

Re: Problem installing django on dreadhost

2007-07-18 Thread walterbyrd
I think I may have fixed it. I did the following: 1) I had moved sqlite, but didn't change the link, so I fixed that. 2) In the settings.py, I entered a path to the database, but not the actual database name, so I fixed that as well. 3) Then I re-ran the django-admin.py syncdb script $

Re: context processor question

2007-07-18 Thread james_027
Hi Jeremy, I am a bit lost ... where do I apply that? Isn't that I just call the variable name/dict key in the template? Thanks james On Jul 19, 11:18 am, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote: > On 7/18/07, james_027 <[EMAIL PROTECTED]> wrote: > ... > > > the commonly use data will

Re: Blog engine

2007-07-18 Thread Kyle Fox
It's easy to write a "basic" blog in Django. If that's all people want, then great. Something like that will work perfectly for the majority of bloggers (who probably won't get that much readership anyway)... But all this talk about making a "full-featured" blog app in Django -- one that will

Re: Problem with multiple django versions on mod_python

2007-07-18 Thread Russell Keith-Magee
On 7/19/07, oggie rob <[EMAIL PROTECTED]> wrote: > > Please, if you've seen the same issue or have any helpful ideas to try > to stop the error, let me know. I think I've seen the same problem (or, at least, an analogous one). Unfortunately, I can't provide much by way of helpful debug or

Problem with multiple django versions on mod_python

2007-07-18 Thread oggie rob
I've run into a problem that appears to be caused by multiple django versions running on the same server. I have a preforked mod_python installation and the problem I'm seeing is this: after using the trunk- based application, I try to use the 0.91-based application and get a 500 error. The root

Re: How to use request.GET??

2007-07-18 Thread Jeremy Dunck
On 7/18/07, Greg <[EMAIL PROTECTED]> wrote: > Do I have to return a HttpResponse? Yes. It is an error for an HTTP Request not to be given a HTTP response in return. In the 'if "favorite_color"' branch of your example view, simple "return response" just before the else: clause.

Re: context processor question

2007-07-18 Thread Jeremy Dunck
On 7/18/07, james_027 <[EMAIL PROTECTED]> wrote: ... > the commonly use data will automatically available, do I get it right? > Yes. Just keep in mind that you need to use RequestContext rather than Context in order for context processors to be applied.

Re: Django's User authentication

2007-07-18 Thread james_027
Thanks Jason for sharing this one. cheers, james On Jul 18, 9:07 pm, [EMAIL PROTECTED] (Jason F. McBrayer) wrote: > james_027 <[EMAIL PROTECTED]> writes: > > what if I need additional fields or methods for my apps? Do i inherit > > it or edit the user class? > > The standard approach is >

Re: How to use request.GET??

2007-07-18 Thread Greg
Also, when I use 'http://example.com/url_to_set_colour_view/? favorite_color=Blue' it gives me an error that says: 'The view mysite.rugs.views.set_color didn't return an HttpResponse object.' Do I have to return a HttpResponse? My view is shown above...if the 'if' statement is true the view

Re: How to use request.GET??

2007-07-18 Thread Greg
I've seen other Django websites that use the ? mark at the end. I've always wondered what the reason for that was. So the only time the ? mark is used is to send form data? On Jul 18, 9:33 pm, "Nimrod A. Abing" <[EMAIL PROTECTED]> wrote: > On 7/19/07, SmileyChris <[EMAIL PROTECTED]> wrote: > >

Re: Bulk data upload

2007-07-18 Thread Chris Moffitt
Also, this library is really simple to use to pull data out of excel. http://www.lexicon.net/sjmachin/xlrd.htm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: ip to location

2007-07-18 Thread Justin Bronn
Francesco, MaxMind(R) produces commercial and free IP geolocation datasets. As a proof of concept I created GeoDjango-enabled models and import scripts for their CSV files: http://www.djangosnippets.org/snippets/327/ http://www.djangosnippets.org/snippets/328/ To create this code I had to

Re: Multiple URLconfs per app?

2007-07-18 Thread Collin Grady
You'll need two files. --~--~-~--~~~---~--~~ 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 from this group, send email to [EMAIL

Re: How to use request.GET??

2007-07-18 Thread Nimrod A. Abing
On 7/19/07, SmileyChris <[EMAIL PROTECTED]> wrote: > > On Jul 19, 2:22 pm, Greg <[EMAIL PROTECTED]> wrote: > > I was wondering how do I send a 'favorite_color' GET parameter? Do I > > have to use a form to do this that sends data by GET or is there > > another way to do it? > >

Re: How to use request.GET??

2007-07-18 Thread SmileyChris
On Jul 19, 2:22 pm, Greg <[EMAIL PROTECTED]> wrote: > I was wondering how do I send a 'favorite_color' GET parameter? Do I > have to use a form to do this that sends data by GET or is there > another way to do it? http://example.com/url_to_set_colour_view/?favorite_color=Blue

How to use request.GET??

2007-07-18 Thread Greg
Hello, I have the following function / def set_color(request): if "favorite_color" in request.GET: # Create an HttpResponse object... response = HttpResponse("Your favorite color is now %s" % \ request.GET["favorite_color"]) # ... and set a cookie

Multiple URLconfs per app?

2007-07-18 Thread Nathaniel Whiteinge
I'm a little fuzzy on how Django imports additional app URLconfs. I've got two parts of an app that are closely related to one another, however I'd like to give them both root URLs. myproject/urls.py:: urlpatterns = patterns('', (r'^feature1/', include('myproject.apps.myapp.urls')),

Re: Is there any way to custom group models in the admin panel?

2007-07-18 Thread Sebastian Macias
I just opened a ticket for this. http://code.djangoproject.com/ticket/4918 Sebastian Macias On Jul 12, 6:37 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On 7/12/07,SebastianMacias <[EMAIL PROTECTED]> wrote: > > > > > By default models are grouped by app. I really need to be able to

Re: Modifying Model Field Attributes on Run Time

2007-07-18 Thread Malcolm Tredinnick
On Wed, 2007-07-18 at 17:08 +, Sebastian Macias wrote: > Is there anyway to modify model field attributes on run time.. What > I'm trying to do is to build some logic that will decide whether a > model that is related to other model should be edited or not inline in > the admin. > >

Re: Accessing FK sets in model methods

2007-07-18 Thread Ben Ford
This error message is to do with a syntax error... It doesn't have anything to do with django specifically. If you've cut and pasted verbatim, then you need a colon ( : ) at the end of your if > 0 line. This is what python is flagging as an error as far as i can see. Ben On 18/07/07, Ilan

Modifying Model Field Attributes on Run Time

2007-07-18 Thread Sebastian Macias
Is there anyway to modify model field attributes on run time.. What I'm trying to do is to build some logic that will decide whether a model that is related to other model should be edited or not inline in the admin. Basically: "client = models.ForeignKey(Client, unique=True, edit_inline = True,

Cheetah-like comments [was: Re: template preprocessor ?]

2007-07-18 Thread olivier
Thank you James, it's really great to get such answers ! Template loaders is a handy feature, I made my own in minutes. People interested can find it here : http://www.djangosnippets.org/snippets/326/ Cheers, Olivier On 19 juil, 02:03, "James Bennett" <[EMAIL PROTECTED]> wrote: > On

Re: Accessing FK sets in model methods

2007-07-18 Thread Ilan
You're correct I did have a extra space, but the original problem was syntax error on the following line : if self.segment_set.count() > 0 so my question is : can I acess to FK queryset as described in http://www.djangoproject.com/documentation/db-api/#Backward in a model method thanks On 18

How do I know if fastcgi is installed correctly? (using dreamhost)

2007-07-18 Thread walterbyrd
I am trying to follow jeff croft's tutorial for installing django on dreamhost. http://www2.jeffcroft.com/blog/2006/may/11/django-dreamhost/ I am trying to "Install and configure FastCGI" I followed the tutorial, I don't see where I did anything wrong. One part that I don't quite understand:

Re: error accessing /admin/doc/views/

2007-07-18 Thread James Bennett
On 7/18/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I can access other pages in the doc area (ex: /admin/doc/filters/ or / > admin/doc/tags/) but when I try to access the views documentation, I > receive: ...snip... > SyntaxError at /admin/doc/views/ > invalid syntax (views.py, line

Re: MySQL Clustering

2007-07-18 Thread James Bennett
On 7/18/07, Richard Leland <[EMAIL PROTECTED]> wrote: > Trying to set up a connection from Django to a MySQL cluster. I've never > done this before, so any guidance you could provide would be excellent. Though I may be wrong, I was under the impression that the engine only needs to be specified

Re: Bulk data upload

2007-07-18 Thread Jacob Kaplan-Moss
On 7/18/07, Tim Chase <[EMAIL PROTECTED]> wrote: > I dislike CSV because it takes extra overhead to > synchronize the flavors of them (how are quotes quoted? are > values quoted? etc). Psst! Check out Python's built-in ``csv`` module (http://docs.python.org/lib/module-csv.html); it handles all

Re: template preprocessor ?

2007-07-18 Thread James Bennett
On 7/18/07, olivier <[EMAIL PROTECTED]> wrote: > I'm thinking about a very simple processor that would remove lines > beginning by ## (ala mako), because the Django comment syntax is sooo > verbose and tedious to type You'll probably want to implement it as a custom template loader[1];

Re: Problem when inserting into a table with a MySQL auto_increment primary key

2007-07-18 Thread Nis Jørgensen
AnaReis skrev: > Hi all, > I have a problem when inserting a register into this table that I'm > working with. > This table belongs to a MySQL database and the storage engine is > MyISAM. The database that I'm using is a legacy database and I can't > change it in any way. > When I insert a

Re: Bulk data upload

2007-07-18 Thread Toby Dylan Hocking
> What about CSV? You can export from Excel as CSV pretty easily and it's a > fairly easy format to parse in python... Either that or tab-delimited text. I have a django app that does bulk data upload from the admin interface according to the following protocol. 1. Users make their bulk

Re: Picture in admin

2007-07-18 Thread Kai Kuehne
Hi Naco On 7/18/07, Naco <[EMAIL PROTECTED]> wrote: > > Does anybody know how to display thumnails in the admin interface? Maybe this is what you want: http://www.djangosnippets.org/snippets/239/ Greetings Kai --~--~-~--~~~---~--~~ You received this message

Re: sessions - cookies in opera

2007-07-18 Thread Nis Jørgensen
Daniel Kontsek skrev: > Hello > > I have a web application with 2 views. The first view checks if the > session dictionary has a 'uid' key - if not it generates an random ID > and puts it into request.session dict. The second view reads the uid > from the session dict and creates a Project DB

Re: Blog engine

2007-07-18 Thread Kai Kuehne
We don't need such an app (well, I don't need it). If I want it, I write it in 20 minutes. :-) Kai --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Menu implementation

2007-07-18 Thread Carl Karsten
Lic. José M. Rodriguez Bacallao wrote: > Have anybody implemented a tree with django, for example, a menu? > tree = ui or data structurer? (guessing the answer is yes to both) Carl K --~--~-~--~~~---~--~~ You received this message because you are subscribed to

model and cascading

2007-07-18 Thread tyman26
Is it possible to set a property in my model that will set update cascade/delete to true when the tables are generated? I know models automatically do this anyways when you delete or update, but if I am working directly with database information it doesn't work consistently. I know it's

www.cerocom.com

2007-07-18 Thread Natalia
.. www.cerocom.com .. You will be able to ask yourself: Is Internet a good investment for my company? So that an investment would have to do I of this type? Really is going to serve to me to have a Web site? So that to be

Re: Picture in admin

2007-07-18 Thread Nathan Ostgard
Here's something on djangosnippets.org for displaying thumbnails in the admin list: http://www.djangosnippets.org/snippets/239/ Or do you mean on the page for editing a record? Nathan Ostgard On Jul 18, 2:11 pm, Naco <[EMAIL PROTECTED]> wrote: > Does anybody know how to display

MySQL Clustering

2007-07-18 Thread Richard Leland
Trying to set up a connection from Django to a MySQL cluster. I've never done this before, so any guidance you could provide would be excellent. I know that DATABASE_OPTIONS can be used in the settings.py file, just not sure if that's the right course of action or even how to write this into the

Re: Slug (w/o using SlugField) Problems

2007-07-18 Thread Forest Bond
On Wed, Jul 18, 2007 at 07:10:27PM -, John-Scott wrote: > Next, change your urls.py like so: > > (r'^characters/(?P\d+)[-\w]+/$', object_detail, > dict(character_detail_dict)), > > This should capture the '123' and discard '-bob-and-jane'. This is a > fairly elegant solution that allows you

Re: Slug (w/o using SlugField) Problems

2007-07-18 Thread John-Scott
The option I want to implement, and which my be a suitable solution for your situation, is to combine the object id with the slugified version of the object name. Then in your urls.py, only capture the object id and ignore the slug when retrieving the object (this gets you past any issues with

error accessing /admin/doc/views/

2007-07-18 Thread [EMAIL PROTECTED]
I can access other pages in the doc area (ex: /admin/doc/filters/ or / admin/doc/tags/) but when I try to access the views documentation, I receive: """ SyntaxError at /admin/doc/views/ invalid syntax (views.py, line 39) Request Method: GET Request URL:

Re: Problem when inserting into a table with a MySQL auto_increment primary key

2007-07-18 Thread Collin Grady
If there's a problem, it will raise an exception, so you won't just slide past invisibly. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Picture in admin

2007-07-18 Thread Naco
Does anybody know how to display thumnails in the admin interface? --~--~-~--~~~---~--~~ 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

Re: newforms and models unique=True validation

2007-07-18 Thread Nathan Ostgard
You want to create a BaseForm to specify in your form_for_model call. You could do something like: from django import newforms as forms class MyBaseForm(forms.BaseForm): def clean_myfield(self): if MyModel.objects.filter(myfield=self.cleaned_data['myfield']).count(): raise

Re: Slug (w/o using SlugField) Problems

2007-07-18 Thread John-Scott
Hello, I'm using a solution I saw on a RoR blog (http:// blog.hasmanythrough.com/2006/7/7/more-on-naming-and-the-crud has a summary of the technique) which should address the 'reversibility' issue. Basically you just concatenate the object id with the slug of the human readable name, but then

Re: Bulk data upload

2007-07-18 Thread Tim Chase
> left: bulk upload. I've thought of using xls (microsoft > office's excel files) to make it easy on the client, because > teaching them xml or yaml isn't the big deal. After thinking > about it, finding a xls parser module for python might not be > the problem, I second the idea of using a

Re: Menu implementation

2007-07-18 Thread Jonathan Buchanan
On 7/18/07, Lic. José M. Rodriguez Bacallao <[EMAIL PROTECTED]> wrote: > Have anybody implemented a tree with django, for example, a menu? > > -- > Lic. José M. Rodriguez Bacallao > Cupet I've implemented a tree of comments in django-discussion:

Re: Unique=true

2007-07-18 Thread Nis Jørgensen
Nis Jørgensen skrev: > [EMAIL PROTECTED] skrev: > >> OK, fixed the above problem -- figured out that it was related to my >> setting unique=True on a field. But that raises the larger question... >> >> I have a bit of data that may or may not exist... a identifier on the >> user that not all

Re: Accessing FK sets in model methods

2007-07-18 Thread Tim Chase
> Can someone point me to the problem? > > class Base(models.Model): > User = models.CharField(maxlength=200) > Notes = models.CharField(maxlength=200) # free text > > def _first_date(self): >""" Return the first date """ > if self.segment_set.count() > 0 >

Re: Bulk data upload

2007-07-18 Thread Adam Fast
I won't attempt to tackle the image conundrum (because our old ecommerce site is of the single-image variety, which makes it easy). The other, though I can help you with. My models yield four tables (products, product_categories, product_site to tie it to a site, and product_attributes). I

Accessing FK sets in model methods

2007-07-18 Thread Ilan
Hi, My name is Ilan, and I kind of new working with Django. I have a question about model methods. I trying to write a model method which access ForeignKey FOO_set functionality Whoever it does not seems to pass the "syncdb" validation, because of invalid syntax Can someone point me to the

custom order_by?

2007-07-18 Thread Andrey Khavryuchenko
Folks, In spirit of recent question regarding custom 'where'... Is there a way to put a custom ORDER BY into QuerySet? I have an sql function that does all the math on db side and would like to use it at order_by clause I quickly skimmed _get_sql_clause and haven't found any way to

newforms and models unique=True validation

2007-07-18 Thread stereoit
Hi, I have model with field that has attribute unique set to True. I know newforms are not able to handle such a validation as this is DB related. However I read at newforms doc page that it is possible to provide method called clean_() that can do custom validation. My problem is that method is

Re: Bulk data upload

2007-07-18 Thread David Reynolds
On 18 Jul 2007, at 12:00 pm, Chris Hoeppner wrote: Hi there! I've been working on an ecommerce solution. So far everything works like it should. There's just one "nice to have" feature left: bulk upload. I've thought of using xls (microsoft office's excel files) to make it easy on the

Re: Django's User authentication

2007-07-18 Thread Jason F. McBrayer
james_027 <[EMAIL PROTECTED]> writes: > what if I need additional fields or methods for my apps? Do i inherit > it or edit the user class? The standard approach is here: http://www.b-list.org/weblog/2006/06/06/django-tips-extending-user-model However, also have a look at this approach:

Re: ANN: DMigrate - A Django Database Migration Tool

2007-07-18 Thread Noam Raphael
On 7/18/07, Ben Ford <[EMAIL PROTECTED]> wrote: > Just out of interest have you explored using SQLAlchemy directly with the > django model..? I mean mapping the SA Table onto the django Model..? I had a > play with that a while back and it seems a very straightforward way of > achieving SA -

Special Django Presentation at PyAtl

2007-07-18 Thread [EMAIL PROTECTED]
Just an FYI, For all of you folks in the Atlanta Area, we have a special Django Presentation on Aug. 9th at Turner Studios by a leading Django instructor from the Big Nerd Ranch. Please see our meetup event for more details: http://python.meetup.com/46/calendar/5900658/ Thanks, Noah

Special Django Presentation at PyAtl

2007-07-18 Thread [EMAIL PROTECTED]
Just an FYI, For all of you folks in the Atlanta Area, we have a special Django Presentation on Aug. 9th at Turner Studios by a leading Django instructor from the Big Nerd Ranch. Please see our meetup event for more details: http://python.meetup.com/46/calendar/5900658/ Thanks, Noah

Re: ANN: DMigrate - A Django Database Migration Tool

2007-07-18 Thread Ben Ford
Just out of interest have you explored using SQLAlchemy directly with the django model..? I mean mapping the SA Table onto the django Model..? I had a play with that a while back and it seems a very straightforward way of achieving SA - django integration... Ben On 18/07/07, Noam <[EMAIL

edit_inline for a reflexive m2m_intermediary

2007-07-18 Thread Nicola Larosa
I'm following the m2m_intermediary pattern: 9. Many-to-many relationships via an intermediary table http://www.djangoproject.com/documentation/models/m2m_intermediary/ However, I need associations, not between two different models, but between pairs of instances of the *same* model, as

Re: Django's User authentication

2007-07-18 Thread james_027
what if I need additional fields or methods for my apps? Do i inherit it or edit the user class? Thanks james On Jul 18, 3:45 pm, Przemek Gawronski <[EMAIL PROTECTED]> wrote: > > is this use for the django admin features only? or I can use it for my > > own app? if yes, do I make it suitable

Bulk data upload

2007-07-18 Thread Chris Hoeppner
Hi there! I've been working on an ecommerce solution. So far everything works like it should. There's just one "nice to have" feature left: bulk upload. I've thought of using xls (microsoft office's excel files) to make it easy on the client, because teaching them xml or yaml isn't the big deal.

Re: inheriting models' fields, methods and managers

2007-07-18 Thread Malcolm Tredinnick
On Wed, 2007-07-18 at 09:48 +, omat wrote: > Hi all, > > Recently, it occurred to me that, defining some abstract models for > some types of applications would make my code significantly DRYer, by > eliminating duplication of common fields, model methods and manager > methods. > > Examples

inheriting models' fields, methods and managers

2007-07-18 Thread omat
Hi all, Recently, it occurred to me that, defining some abstract models for some types of applications would make my code significantly DRYer, by eliminating duplication of common fields, model methods and manager methods. Examples of common groups of applications are: - Orthogonal

Re: ANN: DMigrate - A Django Database Migration Tool

2007-07-18 Thread Noam
On Jul 18, 4:47 am, "Ben Ford" <[EMAIL PROTECTED]> wrote: > > I haven't looked at the code, but I wonder about the dependency on > > multiple ORMs; the Django ORM cannot expose its own functionality on > > multiple databases at once... > > It can using the multiple-db-support branch (see ticket

Problem when inserting into a table with a MySQL auto_increment primary key

2007-07-18 Thread AnaReis
Hi all, I have a problem when inserting a register into this table that I'm working with. This table belongs to a MySQL database and the storage engine is MyISAM. The database that I'm using is a legacy database and I can't change it in any way. When I insert a register into the table it's MySQL

Re: ANN: DMigrate - A Django Database Migration Tool

2007-07-18 Thread Noam
Thanks for your comment! Relying on another ORM isn't technically necessary, but it seems to me the easiest way - instead of issuing select statements, the generated code looks like this: for s in src.myapp.City.select(): d = dst.myapp.City() d.id = s.id d.name =

Re: MEDIA_URL MEDIA_ROOT problem.

2007-07-18 Thread Dmitriy Sodrianov
Thanks to all for help. With your suggestions and links I've found out how to serve static files with Django. Now everything works just fine! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group.

Re: Blog engine

2007-07-18 Thread Kenneth Gonsalves
On 18-Jul-07, at 11:31 AM, James Bennett wrote: > So I'm not necessarily convinced that there's a great need for a > "standard" Django blog application; it would appease some folks, but I > have a feeling that in the Django world a lot of people really would > be happier, in the long run,

Re: How to select objects referenced by another table ?

2007-07-18 Thread Jonathan Ballet
On 17 juil, 20:29, Tim Chase <[EMAIL PROTECTED]> wrote: > Fortunately, Django's ORM lets you get at the underlying SQL via > a call to .extra() where you can provide your own WHERE clause. > This would look something like > >Article.objects.extra(where=""" > app_article.id in (select

Re: Django's User authentication

2007-07-18 Thread Przemek Gawronski
> is this use for the django admin features only? or I can use it for my > own app? if yes, do I make it suitable for my application? Sure you can, tak a look at: http://www.djangoproject.com/documentation/authentication/#how-to-log-a-user-in Przemek -- AIKIDO TANREN DOJO - Poland - Warsaw

Django's User authentication

2007-07-18 Thread james_027
hi, is this use for the django admin features only? or I can use it for my own app? if yes, do I make it suitable for my application? Thanks james --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: session question

2007-07-18 Thread Russell Keith-Magee
On 7/18/07, james_027 <[EMAIL PROTECTED]> wrote: > > sorry for this stupid question ... does django's session only work > when cookies are enabled? Yes. Yours, Russ Magee %-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: model managers of base classes

2007-07-18 Thread omat
Are you working on a specific application that uses model inheritance, or testing the models I posted in the first message in this thread? Also, previously, you've mentioned something that you will post to another list. I didn't get that either. I was using the model api. The error is:

Re: session question

2007-07-18 Thread Malcolm Tredinnick
On Wed, 2007-07-18 at 06:51 +, james_027 wrote: > hi, > > sorry for this stupid question ... does django's session only work > when cookies are enabled? That is correct. See http://www.djangoproject.com/documentation/sessions/#session-ids-in-urls for the documentation on this. Regards,

Re: Logging in a newly created user

2007-07-18 Thread Jonathan Buchanan
LaundroMat wrote: > Hi, > > When running this, I get a "NoneType has no attribute > is_authenticated()" error, and I cannot understand why: > > 1 new_user = User.objects.create_user(username, "your.email", > password) > 2 new_user.is_active = False > 3 new_user.save() > 4 user =

session question

2007-07-18 Thread james_027
hi, sorry for this stupid question ... does django's session only work when cookies are enabled? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Logging in a newly created user

2007-07-18 Thread LaundroMat
Hi, When running this, I get a "NoneType has no attribute is_authenticated()" error, and I cannot understand why: 1 new_user = User.objects.create_user(username, "your.email", password) 2 new_user.is_active = False 3 new_user.save() 4 user = authenticate(username = new_user.username, password =

Re: Blog engine

2007-07-18 Thread [EMAIL PROTECTED]
I wrote a blogging system for myself that can be had through subversion at this url: http://svn.karmazilla.net/hobby_projects/Djogg I'm still looking for a good place to deploy my own instance, though. I've kinda given up getting it to work in dreamhost. On Jul 18, 8:01 am, "James Bennett"

Re: How can I run syncdb task without loading any initial_data fixtures?

2007-07-18 Thread Manoj Govindan
> > Is this comparison something you have done personally? If so, can you Yes. I wrote the same application in Rails before I moved to Django (I have always liked Python ;)) While the tests themselves are not *identical* there were about the same number of them. > provide any benchmarking

Re: Date Problem

2007-07-18 Thread James Bennett
On 7/18/07, Nash <[EMAIL PROTECTED]> wrote: > I am running django pre-0.97 on a linux box. the date command on linux > and in python datetime.now() both give me the correct times. However, > in one of my models, there is a datetime attribute 'created_on' with > default=datetime.now(). The default

Re: Blog engine

2007-07-18 Thread James Bennett
On 7/18/07, Paulo <[EMAIL PROTECTED]> wrote: > No to mention a good blog app that people can standardize on would be > a nice alternative to Wordpress[1] and Simplelog[2]. Having one would > definitely be helpful in the "spreading the word about Django" > department. I'm not entirely

Using Threadlocals: Error binding parameter 5 - probably unsupported type.

2007-07-18 Thread Michael Lake
Hi all I am using ThreadLocals from http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser I am getting this error on submitting the form: InterfaceError at /erun/10/1/ Error binding parameter 5 - probably unsupported type. This is my model: class Data(models.Model):