Hi, I need help.
I know that in PostgreSQL, there is a type of data as arrays, and
double.
But I was unpleasantly surprised why there is no such models in
django.
The question is how do I get out of this situation?
I need to keep a two-dimensional matrix, and two-dimensional array
would be ideal po
heya,
This is a bit of random musing, but I was wondering, how big a project
is it to write a DB adapter for the Client-side Client-side Database
Storage API in HTML5?
That is, there are already efforts to integrate in things like CouchDB
and MongoDB models, surely using HTML5's client-side Stora
On 7 April 2010 08:45, Victor Hooi wrote:
> heya,
>
> This is a bit of random musing, but I was wondering, how big a project
> is it to write a DB adapter for the Client-side Client-side Database
> Storage API in HTML5?
>
> That is, there are already efforts to integrate in things like CouchDB
> a
Hi
I have a formset and I'm passing initial data:
DeletionFormset = formset_factory(deletionForm, extra=0)
formset = DeletionFormset(initial=make_initial_data(instance))
The initial data arrives to the constructor fine.
When the construct bilds the forms it overrides a ChoiceField with a
On Wed, Apr 7, 2010 at 3:45 PM, Victor Hooi wrote:
> heya,
>
> This is a bit of random musing, but I was wondering, how big a project
> is it to write a DB adapter for the Client-side Client-side Database
> Storage API in HTML5?
>
> That is, there are already efforts to integrate in things like Co
On Apr 6, 7:26 pm, "jani.mono...@gmail.com"
wrote:
> > The generated model from inspectdb is only a best guess, but there's
> > nothing to stop you editing it. If your field really is a foreign key,
>
> Not really a foreign key,both tables have a string field ID which is
> the same,
> and unique i
I want to create a user with a form and i want that user to be able to
submit data, see i'm building a website and it's a gossip site, i need to
let other users log on and insert data such as gossip, news, articles. Im
not sure where to begin, i have a rough idea about the forms but its
actually sa
On Apr 7, 12:13 pm, Nicola Noonan wrote:
> I want to create a user with a form and i want that user to be able to
> submit data, see i'm building a website and it's a gossip site, i need to
> let other users log on and insert data such as gossip, news, articles. Im
> not sure where to begin, i hav
yes i followed that tutorial and can't even get that one working!
On Wed, Apr 7, 2010 at 12:31 PM, Daniel Roseman wrote:
> On Apr 7, 12:13 pm, Nicola Noonan wrote:
> > I want to create a user with a form and i want that user to be able to
> > submit data, see i'm building a website and it's a go
Hi.
There's a simple code in urls.py:
==
def ls (request):
import os
out_html = ''
home_path = '/home/www/test-django'
# subdir_path = request.GET.get ('subdir')
subdir_path = 'public_html'
for root, dirs, files in os.walk (os.path.join (home_path, subdir_path
Hi all,
is it possible to force a specific language (I am talking about real
languages, i18n) while rendering a template?
I have an application which allows the user to choose a language and I
set a default language in the settings. But now I want to render only
one single page forcing a spe
1. Why is this view code in urls.py?
2. What is the value of subdir_path in the trace back? (There's a
little arrow you can click to
see the variable values fro the frame.)
2010/4/7 Alexey Vlasov :
> Hi.
>
> There's a simple code in urls.py:
> ==
> def ls (request):
> import os
Ok, I definitely did this before posting, but deleting all .pyc files
in the django path (again) did fix it this time (as suggested
somewhere). How confusing is pdb to show you a .py source code file,
with no apparent problem, when the mismatch occurred in a .pyc for a
previous and different .py fi
Hi everybody !
I didn't find the answer. I deployed my django project on a webserver
with apache. First, I started with Debug = True and the website
worked fine.
So, I decided to do it with Debug = False. I could see my project but
not my CSS and other medias.
In the httpd.conf I just put the S
thats because you are serving your static media with django on
debug=True but you don't serve it over apache on debug=False
http://docs.djangoproject.com/en/dev/howto/static-files/
http://docs.djangoproject.com/en/dev/howto/deployment/modpython/#serving-media-files
Pep wrote:
> Hi everybody !
>
I had a similar problem when I went from "manage.py runserver" It was because I
had some debugging prints within the code. Could it be that?
/J
On 7 apr 2010, at 17.09, Pep wrote:
> Hi everybody !
>
> I didn't find the answer. I deployed my django project on a webserver
> with apache. First, I
hi Pep:
Do you give permissions to apache to acces to your css directory?
Pep wrote:
Hi everybody !
I didn't find the answer. I deployed my django project on a webserver
with apache. First, I started with Debug = True and the website
worked fine.
So, I decided to do it with Debug = False.
Hello All,
I am new to Django and thinking about migrating to Django from our
existing web environment. I had a couple of questions that I would
like help in answering them. Your insight is greatly appreciated.
Thank you.
1) Considering, there is no support for Multiple Primary keys, how
would D
Thanks for your answers.
Well, it's working now. But I don't understand why. I just add a
LocationMatch with a regular expression (CSS, png, etc.).
But the location still not working :=°
Any idea ?
On 7 avr, 17:36, Nadae Ivar Badio wrote:
> hi Pep:
>
> Do you give permissions to apache to acce
Porting the Django ORM to Javascript would be great, but quite a lot of work.
Go for it!
In the meantime I'm playing around (as noted in Daniels post) using the wrapper
around lawnchair, which in turn stores stuff in the client side database if
present, and to be honest that's enough for me ;)
Hi, I'm not too experienced with django myself so I will let someone else
answer the rest of your questions. But for 2, wouldn't it be fairly simple
to create primary keys for these tables? worst case scenario you just add a
column that is a auto_incremented int and run a script to set it for
exist
Hi,
>> 1) Considering, there is no support for Multiple Primary keys, how
>> would Django react if my tables have multiple primary keys and I tried
>> to update or delete a record? I am just curious.
sorry, I do not know...
>> 2) I read somewhere that each table must have one primary key? Some of
Thank you.
I'll be more specific, here is what I have:
views.py
-
...
if request.method == 'POST':
some_form = SomeForm(data = request.POST, request=request,
instance=somemodel)
...
if some_form.is_valid():
some_form_update = some_form.save(commit=False)
if
I've send this post this morning:
Hi
I have a formset and I'm passing initial data:
DeletionFormset = formset_factory(deletionForm, extra=0)
formset = DeletionFormset(initial=make_initial_data(instance))
The initial data arrives to the constructor fine.
When the construct bilds the forms
Ok, I'm quite new to Python and Django so this might actually have a
simple solution.
I'm coding for a form using Django and I have a ModelChoiceField. Now
what I want to do is make the options for this field customizable. So
if you choose an option, a set of links would be generated allowing
you
Hi,
Thank you for your help everyone. I know that I need to learn python
better, and I did read those articles. What is still a bit unclear to
me, though, is how could I add an "OR" or "AND" separator between Q
objects?
So I have a list of qobjects like [qObj1, qObj2, qObj3].
What I want is so
On Wed, Apr 7, 2010 at 5:39 PM, Daniel wrote:
> Hi,
>
> Thank you for your help everyone. I know that I need to learn python
> better, and I did read those articles. What is still a bit unclear to
> me, though, is how could I add an "OR" or "AND" separator between Q
> objects?
>
> So I have a li
On Wed, Apr 7, 2010 at 5:30 PM, Merrick wrote:
> Thank you.
>
> I'll be more specific, here is what I have:
>
> views.py
> -
> ...
> if request.method == 'POST':
> some_form = SomeForm(data = request.POST, request=request,
> instance=somemodel)
> ...
> if some_form.is_valid():
I appreciate all of the help, I was actually showing both Daniel and
Raj that their suggestions have been tried to no result. To answer
your question, look up at Raj's suggestion. My code before and after
trying the suggestions above, is to have message defined outside of
meta.
Do you have a sugge
Since it's urgent, I'll give an opinion despite not fully understanding your
description of the problem.
If it's going to be so far removed from what the admin app does by
default, I'd go with a custom view outside of the admin, which you
can customize to your heart's content.
That is, when it's
On Wed, Apr 7, 2010 at 2:00 PM, Tom Evans wrote:
> On Wed, Apr 7, 2010 at 5:39 PM, Daniel wrote:
> > Hi,
> >
> > Thank you for your help everyone. I know that I need to learn python
> > better, and I did read those articles. What is still a bit unclear to
> > me, though, is how could I add an
Hi Bill Freeman.
1. I don't know. Actually I'm not really a django-programmer, I'm only
busy with debugging. But IMHO, in this case it doesn't really matter
where the code is, it should work in urls.py too.
2. subdir_path u'http'
On Wed, Apr 07, 2010 at 10:16:52AM -0400, Bill Freeman wrote:
> 1
For responses to 1 and 3.
Is there somewhere I can look? I guess I will have to test these
capabilities along with unique_together to resolve the Multiple PK
issue.
For 2, I will have to add them as suggested.
For 4.
Sorry, I couldn't understand. Can you explain it again. :)
I have a test enviro
On Apr 7, 6:19 pm, Merrick wrote:
> I appreciate all of the help, I was actually showing both Daniel and
> Raj that their suggestions have been tried to no result. To answer
> your question, look up at Raj's suggestion. My code before and after
> trying the suggestions above, is to have message de
The only difference I can see is that
request.GET.get ('subdir')
will return an unicode string, u"public_html", instead of a normal
string, 'public_html'.
If it works with the byte string, try changing the line to
subdir_path = str(request.GET.get('subdir'))
Nuno
2010/4/7 Alexey Vlasov :
> H
Found the problem, thanks again for all of the help.
It turns out you have to define the extra field above def
__init__(self, *args, **kw) as in:
forms.py
class SomeForm(ModelForm):
checkbox = forms.BooleanField(required=False,
widget=forms.CheckboxInput(), label='some label')
Thanks Bill. I'll clarify.
Basically what I want to do is give each option under the choice field
a function. So once the user has selected an option under the drop
down box, that would initiate a script which would generate a set of
links (buttons) at the bottom of the page to take the user to th
Thanks alot guys. If I can be honest, I'm having a little trouble
digesting just this one line:
q = q | f if q else f
That line of code only allows (q1 | q2 | q3), right?
It will not allow mixing "AND" as well as "OR" (i.e., q1 & q2 | q3)?
Thanks!
On Apr 7, 1:26 pm, Vinicius Mendes wrote:
On Apr 7, 9:40 am, Alexey Vlasov wrote:
> Hi.
>
> There's a simple code in urls.py:
> ==
> def ls (request):
> import os
>
> out_html = ''
> home_path = '/home/www/test-django'
> # subdir_path = request.GET.get ('subdir')
> subdir_path = 'public_html'
>
> for ro
I have a logged in user. The user does a search for other uses on the
system. The other users can have various type(s) of privacy set for
their profiles. Privacy levels are Public, Friend, Community (think
Pinax Tribe), and Private.
I want to display a list of the users, and depending on the use
Personally I like 2 best, it seems more flexible in case you later decide to
show different kinds of links or other information (like a note that says
the profile is viewable only to friends, etc.)
On Wed, Apr 7, 2010 at 14:02, mtnpaul wrote:
> I have a logged in user. The user does a search for
If you want to mix AND and OR, you will have to do this manually:
q = (q1 | q2) & q3
__
Vinícius Mendes
Solucione Sistemas
http://solucione.info/
On Wed, Apr 7, 2010 at 3:56 PM, Daniel wrote:
> Thanks alot guys. If I can be honest, I'm having a little trouble
> digesting
On Apr 7, 2010, at 11:45 AM, ojayred wrote:
> Hello All,
>
> I am new to Django and thinking about migrating to Django from our
> existing web environment. I had a couple of questions that I would
> like help in answering them. Your insight is greatly appreciated.
> Thank you.
>
> 1) Consideri
If there is no Django model field for this, then one option would be
to create your own model field (http://docs.djangoproject.com/en/dev/
howto/custom-model-fields/). Of course, it would not be compatible
with most SQL Database types.
Of course, it may be easier to just rethink your data model. W
Following the instruction, my settings.py has
...
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.csrf.middleware.CsrfMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
)
I am following the django tutorial here. I have
followed it step by step. I am using sqlite3 as to not have to set up
a DB. When I get to python manage.py sql polls, it returns "Error: App
with labsl polls could not be found. Are you sure your installed apps
setting is correct?" I have a polls dir
Your poll app is not in INSTALLED_APPS properly.
What does INSTALLED_APPS look like in your settings.py?
What does your directory structure look like, starting with the directory in
which you ran startproject?
Shawn
--
You received this message because you are subscribed to the Google Groups
Well, where are things happening? Do you make a new request for each
click, or do you want the changes to appear without a browser reload?
If the former, the ability to customize seems to imply a model representing
a choice, with a foreign key on the same model, allowing it to specify of
which ch
String concatenate, format, comparison, indexing a dictionary*, all
work with mixed
types, unless the conversion from unicode to byte string can't be done with the
current codec when forced to bytestring, in which case you get a
suitable exception.
Besides, this wouldn't explain why the value of s
Hello colleagues,
I have the models.py:
class User(models.Model):
LastName = models.CharField(max_length=50, verbose_name =
"Фамилия")
FirstName = models.CharField(max_length=50, verbose_name = "Имя")
MidleName = models.CharField(max_length=50, verbose_name =
"Отчество")
class SoldSer
On Apr 7, 4:09 pm, Shawn Milochik wrote:
> Your poll app is not in INSTALLED_APPS properly.
>
> What does INSTALLED_APPS look like in your settings.py?
>
> What does your directory structure look like, starting with the directory in
> which you ran startproject?
>
> Shawn
I have the site insta
No, no.
I need to store the matrix and dual array is ideal for this would come
up.
The problem is that the matrix will grow in size, thousands of entries
only on i, and where that same number of j.
create table is not an option.
only if the matrix transform and drive the table. and my question is,
I have now 2.21 at night, I live in Siberia.
city of Tyumen. so I will read the answers in 6 hours 8 only in the
morning when I wake up.
--
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...@googlegrou
Off of the top of my head that looks correct. Perhaps there's a problem with
your PYTHONPATH.
Try to echo $PYTHONPATH and see what you get. See if anything in your home
directory is in there,
and whether the fact that you have a subdirectory with a name identical to it's
parent directory could
You need one matrix table, having a row for each matrix.
You need one matrix_row table, having a row for each row of any matrix, mostly
containing a foreign key on the matrix table, showing of which matrix the row is
part, plus it's row number in that table.
And you need one matrix_row_values tab
Hi All,
I have a many-to-many relationship of User to Question through Asking.
I want to get Questions that a given User has not asked yet. That
is, Questions where there is no Asking record for a given User. I
have the User's id.
Models look like:
class Question(models.Model):
text = m
I have added /home/crossen/crossen to the python path, and I am still
getting the errors
On Apr 7, 4:26 pm, Shawn Milochik wrote:
> Off of the top of my head that looks correct. Perhaps there's a problem with
> your PYTHONPATH.
>
> Try to echo $PYTHONPATH and see what you get. See if anything in
On Apr 7, 2010, at 4:53 PM, TheNational22 wrote:
> I have added /home/crossen/crossen to the python path, and I am still
> getting the errors
Okay, but do the directories you've added to the path contain __init__.py
files? (zero-byte is fine, they just have to be there)
--
You received this m
Yes /home/crossen/crossen has the init and so does polls
On Apr 7, 4:55 pm, Shawn Milochik wrote:
> On Apr 7, 2010, at 4:53 PM, TheNational22 wrote:
>
> > I have added /home/crossen/crossen to the python path, and I am still
> > getting the errors
>
> Okay, but do the directories you've added to
sorry, that should've read home/kevin/crossen
On Apr 7, 4:57 pm, TheNational22 wrote:
> Yes /home/crossen/crossen has the init and so does polls
>
> On Apr 7, 4:55 pm, Shawn Milochik wrote:
>
>
>
> > On Apr 7, 2010, at 4:53 PM, TheNational22 wrote:
>
> > > I have added /home/crossen/crossen to
Try to do ./manage.py shell and import your poll model.
Once you can do that, you will have figured out the solution to this problem as
a by-product.
I don't expect it to work first try, but it should get you moving in the right
direction.
Shawn
On Apr 7, 2010, at 5:21 PM, TheNational22 wrote
On Apr 6, 11:53 pm, Russell Keith-Magee
wrote:
> On Wed, Apr 7, 2010 at 12:08 PM, Brian Neal wrote:
> > I am on trunk, somewhere around revision 127xx and just updated to
> > 12936. A couple of my views render this one particular template, which
> > used to take less than a second to see a respon
I'm trying to setup a Django based blog for myself and I'd like to do
wordpress like nested catagories.
The model itself is fine and there are some good posts about how to do
such things around (i.e.
http://swixel.net/2009/01/01/django-nested-categories-blogging-like-wordpress-again/)
The thing
> I suppose I could do something like r'^(?P.*)$' and then parse path in
> the view but this could wreak havoc with other URLs.
Yes, that's the way to do it. You can prevent it from clashing with
other URLs by prefixing it with something like categories/ so the URL
would be:
www.example.com/cate
Oh, check out the Category class from django-simplecms. It implements
the first method.
Specifically, check out the save() method that builds the path based
on all the parent categories if it doesn't exist.
http://code.google.com/p/django-simplecms/source/browse/trunk/simplecms/cms/models.py#47
Big thanks for the reply.
I already have a custom save method on the Catagory for slugs so it'll
be easy enough to create a path.
I may not understand the suggested implementation very well but it
sounds like I may not have to do a split at all if I store the
sluggified path then I think all I sh
Thanks again. Just following up with my model to show how I'm
implementing based on the advice above.
Note I call my categories model Topics instead but you get the
picture.
class Topic(models.Model):
'''
Topics form sections and categories of posts to enable topical
based
conversati
how exactly set up the database engine as SQLight? The tutorial
doesn't seem to tell us...
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-us...@googlegroups.com.
To unsubscribe from this grou
I mean the tutorial only tells you "edit settings" but doesn't tell
you how. Excuse me if this is obvious to most of people.
On Apr 7, 11:17 pm, yangyang wrote:
> how exactly set up the database engine as SQLight? The tutorial
> doesn't seem to tell us...
>
> Thanks!
--
You received this messag
I have an ajax request coming in like this
http://localhost:8000/board/getnames?age=31&sex=1
I cannot change it to http://localhost:8000/board/getnames/31/1
1) what would be the url pattern to use in urls.py?
2) what would be view method - def getname(request, age = None, sex =
None):
--
You
I have a field called peopleid. The default admin page displays this
as a dropdown list and shows a green plus sign near it. Instead of
dropdown, I want to use MultipleChoiceField. But if I define this
field. I dont see the plus sign? How can I make it appear near the
ModelMultipleChoiceField?
Her
>> how exactly set up the database engine as SQLight? The tutorial
>> doesn't seem to tell us...
Hi,
if you edit the file "settings.py" in your project directory, all
you need to do is to tell Django that you want to use SQLite3 and
where you want the database (somewhere on your disk, where you
72 matches
Mail list logo