how to deploy django project to lighttpd server

2013-01-04 Thread doniyor
Hi there, 

i am stumbling over this step: i have django project running at my pc 
local, i want to deploy it to server to see it online. I have bought the 
hosting service from djangoeurope.com. they have that one-click django 
installer, it installs the environment with its lighttpd settings. now i 
dont know where to upload my django files and where to set and how to get 
it running,

in the server i have this files which are installed by one-click django 
installer: 
under ~/projectname
*projectname, projectname.pid, projectname.sock, manage.py, RUN*

do i have to upload here? 

thanks a lot for help in advance

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/U8n69IPW0kgJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: virtualenv setup

2013-01-04 Thread Vibhu Rishi
Hi Phil,

What OS are you running on ? for ubuntu, you need to have an extra
parameter while creating the venv like :
$ virtualenv venv --distribute --no-site-packages

After that source the environment and pip install the packages
pip install Django psycopg2 dj-database-url

I would suggest you try the setup first on a blank directory.

Another thing you may want to check is where the manage.py file is . e.g. I
copied over the project that I was working on in a directory called
'website'. the manage.py is inside this directory instead of the root
directory (from where your do source). So, in this case I run the server as
:
$ python website/manage.py runserver

Vibhu

On Sun, Dec 30, 2012 at 10:27 AM, Sam Lai  wrote:

