Hi Buddy,
I am newbie in Django. Recently I try out the Django tutorial from web
with python 2.5.2 and sqlite3
Unfortunately, Django doesn't create sqlite database as the tutorial
stated. And I couldn't find any FAQ on the web.
Could you advise me on this?
Thanks
--~--~-~--~~-
Hi
I installed django-notify. But in that django-notify folder it does
not contain the file notify_user.py. I need this file. Plese send me
the file notify_user.py
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Dj
I'm writing some code that does something like...
1. check url for specific information
2. do some logic based on named group
3. pass results along on request
It is easy for me to do this through urls.py for a single request.
However, i want to perform this for every request.
I am going down th
On Oct 19, 2:23 pm, DjangoRocks wrote:
> Hi all,
> as per the subject: what is the most effective and stable Django set
> up options on a production server?
>
> I am currently on a mod_python, linux, apache set up.
>
> And sometimes, it seems that the server is unstable.
> For example, whenever
2009/10/18 selena
>
> Hello
> hey michael
> I have been experiencing this problem since I installed my brand new
> Ubuntu Karmic with python in version 2.6 The project I am working on
> was working under python2.5 in my old Gentoo and still works (at least
> the python manage.py syncdb command do
ok thanks! i got it up and running.
On Oct 19, 2:51 am, Михаил Лукин wrote:
> http://docs.djangoproject.com/en/dev/howto/deployment/
> Choose your deployment method and you'll find the answer
>
> 2009/10/18 DjangoRocks
>
>
>
>
>
> > hi, how do i put the project's path in my server pyhton path ?
Hi all,
as per the subject: what is the most effective and stable Django set
up options on a production server?
I am currently on a mod_python, linux, apache set up.
And sometimes, it seems that the server is unstable.
For example, whenever i try to submit a form ( uploading images ),
there are
Hello
hey michael
I have been experiencing this problem since I installed my brand new
Ubuntu Karmic with python in version 2.6 The project I am working on
was working under python2.5 in my old Gentoo and still works (at least
the python manage.py syncdb command does) on a server which is also
run
HI,
=>> I tend to start with the models first and when I add a field, I
just use alter
>> to update the table in place. This has a gotcha with NOT NULL though, if you
>> don't specify a default you'll end up with an error. To bypass this error, I
>> usually don't add the NOT NULL constraint till
Greetings,
I'm installing Django on a Centos 5.3 system, running under mod_wsgi
on Apache, using Django 1.1.1. In a very basic install, when I
attempt to access the /admin/ URL, I get the above error... but the
templates are there:
thebu...@blog templates]$ ls /opt/python2.6/lib/python2.6
Thanks. I didn't realize that "forloop" really meant forloop. I
thought it meant the name of my loop!
On Oct 18, 4:39 am, Daniel Roseman wrote:
> On Oct 18, 3:11 am, jeffself wrote:
>
>
>
> > I've got a view that returns a generic list. It contains the following
> > fields:
> > school, wins, lo
>
> > Is there any downside to starting with the models first?
>
> The biggest one is that if you decide later to add a field to the model that
> isn't there and you've filled in some data to the db.
I agree 100%. On this project (and some I've worked on before) I know
I'll be adding fields as it
On Sunday 18 October 2009 13:57:58 Shakefu wrote:
> > > a first working implementation of my models (remember you can test
> > > your models from the interactive shell and/or python scripts).
> >
> > Or write unit tests, which are more suited for testing than loose
> > bunch of scripts
>
> Well, I
>
> > a first working implementation of my models (remember you can test
> > your models from the interactive shell and/or python scripts).
>
> Or write unit tests, which are more suited for testing than loose
> bunch of scripts
>
Well, I certainly have noticed that a lot of guides/tutorials/snipp
On 18 oct, 17:04, Tomasz Zieliński
wrote:
> On 18 Paź, 15:48, bruno desthuilliers
> wrote:
>
> > a first working implementation of my models (remember you can test
> > your models from the interactive shell and/or python scripts).
>
> Or write unit tests, which are more suited for testing than
Thanks, Mihail! Sometimes I don't know where to look for what I need,
but the docs are indeed stellar!
On Oct 18, 8:24 pm, Михаил Лукин wrote:
> http://docs.djangoproject.com/en/dev/ref/models/options/#unique-together
> why don't you like to read docs first. Django docs are amazing!
>
> 2009/10/
Sorry, didn't look at condition well...:(
So, you see the source and you see that there's no way to get all the
records with this view.
Why don't you use list_detail.object_list view? If you need just to order
list by date, you can use ordering on the model level:
http://docs.djangoproject.com/en/
Good point Jani, thanks. I've forget to raw sql support in Django.
Jani Tiainen napsal(a):
> Tomas Pelka kirjoitti:
>> Hi gang,
>> I know that Django do not support stored procedures/function, but is
>> here still a chance to handle this stuff in Django?
>>
>> I found this http://www.djangosnippe
Would it? If "latest=None" doesn't it mean that there are no entries?
By the way, if I pass None to the condition, it returns False, so
latest is None.
Or isn't it?
Also the template cannot render it, cause "object of type 'NoneType'
has no len()".
Anyways, thanks for reply :)
On Oct 18, 11
Look at date_based.py:
if date_list and num_latest:
latest = queryset.order_by('-'+date_field)[:num_latest]
else:
latest = None
So, if you use num_latest=None, you will always get the whole list.
On Aug 30, 2:47 pm, tezro wrote:
> Anyone?
>
> On Aug 14, 8:29 am, tezro
http://docs.djangoproject.com/en/dev/howto/deployment/
Choose your deployment method and you'll find the answer
2009/10/18 DjangoRocks
>
> hi, how do i put the project's path in my server pyhton path ?
>
> On Oct 19, 2:36 am, Михаил Лукин wrote:
> > Seems that you didn't put your project's path
hi, how do i put the project's path in my server pyhton path ?
On Oct 19, 2:36 am, Михаил Лукин wrote:
> Seems that you didn't put your project's path in your server python path.
>
> 2009/10/18 DjangoRocks
>
>
>
>
>
> > Hi yes, i restarted apache after uploading my files.
>
> > Just in case, he
hi, how do i put the project's path in my server pyhton path ?
On Oct 19, 2:36 am, Михаил Лукин wrote:
> Seems that you didn't put your project's path in your server python path.
>
> 2009/10/18 DjangoRocks
>
>
>
>
>
> > Hi yes, i restarted apache after uploading my files.
>
> > Just in case, he
Seems that you didn't put your project's path in your server python path.
2009/10/18 DjangoRocks
>
> Hi yes, i restarted apache after uploading my files.
>
> Just in case, here is the error message i received:
> ViewDoesNotExist at /user/eugene/
>
> Could not import crud.views. Error was: No mod
I've create another project and app on the production server directly
and i received the same problem.
ViewDoesNotExist at /hello/
Could not import testapp.views. Error was: No module named
testapp.views
Request Method: GET
Request URL:http://140.119.19.139/hello/
Exception Type:
http://docs.djangoproject.com/en/dev/ref/models/options/#unique-together
why don't you like to read docs first. Django docs are amazing!
2009/10/18 Guillermo
>
> Ok I've done the following:
>
> def save(self):
>r = TargetMessage.objects.filter(src_fk=self.src_fk,
>
Hi yes, i restarted apache after uploading my files.
Just in case, here is the error message i received:
ViewDoesNotExist at /user/eugene/
Could not import crud.views. Error was: No module named crud.views
Request Method: GET
Request URL:http://140.119.19.139/user/eugene/
Exception
Ok I've done the following:
def save(self):
r = TargetMessage.objects.filter(src_fk=self.src_fk,
lang_fk=self.lang_fk)
if not r:
super(TargetMessage, self).save()
How can I propagate a validation error to the admin interface
Look at how list of permissions is filtered in admin interface when
adding/editind user. You may use such javascript in your form for dynamic
filtering.
2009/10/17 Oleg Oltar
> I would really want to add some sort of filtering to that
> http://img.skitch.com/20091017-mfs2mbhbuudk2rgquium1bu61d.p
Hi all,
I want my records to be unique for field A and B together, so that no
two records can share the same values for those particular fields. How
can this be declared in the model?
Regards,
Guillermo
--~--~-~--~~~---~--~~
You received this message because you a
On Oct 18, 6:54 pm, DjangoRocks wrote:
> Hi all,
> The environment i am using to set up my django project/app on a
> production server is as follows:
> Ubuntu 9.04, Django 1.02, Python version 2.6.2.
>
> Mysql, mysqldb, apache2 and php is all set up and good to go.
>
> I have followed the tutoria
My application was working alright on my development computer by the
way.
Best.
On Oct 19, 1:54 am, DjangoRocks wrote:
> Hi all,
> The environment i am using to set up my django project/app on a
> production server is as follows:
> Ubuntu 9.04, Django 1.02, Python version 2.6.2.
>
> Mysql, mysq
Hi all,
The environment i am using to set up my django project/app on a
production server is as follows:
Ubuntu 9.04, Django 1.02, Python version 2.6.2.
Mysql, mysqldb, apache2 and php is all set up and good to go.
I have followed the tutorial at
http://jeffbaier.com/articles/installing-django-
> I made the change but now the following error appears:
> 'QueryDict' object is not callable
Whops. request.GET is a query dict, so it's of course not callable. I
ment to call get('user_text', '') on the request.GET:
request.GET.get('user_text', '')
--mp
--~--~-~--~~-
I made the change but now the following error appears:
'QueryDict' object is not callable
On Oct 18, 6:43 pm, "Michael P. Jung" wrote:
> First of all may I recommend you to use Django forms:
>
> http://docs.djangoproject.com/en/dev/topics/forms/
>
> > With this method i have the following erro
Hi,
This is my first django app and I can't seem to get filter_horizontal to
work correctly. I've seen other people asking about this but I don't see any
answers in an hour of searching. Can anybody give me some insight into what
I'm doing wrong? Right now when I use Admin to create a doc
I did not realize that was the case with the xUnit APIs. Thank you so
much for your help.
On Oct 18, 9:47 am, Russell Keith-Magee
wrote:
> On Sun, Oct 18, 2009 at 11:49 AM, Jeff wrote:
>
> > Hi,
>
> > I'm fairly new to Django and unittest and I seem to be having a
> > problem getting manage.py
First of all may I recommend you to use Django forms:
http://docs.djangoproject.com/en/dev/topics/forms/
> With this method i have the following error:
> Key 'user_text' not found in
>> def view(request):
>> user_text = request.GET['user_text']
>> return render_to_reponse("html",
With this method i have the following error:
Key 'user_text' not found in
What should i change or add to my code?
On Oct 18, 5:40 pm, Rama Vadakattu wrote:
> Simple Capture the form variable and send it to another template
>
> def view(request):
> user_text = request.GET['user_text']
>
On 18 Paź, 15:48, bruno desthuilliers
wrote:
>
> a first working implementation of my models (remember you can test
> your models from the interactive shell and/or python scripts).
Or write unit tests, which are more suited for testing than loose
bunch of scripts
--
Tomasz Zielinski,
http://py
Overriding save() is the best place to put that logic and it should
work well with the admin also
(other way is by means of signals)
On Oct 18, 3:45 pm, Tomasz Zieliński
wrote:
> Maybe you can use something like this:
>
> http://stackoverflow.com/questions/1346765/unique-constraint-that-all...
>
Simple Capture the form variable and send it to another template
def view(request):
user_text = request.GET['user_text']
return render_to_reponse("html",{'user_text':user_text})
--rama
On Oct 18, 7:26 pm, A_Swtos wrote:
> I have a form like this:
>
>
> Text:
> maxlength="20"
I have a form like this:
Text:
The user can type into the form whatever wants.If i press the button
'submit' i want to go to a page where it appears what i wrote before.
Is this possible without saving it into a database?
What is the code that you propose?
Im new in django and i would l
On 18 oct, 06:55, Shakefu wrote:
> So my questions are simple:
>
> What are your opinions on the best methodologies and practices for
> developing django apps and projects?
>
> What sort of planning do you do for an application or project?
>
> What development techniques do you use to help conc
On Sun, Oct 18, 2009 at 11:49 AM, Jeff wrote:
>
> Hi,
>
> I'm fairly new to Django and unittest and I seem to be having a
> problem getting manage.py to execute all of my tests. I can only get
> it to execute one test at a time by specifying the test method. When I
> just specify the TestCase cla
On 17 oct, 21:00, Oleg Oltar wrote:
> I tried to do it. It works really nice.
>
> I wonder how can I query all articles related to the current one in a
> view... Need some examples.
others = current_article.related.all() # or any queryset method
> Also currently I see all articles in a listbo
In application `tasks` there is model `Employee` which is subclass of
django.contrib.auth.models.User. I can `dumpdata tasks`, but when I try to
dump whole project or `auth` application, I get this:
django.contrib.auth.models.DoesNotExist: User matching query does not exist.
>
I checked twice if
These might be helpful
http://code.djangoproject.com/wiki/DynamicModels
http://www.djangosnippets.org/snippets/442/
Mohammad Tayseer
http://spellcoder.com/blogs/tayseer
From: Savy
To: Django users
Sent: Friday, October 16, 2009 11:09:16 PM
Subject: Django
Ah, thanks for the input. In this case I'm just developing an app for
my own gratification.
Unfortunately, I have rough idea as to what I'd like it to do
eventually, but since the details aren't set in stone or even pencil
I'm looking for some ideas to get started.
Plus it never hurts to learn a
Ah, thanks for the input. In this case I'm just developing an app for
my own gratification.
Unfortunately, I have rough idea as to what I'd like it to do
eventually, but since the details aren't set in stone or even pencil
I'm looking for some ideas to get started.
Plus it never hurts to learn a
I don't remember how I installed it (mysqldb or python-mysqldb),
but assuming that this is the correct module, then it's possible
that it's for different Python version that you are actually using.
For example, default Python for Ubuntu 8 is, iirc, 2.5.2,
while you might be using 2.4 or 2.6 for y
Maybe you can use something like this:
http://stackoverflow.com/questions/1346765/unique-constraint-that-allows-empty-values-in-mysql
This would probably mean converting is_master to:
is_master = models.BooleanField(null=True, blank=True, unique=True)
- and possibly overriding save to convert
There is also second issue to consider - single database
is a potential security threat (one customer might be able to access
data of second customer if you have a bug in your code).
--
Tomasz Zielinski,
http://pyconsultant.eu
--~--~-~--~~~---~--~~
You received t
It surely depends on your input. If you have detailed specification
of user interface, then writing URLconfs is probably more or less no-
brainer,
and also the design can often be quite obvious.
On the other hand, if you're starting in 'fluid' environment
and project doesn't have a direction, the
Hi all,
I have run the command "sudo apt-get install python-mysqldb"
successfully, but when I run the command "python manage.py shell" it
said something like "No module named MySQLdb". Can anyone of you help
me solving this? Thank you for your consideration!
BR,
LQD.
--~--~-~--~~---
Hi Gezim,
On Sun, Oct 18, 2009 at 7:58 AM, Gezim Hoxha wrote:
> I also added "friends" to the INSTALLED_APPS.
> That all went fine. However running syncdb gave me this error:
Is friends django application or your custom application? looks like
you got the path in the installed_apps wrong can yo
Hi all,
Let's say I have a model like so:
class Thing(models.Model):
is_master = models.BooleanField()
name = models.CharField()
Now I want to be sure that only one Thing is_master at any given time.
The rest of the Things must not be master and end users shouldn't be
able to make a sen
Thanks a lot for your help!
In case someone is struggling with the same here is a link how to
handle custom context processors:
http://stackoverflow.com/questions/433162/can-i-access-constants-in-settings-py-from-templates-in-django
--~--~-~--~~~---~--~~
You receiv
On Oct 18, 3:11 am, jeffself wrote:
> I've got a view that returns a generic list. It contains the following
> fields:
> school, wins, losses, pf, pa, rating
>
> I want to add a field called rank that assigns the values 1 through
> whatever for each of the records returned. Is this possible using
Savy kirjoitti:
>
>
> Hi Djangonauts,
>
> I am developing a Django project (with a few pluggable apps).
>
> I want to offer this project as a SaaS (something like 37signals.com).
>
> i.e: customer1.product1.com , customer2.product2.com etc
>
> product1 could be the basecamp product2 could b
Tomas Pelka kirjoitti:
> Hi gang,
> I know that Django do not support stored procedures/function, but is
> here still a chance to handle this stuff in Django?
>
> I found this http://www.djangosnippets.org/snippets/272/, have somebody
> experience with this?
>
> Thanks for advices,
> cheers Tom.
61 matches
Mail list logo