> It looks like you haven't installed Django in your virtualenv. In your
> virtualenv directory, look in lib/python2.x/site-packages and see if there
> is a Django directory in there.
>
> You can also try sourcing your venv, then running Python, and entering in
> the following statement to see if Python can find Django -
>
> import django
>
> If it can't, try the following statements in the Python shell and see if
> your venv's site-packages directory is in the system path -
>
>  import sys
> sys.path
>
> Finally, try the following command in your usual shell and make sure it is
> referring to the right Python executable (it should be referring to the one
> in your venv/bin directory) -
>
> which python
>
>
> On 30 December 2012 09:23, Phil  wrote:
>
>> Hi,
>>
>> Thanks for reply. Yeah I activated the source(terminal has "venv" beside
>> my username). I followed instructions here(so I pip installed django etc
>> after getting virtualenv up and running)...
>>
>> https://devcenter.heroku.com/articles/django#prerequisites
>>
>> If I runserver thats when I get the error. If I runserver without
>> activating source it works fine but that would be using my system wide
>> python. Just need to figure out how to get it to recognise the virtualenv
>> python.
>>
>>
>> On Saturday, December 29, 2012 10:16:45 PM UTC, quinonesvictor wrote:
>>
>>> Hi Phil
>>>
>>> sorry for the question, but, did you activate your virtualenv source?
>>> $ source bin/activate (?)
>>>
>>> Anyway, I'd try to install django via pip once you I have my virtualenv
>>> created and activated.
>>>
>>> Cheers
>>>
>>> On Sat, Dec 29, 2012 at 7:01 PM, Phil  wrote:
>>>
  Hi,

 I have python/django working system wide. But am currently looking into
 using Heroku for a new project so am trying to get virtualenv setup for the
 first time. When I run "django-admin.py startproject whatever" it creates
 the project ok, but then when I run "python manage.py runserver 8080" from
 the project folder I get the following error...

 ImportError: No module named django.core.management

 Is it because at the top of my "manage.py" it is pointing to my system
 wide python(#!/usr/bin/env python) instead of my virtualenv one? If so how
 do I fix this? I tried changing the path at the top of the manage.py file
 but didn't seem to do anything.

 --
 You received this message because you are subscribed to the Google
 Groups "Django users" group.
 To view this discussion on the web visit https://groups.google.com/d/**
 msg/django-users/-/n4-**fu8ioveIJ
 .
 To post to this group, send email to django...@googlegroups.com.
 To unsubscribe from this group, send email to django-users...@**
 googlegroups.com.

 For more options, visit this group at http://groups.google.com/**
 group/django-users?hl=en
 .

>>>
>>>
>>>
>>> --
>>> QuiƱones Victor Manuel
>>> Tel: +54 0362 15 4 880839
>>> Resistencia - 3500
>>> Argentina
>>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/django-users/-/Gb4JYmpcK-0J.
>>
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>  --
> 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
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Simplicity is the ultimate sophistication. - Leonardo da Vinci
Life is really simple, but we insist on making it complicated. - Confucius

-- 
You received this message because you are subscribed to the Google Groups 
"Django 

Re: Get objects sorted by time of last comment

2013-01-04 Thread Vibhu Rishi
Hi Anssi,

Thanks for the comment.

I was thinking that if I have to do the last comment hackery for all the
objects would it also work if I
* add a last_comment_time field to the models I use with comments.
* modify the comment form ( not sure which file to modify, still thinking
it through) to add comment timestamp to the post model data.

then the query could become much simpler in the sense that I only need to
get post objects, and sort by last_comment_time field.

Vibhu

On Wed, Jan 2, 2013 at 8:45 PM, akaariai  wrote:

> On 2 tammi, 08:50, Vibhu Rishi  wrote:
> > Hi All,
> >
> > A very happy new year to you all !
> >
> > I am working on a website I am making as my hobby project. It is to do
> with
> > motorcycle touring.
> >
> > I have done some initial work on it, and incrementally making changes as
> > and when I can.
> >
> > I am trying to figure out the following issue :
> > 1. I have a forum object where people can start threads.
> > 2. the forum object uses the django comments module along with mptt. So
> far
> > so good.
> > 3. Now, I want to show the "latest commented on" posts. But I am not able
> > to figure it out.
> >
> > For reference :http://bikenomads.herokuapp.com/
> >
> > On the box on the right, I want to show the posts based on the last
> comment
> > time. However, all I can do right now is show the last post based on
> > creation time (this is a field for the post object). I am not able to
> > figure out how to sort based on comment time.
> >
> > Solutions :
> > 1. Ideally there should be a way to sort object by comment time using the
> > inbuilt comments module in django. Is this possible ?
> > 2. Alternatively, I will need to update the post model to have another
> > field for 'last_comment_time' and when someone posts a comment, I will
> need
> > to update this field. I would rather not do this as I will need to make
> > sure all the objects using comments will need to have this exact field.
> >
> > What would you suggest ?
>
> The ORM doesn't offer a way to do the query you want. The query will
> be something like this:
> select * from post
>   left join comment on comment.object_id = post.id and
> comment.object_type = 'post'
> and comment.timestamp = (select max(timestamp) from
> comment
>   where object_id = post.id and
> comment.object_type = 'post'
>  )
>  order by comment.timestamp;
> (Assuming unique comment timestamp per post).
>
> There are two underlying problems. First, Django's ORM doesn't
> currently offer any way to generate more than single column equality
> comparison in the JOIN clause. We are working on removing this
> limitation from 1.6 (actually, the underlying limitation is already
> somewhat gone). Second, the SQL needed isn't exactly nice. There are
> multiple ways to write the same SQL, and how they perform differ
> somewhat depending on the used DB and the amount of data.
>
> So, what can you do pre 1.6? One way is to use views and some hackery
> to do what you want.
>
> class LatestComment(models.Model):
> post = models.OneToOneField(Post, primary_key=True,
> on_delete=models.DO_NOTHING, related_name='latest_comment')
> {{ duplicate the columns in comment model here - you don't need
> content type id }}
>
> class Meta:
> managed = False
> db_table = 'latest_post_comment_view'
>
> Then, create a view like this in the DB:
>
> create or replace view "latest_post_comment_view" as (
> select object_id as post_id, ...
>   from comment
>  where object_type = 'post'
>  group by post_id, ...
> having max(timestamp) = timestamp
> );
>
> The SQL above is untested. In any case, you should now be able to do:
>
>
> Post.objects.select_related('latest_comment').order_by('latest_comment__timestamp')
>
> You will need to repeat the above for all the models with comments
>
> Managing the raw SQL needed for the views can be somewhat ugly. The
> last_comment_time field might be easier to implement & maintain. That
> being said I have been using the above technique successfully in
> production systems.
>
> I do wish Django will one day have latest_related() functionality. I
> find I need that often, and as the above shows this isn't easily
> doable currently.
>
>  - Anssi
>
> --
> 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
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Simplicity is the ultimate sophistication. - Leonardo da Vinci
Life is really simple, but we insist on making it complicated. - Confucius

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to 

Re: Django app custom settings testing

2013-01-04 Thread Pedro J. Aramburu
Thanks very much and, yes, that code is what I've found. In your personal
opinion, would you use a setup like that (
http://passingcuriosity.com/2010/default-settings-for-django-applications/)
for default settings? or is it a little bit over the top for small apps?

I think I'll try my approach for testing purposes because I really don't
need diffsettings, only the test suite "compatibility". The other way that
people seem to do it is using getattr(settings, 'SETTING_X', default value)
every time they need the setting but it seems to violate the DRY principle
and then you don't have a centralized place for the settings.

The last thing I can think of is "updating" the approach and caching the
values only when it's not in testing environment, but, how do you tell?
I thought looking for DEBUG=True but then I remembered the testing
environment set it to False to resemble the production environment. And,
lastly, would it be worth the overhead of logic for caching a few settings?

Sorry about being so "dense" with this. It's just that I'm a newbie and
trying to understand the best practices so if I Open Source the app it
won't be a piece of sh... Sorry again, I got carried away.

--
Tres42
Pedro J. Aramburu


On Fri, Jan 4, 2013 at 12:59 PM, nkryptic  wrote:

> The only thing I've seen which handles all the cases you mention is
> http://passingcuriosity.com/2010/default-settings-for-django-applications/. 
> That may also be what you were referring to about seeing something on
> github.
>
> As to your new question, I think that would work, because every time you
> need the value you'd be doing a fresh lookup.  That said, it's not ideal
> because *every time* you need the value you'd be doing a fresh lookup.
>
>
> On Thursday, January 3, 2013 4:10:37 PM UTC-5, Pedro J. Aramburu wrote:
>
>> No, you're not, but, there isn't a way to load or inject the app settings
>> so that diffsettings and other project level things (like testing) can see
>> them? That's my question. I've read something on a github repo but it seems
>> clunky and over-done. My main goal really is to change some settings on the
>> tests so I can test different scenarios.
>>
>> Right now it seems I can do it by manually changing the "constants"
>> importing app.settings, saving the old values, assigning new values and
>> restoring at the end. But, as the settings.py is loaded once, the
>> "validation" is also done once (the ImproperlyConfigured part).
>>
>> Now, my new question: If I do an object Settings or something like that,
>> and set the __getattr__ to "dinamically" get the settings of the project
>> settings and if it's not there default to a setting of the same object,
>> then I should be able to change the settings with
>> "@override_settings(SETTING_A=**True)" or "with
>> self.settings(SETTING_A=True):**".
>>
>> And, for example, on the explicit case of SETTING_B that depends on
>> SETTING_A, I could override it's getter (and setter maybe) so I could raise
>> the exceptions if needed. The thing is, I know __get__ descriptor has
>> "priority" over "__getattr__" but on the same class (or object). If i use
>> the @property decorator I will still have "precedence" over getattr? Since
>> I'm applying it's __get__ descriptor to an object inside.
>>
>> Just want to know if my approach would work. As I see it, it's like lazy
>> loading the settings so if the settings change in the project environment,
>> they should also change in the app. Or something like that is what I'm
>> trying to do.
>>
>> What do you think? What would you do?
>>
>> Thank you.
>>
>> --
>> Tres42
>> Pedro J. Aramburu
>>
>>
>> On Thu, Jan 3, 2013 at 3:37 PM, Bill Freeman  wrote:
>>
>>>  This approach is only useful for modules that import app.settings and
>>> use things that it defines.  It doesn't affect things that import settings
>>> from django.conf .
>>>
>>> Your app can import settings from app, and get your settings.  That's
>>> not going to affect any other app.  If you want to affect what other apps
>>> see, you must either put the settings in the main settings file, or modify
>>> django.conf.settings itself.  This last is fraught with peril, since you
>>> can't reliably control the order in which you modify the settings object
>>> versus when other modules may use its values in a persistent way.
>>>
>>> Or am I missing your point?
>>>
>>> Bill
>>>
>>>
>>> On Thu, Jan 3, 2013 at 12:05 AM, Pedro J. Aramburu <
>>> para...@tres42.com.ar> wrote:
>>>
 Hi, I'm having troubles using the override_settings decorator. The
 thing is I'm writing an app that has it's own settings and I'm doing it
 with the approach of putting a settings.py file on the app folder with
 something like this:

 from django.conf import settings
 from django.core.exceptions import ImproperlyConfigured


 SETTING_A = getattr(settings, 'APP_SETTING_A', False)

 SETTING_B = getattr(settings, 'APP_SETTING_B', False)

FormWizard - Sesssions

2013-01-04 Thread Kristofer

Hello,

I am using FormWizard with SessionWizardView.

The form is working as expected by using the submit or previous buttons, 
but if the user goes to a different link on the site, and then back to 
where the form was, the form starts out fresh.  I have verified with 
Developer Tools that the browser is using the same exact session id as 
it was previously before the form was navigated away from.


Is it possible for FormWizard to continue a form where it was left off 
if the user clicks another link on the site and comes back to the form?


Kris

--
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: [ANNOUNCE] Django 1.5 release candidate available

2013-01-04 Thread Sultan Imanhodjaev
Cool! :) Happy New Year! Trying out RC1


On Sat, Jan 5, 2013 at 1:07 AM, James Bennett  wrote:

> 1.5 is almost here!
>
> Today marks the release candidate, which you can read about on the weblog:
>
> https://www.djangoproject.com/weblog/2013/jan/04/15-rc-1/
>
> Assuming no release-blocking bugs, Django 1.5 will be released next week.
>
> --
> 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
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Kind regards,
Sultan Imanhodjaev
+996 559 06 76 06
PGP 0x4E357296
http://imanhodjaev.com

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



[ANNOUNCE] Django 1.5 release candidate available

2013-01-04 Thread James Bennett
1.5 is almost here!

Today marks the release candidate, which you can read about on the weblog:

https://www.djangoproject.com/weblog/2013/jan/04/15-rc-1/

Assuming no release-blocking bugs, Django 1.5 will be released next week.

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Modelforms and class based views

2013-01-04 Thread Marco A Morales
Hi everyone,

I'm still wraping my head around class based views and I'm trying my first 
project with class based views. I'm having trouble deciding how to write a 
view that will display a two Modelforms, one having a foreign key over the 
other. 

I will need to do the .save(commit=False) part to save my first model and 
then be able to save the model with foreign key.

How would you guys do it? 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/w7ZxMGgKh9oJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



RE: Django installation on Hostgator

2013-01-04 Thread bb6xt
Hi Gjorge,
I haven't used Hostgator but I believe just extracting the required packages 
into project root should work. Here what am proposing:
myproj/
myproj/
django/
django_extensions/
South
This way you simply upload your project to the server along with the 
dependencies. 
dislaimer: I haven't use hostgator and I didn't follow the link in your post.
--ab

--
Sent from my mobile device

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Run Individual doctest in model.py or views.py

2013-01-04 Thread nkryptic
In the example, animals would be the app modules which contains a models.py 
file and/or tests.py.  "classify" would be a function in either models.py 
or tests.py with a doctest string as the comment.

$ ./manage.py test animals.Bear

The above would run the doctest comment on the class Bear in models.py for 
the animals package.

$ ./manage.py test animals.Bear.growl

The above would run the doctest comment of the method "growl" in the class 
Bear in models.py for the animals package.

$ ./manage.py test animals.myfunc

The above would run the doctest comment of the function "myfunc" in 
models.py for the animals package.

You'd specify your doctests as comments on classes, class methods or 
functions in either models.py or tests.py;

class Bear(models.Model):
"""
>>> a = 1
>>> a
1
"""

def growl(self):
"""
>>> a = 1
>>> a
1
"""
pass

def myfunc():
"""
>>> a = 1
>>> a
1
"""
pass

On Thursday, January 3, 2013 3:17:04 PM UTC-5, Bernard Kuehlhorn wrote:
>
> In https://docs.djangoproject.com/en/1.4/topics/testing/ , individual 
> tests can be run. It works well for unit tests in tests.py. It should work 
> for doctest in model.py. I can not understand how to specify a doctest.
>
> $ ./manage.py test animals.classify
>
>
> Thanks,
> ben
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/fUzfj-9UV1kJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django app custom settings testing

2013-01-04 Thread nkryptic
The only thing I've seen which handles all the cases you mention 
is http://passingcuriosity.com/2010/default-settings-for-django-applications/ 
. That may also be what you were referring to about seeing something on 
github.  

As to your new question, I think that would work, because every time you 
need the value you'd be doing a fresh lookup.  That said, it's not ideal 
because *every time* you need the value you'd be doing a fresh lookup.

On Thursday, January 3, 2013 4:10:37 PM UTC-5, Pedro J. Aramburu wrote:
>
> No, you're not, but, there isn't a way to load or inject the app settings 
> so that diffsettings and other project level things (like testing) can see 
> them? That's my question. I've read something on a github repo but it seems 
> clunky and over-done. My main goal really is to change some settings on the 
> tests so I can test different scenarios.
>
> Right now it seems I can do it by manually changing the "constants" 
> importing app.settings, saving the old values, assigning new values and 
> restoring at the end. But, as the settings.py is loaded once, the 
> "validation" is also done once (the ImproperlyConfigured part).
>
> Now, my new question: If I do an object Settings or something like that, 
> and set the __getattr__ to "dinamically" get the settings of the project 
> settings and if it's not there default to a setting of the same object, 
> then I should be able to change the settings with 
> "@override_settings(SETTING_A=True)" or "with 
> self.settings(SETTING_A=True):".
>
> And, for example, on the explicit case of SETTING_B that depends on 
> SETTING_A, I could override it's getter (and setter maybe) so I could raise 
> the exceptions if needed. The thing is, I know __get__ descriptor has 
> "priority" over "__getattr__" but on the same class (or object). If i use 
> the @property decorator I will still have "precedence" over getattr? Since 
> I'm applying it's __get__ descriptor to an object inside.
>
> Just want to know if my approach would work. As I see it, it's like lazy 
> loading the settings so if the settings change in the project environment, 
> they should also change in the app. Or something like that is what I'm 
> trying to do.
>
> What do you think? What would you do?
>
> Thank you.
>
> --
> Tres42
> Pedro J. Aramburu
>
>
> On Thu, Jan 3, 2013 at 3:37 PM, Bill Freeman  > wrote:
>
>> This approach is only useful for modules that import app.settings and use 
>> things that it defines.  It doesn't affect things that import settings from 
>> django.conf .
>>
>> Your app can import settings from app, and get your settings.  That's not 
>> going to affect any other app.  If you want to affect what other apps see, 
>> you must either put the settings in the main settings file, or modify 
>> django.conf.settings itself.  This last is fraught with peril, since you 
>> can't reliably control the order in which you modify the settings object 
>> versus when other modules may use its values in a persistent way.
>>
>> Or am I missing your point?
>>
>> Bill
>>
>>
>> On Thu, Jan 3, 2013 at 12:05 AM, Pedro J. Aramburu 
>> > > wrote:
>>
>>> Hi, I'm having troubles using the override_settings decorator. The thing 
>>> is I'm writing an app that has it's own settings and I'm doing it with the 
>>> approach of putting a settings.py file on the app folder with something 
>>> like this:
>>>
>>> from django.conf import settings
>>> from django.core.exceptions import ImproperlyConfigured
>>>
>>>
>>> SETTING_A = getattr(settings, 'APP_SETTING_A', False)
>>>
>>> SETTING_B = getattr(settings, 'APP_SETTING_B', False)
>>>
>>> if SETTING_A and not SETTING_B:
>>> raise ImproperlyConfigured('"SETTING_A" is set to True but 
>>> "SETTING_B" is missing.')
>>> -
>>> Where SETTING_B should be a tuple that depends on SETTING_A (I know I 
>>> didn't type check yet). Then I use the settings importing app.settings. The 
>>> thing is, I believe, that the settings are loaded once and as they're 
>>> outside the project settings.py, override settings doesn't have any effect.
>>>
>>> What would you recommend?
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Django users" group.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msg/django-users/-/22xrwU84AG8J.
>>> To post to this group, send email to django...@googlegroups.com
>>> .
>>> To unsubscribe from this group, send email to 
>>> django-users...@googlegroups.com .
>>> For more options, visit this group at 
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To post to this group, send email to django...@googlegroups.com
>> .
>> To unsubscribe from this group, send email to 
>> django-users...@googlegroups.com .
>> For more options, visit this group at 
>> 

Re: Apache + mod_wsgi

2013-01-04 Thread Tsolmon Narantsogt
Thanks you.

I did it. :-)

On Fri, Jan 4, 2013 at 10:23 PM, Tsolmon Narantsogt wrote:

> Thanks you its works fine.
>
> But another issue
>
> Django Version:
> 1.3.4Exception Type:
> ImportErrorException Value:
>
> No module named base.urls
>
> base is my app.
> my urls
>
> urlpatterns = patterns('',
> url(r'^$', include('base.urls')),
> .
>
>
>
> On Fri, Jan 4, 2013 at 9:51 PM, Addy Yeow  wrote:
>
>> You may want to define WSGIDaemonProcess inside your VirtualHost, see
>>
>> http://modwsgi.readthedocs.org/en/latest/configuration-directives/WSGIDaemonProcess.html
>>
>> On Fri, Jan 4, 2013 at 9:36 PM, Tsolmon Narantsogt 
>> wrote:
>> > Hello Comrades.
>> > I have a problem when deploying django project.  I installed apache and
>> > mod_wsgi module and django.
>> > And i create virtual host in /etc/apache2/sites-available/mysite
>> >
>> > content:
>> > 
>> > ServerName name
>> > ServerAdmin m...@email.com
>> > DocumentRoot /var/www/mydjangoproject/
>> > 
>> > Order allow,deny
>> > Allow from all
>> > 
>> > WSGIScriptAlias / /var/www/mydjangoproject/mydjangoproject/app.wsgi
>> > 
>> > mydjangoproject - it's my root package name
>> >
>> > and my app.wsgi
>> >
>> > import os, sys
>> >
>> > sys.path.append('/var/www')
>> > sys.path.append('/var/www/mydjangoproject')
>> > os.environ['DJANGO_SETTINGS_MODULE'] = 'mydjangoproject.settings'  #
>> this is
>> > your settings.py file
>> > import django.core.handlers.wsgi
>> > application = django.core.handlers.wsgi.WSGIHandler()
>> >
>> > But i got following error (apache log)
>> >
>> > ImportError: Could not import settings 'mydjangoproject.settings' (Is
>> it on
>> > sys.path?): No module named settings
>> >
>> > Pls send me solution. It's my first time :-)
>> >
>> > Regards.
>> >
>> > --
>> > 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
>> > django-users+unsubscr...@googlegroups.com.
>> > For more options, visit this group at
>> > http://groups.google.com/group/django-users?hl=en.
>>
>> --
>> 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
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Apache + mod_wsgi

2013-01-04 Thread Tsolmon Narantsogt
Thanks you its works fine.

But another issue

Django Version:1.3.4Exception Type:ImportErrorException Value:

No module named base.urls

base is my app.
my urls

urlpatterns = patterns('',
url(r'^$', include('base.urls')),
.



On Fri, Jan 4, 2013 at 9:51 PM, Addy Yeow  wrote:

> You may want to define WSGIDaemonProcess inside your VirtualHost, see
>
> http://modwsgi.readthedocs.org/en/latest/configuration-directives/WSGIDaemonProcess.html
>
> On Fri, Jan 4, 2013 at 9:36 PM, Tsolmon Narantsogt 
> wrote:
> > Hello Comrades.
> > I have a problem when deploying django project.  I installed apache and
> > mod_wsgi module and django.
> > And i create virtual host in /etc/apache2/sites-available/mysite
> >
> > content:
> > 
> > ServerName name
> > ServerAdmin m...@email.com
> > DocumentRoot /var/www/mydjangoproject/
> > 
> > Order allow,deny
> > Allow from all
> > 
> > WSGIScriptAlias / /var/www/mydjangoproject/mydjangoproject/app.wsgi
> > 
> > mydjangoproject - it's my root package name
> >
> > and my app.wsgi
> >
> > import os, sys
> >
> > sys.path.append('/var/www')
> > sys.path.append('/var/www/mydjangoproject')
> > os.environ['DJANGO_SETTINGS_MODULE'] = 'mydjangoproject.settings'  #
> this is
> > your settings.py file
> > import django.core.handlers.wsgi
> > application = django.core.handlers.wsgi.WSGIHandler()
> >
> > But i got following error (apache log)
> >
> > ImportError: Could not import settings 'mydjangoproject.settings' (Is it
> on
> > sys.path?): No module named settings
> >
> > Pls send me solution. It's my first time :-)
> >
> > Regards.
> >
> > --
> > 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
> > django-users+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> > http://groups.google.com/group/django-users?hl=en.
>
> --
> 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
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Changing password on code.djangoproject.com?

2013-01-04 Thread Addy Yeow
https://www.djangoproject.com/accounts/password/change/

On Fri, Jan 4, 2013 at 6:03 PM, Brandon Carl  wrote:
> I can't for the life of me figure out how to change the password for my Trac
> account on code.djangoproject.com.  Could somebody please point me in the
> right direction?
>
> Thanks!
>
> -Brandon
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/45_p1k-S1gUJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Apache + mod_wsgi

2013-01-04 Thread Addy Yeow
You may want to define WSGIDaemonProcess inside your VirtualHost, see
http://modwsgi.readthedocs.org/en/latest/configuration-directives/WSGIDaemonProcess.html

On Fri, Jan 4, 2013 at 9:36 PM, Tsolmon Narantsogt  wrote:
> Hello Comrades.
> I have a problem when deploying django project.  I installed apache and
> mod_wsgi module and django.
> And i create virtual host in /etc/apache2/sites-available/mysite
>
> content:
> 
> ServerName name
> ServerAdmin m...@email.com
> DocumentRoot /var/www/mydjangoproject/
> 
> Order allow,deny
> Allow from all
> 
> WSGIScriptAlias / /var/www/mydjangoproject/mydjangoproject/app.wsgi
> 
> mydjangoproject - it's my root package name
>
> and my app.wsgi
>
> import os, sys
>
> sys.path.append('/var/www')
> sys.path.append('/var/www/mydjangoproject')
> os.environ['DJANGO_SETTINGS_MODULE'] = 'mydjangoproject.settings'  # this is
> your settings.py file
> import django.core.handlers.wsgi
> application = django.core.handlers.wsgi.WSGIHandler()
>
> But i got following error (apache log)
>
> ImportError: Could not import settings 'mydjangoproject.settings' (Is it on
> sys.path?): No module named settings
>
> Pls send me solution. It's my first time :-)
>
> Regards.
>
> --
> 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
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



DjangoCon Europe 2013 Ticket Lottery

2013-01-04 Thread Tomek Paczkowski
Hi!

Organizers of DjangoCon Europe 2013 are having ticket givaway. Details 
here: 
http://blog.djangocircus.com/post/39650571271/win-a-free-ticket-in-lottery

-- 
Tomek

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/y3t-j-0dc_EJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django won't send 500 or 404 emails, but django.core.mail.EmailMessage and django.utils.log.AdminEmailHandler work

2013-01-04 Thread nkryptic
The 404 emails are sent via the mail_managers method, which uses emails 
from the django.conf.settings.MANAGERS setting, as opposed to errors which 
go to the ADMINS.  Double-check what MANAGERS (and ADMINS) is actually set 
to:

$ python manage.py shell
>>> from django.conf import settings
>>> settings.MANAGERS
(('Me', 'm...@example.com'),)
>>> settings.ADMINS
(('Me', 'm...@example.com'),)


On Thursday, January 3, 2013 8:14:54 PM UTC-5, Jan Paricka wrote:
>
> Same problem here.
>
> 1) CommonMiddleware in place
>
> 2) debug = False
>
> 3) SEND_BROKEN_LINK_EMAILS = True
>
> And yet no 404 emails...
>
> Otherwise the app is happily emailing...
>
> Any thoughts?
>
> Thanks
>
> Jan
>
>
> On Friday, June 24, 2011 9:56:23 PM UTC+2, Kyle Gong wrote:
>>
>> For some reason, I can't get my server to send 500 or 404 emails.  I 
>> am set up to send email through gmail, and it is working properly when 
>> I send error emails through a logger set up using 
>> django.utils.log.AdminEmailHandler, and also when I send mail using 
>> django.core.mail.EmailMessage. 
>>
>> I have DEBUG = False and SEND_BROKEN_LINK_EMAILS = True. 
>>
>> The server is a linode running Ubuntu 10.04, Django 1.3 and Python 
>> 2.6.5. 
>>
>> Any idea where I could look to track down the problem?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/JP53pwsFR7MJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Apache + mod_wsgi

2013-01-04 Thread Tsolmon Narantsogt
Hello Comrades.
I have a problem when deploying django project.  I installed apache and
mod_wsgi module and django.
And i create virtual host in /etc/apache2/sites-available/mysite

*content:*

ServerName name
ServerAdmin m...@email.com
DocumentRoot /var/www/mydjangoproject/

Order allow,deny
Allow from all

WSGIScriptAlias / /var/www/mydjangoproject/*mydjangoproject*/app.wsgi

*mydjangoproject - *it's my root package name

and my app.wsgi

import os, sys

sys.path.append('/var/www')
sys.path.append('/var/www/mydjangoproject')
os.environ['DJANGO_SETTINGS_MODULE'] = 'mydjangoproject.settings'  # this
is your settings.py file
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

But i got following error (apache log)

ImportError: Could not import settings 'mydjangoproject.settings' (Is it on
sys.path?): No module named settings

Pls send me solution. It's my first time :-)

Regards.

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Changing password on code.djangoproject.com?

2013-01-04 Thread Brandon Carl
I can't for the life of me figure out how to change the password for my 
Trac account on code.djangoproject.com.  Could somebody please point me in 
the right direction?

Thanks!

-Brandon

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/45_p1k-S1gUJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django admin save error: get_db_prep_value() got an unexpected keyword argument 'connection'

2013-01-04 Thread Tom Evans
On Thu, Jan 3, 2013 at 1:51 PM, Glyn Jackson  wrote:
> I really struggling with my understanding of the following issue and how to
> resolve
>
>
> 
>
>
> When I try and save (using the Django standard admin interface) I get the
> following error...
>
>> TypeError at /admin/web/campaign/dc6eb21f-87fa-462f-88af-416cf6be37f6/
>>
>> get_db_prep_value() got an unexpected keyword argument 'connection'
>
>
> Could someone explain this to me, why and maybe a possible solution? I'm
> assuming it is something to do with my custom HibernateBooleanField field.
>

You don't say whether this used to work, or has stopped working, but
the issue is that your custom field is not compatible with Django 1.4
(It's not compatible with any version above 1.1.x).

The fine documentation explains what this method does and what
signature it should have:

https://docs.djangoproject.com/en/1.4/howto/custom-model-fields/#converting-query-values-to-database-values

get_db_prep_value() is supposed to be used to generate DB specific
customizations of the value. If you do not need DB specific
customizations, don't override get_db_prep_value(), override
get_prep_value().

Cheers

Tom

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Form Wizard: wizard_form.html

2013-01-04 Thread Tundebabzy
Hi, is there any reason why there is no form tag in wizard_form.html so I 
can upload a fix? I tried to use the Form Wizard for the first time today 
and discovered that I never got past the first page after submitting. 
Forensic investigations showed that nothing was getting submitted because 
there was no form tag.

I'm asking because the last change to contrib.formtools' wizard_form.html 
was a year ago and my brain can only comprehend that the missing form tag 
is a bug. 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/7Pxg48_clnoJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django installation on Hostgator

2013-01-04 Thread Gjorge Karakabakov
Thank you all for your answers - I decided to switch the hosting service to 
Webfaction .
They have lots of tutorials and great support.

On Thursday, 3 January 2013 01:32:10 UTC+1, Gjorge Karakabakov wrote:
>
> Hi, I've created a Django project but can't really seem to install it 
> correctly on Hostgator.
>
> I've followed this tutorial: 
> https://docs.google.com/document/pub?id=1jhvixMmTRGYHRbHaYlTHTNrtpziGotQMc0iBO0sTbIo
>  
> and created new project which worked. When I uploaded my own project I got 
> server error - 500.
> I'm presuming it has something to do with the additional apps i'm using:
> endless-pagination, newsletter, sorl.thumbnail, django_extensions
>
> How can install them on the server? I can't really use sudo pip install 
> there I don't have permissions.
>
> Also is there more detailed/easier way of installing django?
>
> Please explain in detail I'm really new at django.
>
> Thanks!
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/rp1sMD9gViwJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.