Re: How to use selenium test against different browsers using LiveServerTestCase

2013-09-27 Thread Tianyi Wang
Thanks for all your answers. 

On Thursday, 26 September 2013 17:46:43 UTC+1, Tianyi Wang wrote:
>
> Hi guys,
>
> So follow the Django doc example, 
> https://docs.djangoproject.com/en/dev/topics/testing/overview/#django.test.LiveServerTestCase
>
> In the example, the test only test against Firefox. How can I test against 
> different browsers without duplicate the example code?
>
> Thanks
>
> Tianyi
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How to do 2-ModelForm-in-1-CVB right?

2013-09-27 Thread Adam
2013年9月27日金曜日 10時03分09秒 UTC+9 Yu Chen:
>
> Inlineformset may solve your problem, and this 
> http://haineault.com/blog/155/ is a good example.
>
>
In the sample code, CBV has to attached to FormView and has to provide one 
'form_class' member. Another extra form is set by context_data. It is still 
not perfect. For example, consider a dynamic formset with which you can 
create new objects by adding new forms in UI. In this case, it is not easy 
to handle all forms in one view.

/Adam

 

>
> 在 2013年9月26日星期四UTC+8下午1时19分41秒,Adam写道:
>>
>> Hi,
>>
>> I am trying to handle 2 ModelForm in 1 view. Is that possible with CBV 
>> solution? Does any best practise exist?
>>
>> Here is the problem in details.
>>
>> ## models.py
>>
>> class UserProfile(HasJPAddresses, models.Model):
>>
>> user = models.OneToOneField(User)
>> birthdate = models.DateField(default='1900-01-01')
>>
>> ## forms.py
>>
>> class UserProfileUpdateForm(forms.ModelForm):
>> class Meta:
>> model = UserProfile
>>
>> class UserUpdateForm(forms.ModelForm):
>> class Meta:
>> model = User
>> fields = ['first_name', 'last_name']
>>
>> ## views.py
>>
>> class UserProfileUpdateView(FormView): <<< How could I handle two 
>> forms at once in a view? 
>>
>> Thanks,
>> /Adam
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


example for project with user login

2013-09-27 Thread Joachim Wuttke
Could you kindly point me to a code example for a Django project with user 
login?
- Joachim

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Multiple django web applications

2013-09-27 Thread drakko
Hello django gurus!

I wanted to kindly ask if there is a way how to keep two django web 
application on the same server?
I have heard that it might be possible by using virtualenv. But as I'm new 
to python and web development I wanted to find out if what kind of 
approaches there are to achieve this goal.

Thank You!!

drakko 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Multiple django web applications

2013-09-27 Thread Rafael E. Ferrero
I'm not a guru but...
If you want to run two differents django projects with different versions
of django then i think that virtualenv can help you...  are some tutorial
somewhere.
If you want to run two differentes django projects with same version of
django then just use virtual on appache (i do this on my server for two
small projects) or similar stuff for nginx or lighttpd.

Hope to help you



2013/9/27 drakko 

> Hello django gurus!
>
> I wanted to kindly ask if there is a way how to keep two django web
> application on the same server?
> I have heard that it might be possible by using virtualenv. But as I'm new
> to python and web development I wanted to find out if what kind of
> approaches there are to achieve this goal.
>
> Thank You!!
>
> drakko
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Rafael E. Ferrero

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: example for project with user login

2013-09-27 Thread Rafael E. Ferrero
Please, can you be more specific?
Did you mean on Admin Interface? (just activate admin)
In your views? (use decorator)
in your templates? (use request.user.is_authenticated() on a if block)

Are more complex ways to do this by your own or you have apps to do this
like allauth (who give you a way to your visitors to login with facebook
id, or twitter, etc)

hope to help you on this

2013/9/27 Joachim Wuttke 

> Could you kindly point me to a code example for a Django project with user
> login?
> - Joachim
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Rafael E. Ferrero

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Homepage in Django

2013-09-27 Thread Iuri Machado
Hello everyone, I've got a silly question. 

Let's say I've create a project called CAFis. My folder structure should be 
like:

CAFis
  - CAFis
  |  - __init__.py
  |  - settings.py
  |  - urls.py
  |  - wsgi.py

If I want to create a homepage for my project, should I create a views.py, 
inside the subfolder CAFis, with only a function called index and then 
create a templates/static subfolder inside the subfolder CAFis?

(New structure)

CAFis
  - CAFis
  |  - templates
  |  |  - index.html
  |
  |  - static
  |  |  - foo.js
  |  |  - foo.css
  |
  |  - __init__.py
  |  - settings.py
  |  - urls.py
  |  - views.py
  |  - wsgi.py

Thanks in advance!

I.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Homepage in Django

2013-09-27 Thread Rafael E. Ferrero
Thats its one aproach other its to handle directly with your webserver. I
delegate to webserver all static stuff and leave django to handle dinamic
thing.


see ya!


2013/9/27 Iuri Machado 

> Hello everyone, I've got a silly question.
>
> Let's say I've create a project called CAFis. My folder structure should
> be like:
>
> CAFis
>   - CAFis
>   |  - __init__.py
>   |  - settings.py
>   |  - urls.py
>   |  - wsgi.py
>
> If I want to create a homepage for my project, should I create a views.py,
> inside the subfolder CAFis, with only a function called index and then
> create a templates/static subfolder inside the subfolder CAFis?
>
> (New structure)
>
> CAFis
>   - CAFis
>   |  - templates
>   |  |  - index.html
>   |
>   |  - static
>   |  |  - foo.js
>   |  |  - foo.css
>   |
>   |  - __init__.py
>   |  - settings.py
>   |  - urls.py
>   |  - views.py
>   |  - wsgi.py
>
> Thanks in advance!
>
> I.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Rafael E. Ferrero

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Homepage in Django

2013-09-27 Thread Iuri Machado
Thank you buddy! :)

Em sexta-feira, 27 de setembro de 2013 10h02min27s UTC-3, vicherot escreveu:
>
> Thats its one aproach other its to handle directly with your webserver. I 
> delegate to webserver all static stuff and leave django to handle dinamic 
> thing.
>
>
> see ya!
>
>
> 2013/9/27 Iuri Machado >
>
>> Hello everyone, I've got a silly question. 
>>
>> Let's say I've create a project called CAFis. My folder structure should 
>> be like:
>>
>> CAFis
>>   - CAFis
>>   |  - __init__.py
>>   |  - settings.py
>>   |  - urls.py
>>   |  - wsgi.py
>>
>> If I want to create a homepage for my project, should I create a 
>> views.py, inside the subfolder CAFis, with only a function called index and 
>> then create a templates/static subfolder inside the subfolder CAFis?
>>
>> (New structure)
>>
>> CAFis
>>   - CAFis
>>   |  - templates
>>   |  |  - index.html
>>   |
>>   |  - static
>>   |  |  - foo.js
>>   |  |  - foo.css
>>   |
>>   |  - __init__.py
>>   |  - settings.py
>>   |  - urls.py
>>   |  - views.py
>>   |  - wsgi.py
>>
>> Thanks in advance!
>>
>> I.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-users...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com
>> .
>> Visit this group at http://groups.google.com/group/django-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> -- 
> Rafael E. Ferrero
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Multiple django web applications

2013-09-27 Thread Ben Lopatin
drakko, using virtualenv will certainly help in isolating your projects and 
dependencies. You can host both on the same server, how you go about doing 
this will depend in part on your setup. If you're using Apache with 
mod_wsgi I think - if memory serves correctly - that you could just use 
different vhosts. Using gunicorn just run each Django app on a different 
port.

Ben

On Friday, September 27, 2013 4:54:44 AM UTC-4, drakko wrote:
>
> Hello django gurus!
>
> I wanted to kindly ask if there is a way how to keep two django web 
> application on the same server?
> I have heard that it might be possible by using virtualenv. But as I'm new 
> to python and web development I wanted to find out if what kind of 
> approaches there are to achieve this goal.
>
> Thank You!!
>
> drakko 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: example for project with user login

2013-09-27 Thread Joachim Wuttke
With user login to the user views.
I would like to build my application by incrementally modifying a working 
small application
that is just a little more complete than the poll application from the 
basic tutorial.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: example for project with user login

2013-09-27 Thread Rafael E. Ferrero
in settings.py
in TEMPLATE_DIRS put all your templates folders where django go to find them

in MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
 )

in INSTALLED_APPS = (
'django.contrib.auth',  #important to login and logout
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'YourProject.YourApp',
)

and create this
LOGIN_URL = '/url/to/login/'
LOGOUT_URL = '/url/to/logout/'
LOGIN_REDIRECT_URL = '/url/to/your/view'


in your general urls.py

from django.contrib.auth.views import login, logout_then_login
from django.conf.urls.defaults import patterns, url, include
from django.conf import settings

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
(r'^YourApp/', include('YourProject.YourApp.urls')),
(r'^login/$', login, {'template_name': 'login.djhtml'}),
(r'^logout/$', logout_then_login),
# For admin
url(r'^admin/', include(admin.site.urls)),
)

if settings.DEBUG:
urlpatterns += patterns('',
url(r'^media/(?P.*)$', 'django.views.static.serve', {
'document_root': settings.MEDIA_ROOT,
}),
   )



in YourApp/urls.py
from django.conf.urls.defaults import patterns, url

urlpatterns = patterns('YourProject.YourApp.views',
url(r'^$', 'YourViewName'),
)



need a base.djhtml in YourTemplateFolder
in YourTemplateFolder/login.djhtml

{% extends "base.djhtml" %}
{% block cuerpo %}
{% if form.errors %}
   Su nombre de usuario y contraseña no coinciden. Por favor intente
nuevamente.
{% endif %}

{% csrf_token %}
Nombre de Usuario
Clave de Usuario



{% endblock %}




in your YourApp/views.py

from django.contrib.auth.decorators import login_required
from django.template.context import RequestContext

@login_required
def yourViewName(Request):
#your code here
return render_to_response('yourTemplate', {'YourDict': yourDict},
  context_instance=RequestContext(Request))




I think that something like that will work, its copy of a small project
mine in django 1.3.1, its admin somewher ther but you can eliminate. (in
www.fsorgosuardi.com.ar/dj/login its this code running... to see the site
just go to www.fsorgosuardi.com.ar)

you can, later, try with
allauthapp... its really
cool stuff



2013/9/27 Joachim Wuttke 

> With user login to the user views.
> I would like to build my application by incrementally modifying a working
> small application
> that is just a little more complete than the poll application from the
> basic tutorial.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Rafael E. Ferrero

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: example for project with user login

2013-09-27 Thread Jesús Lucas Flores
You can watch my code:

https://github.com/jelukas/django-usuarios-framework/

I am using django-registration with templates.

And django 1.4 .. i have to update the code to django 1.5 but it is the
same idea.



*Jesús Lucas Flores* | *Sysadmin, Web Developer and IT Startups Lover*

 es.linkedin.com/in/jesuslucas



 github.com/jelukas 
 @jelukas89
 Skype: jelukas89




2013/9/27 Rafael E. Ferrero 

> in settings.py
> in TEMPLATE_DIRS put all your templates folders where django go to find
> them
>
> in MIDDLEWARE_CLASSES = (
> 'django.middleware.common.CommonMiddleware',
> 'django.contrib.sessions.middleware.SessionMiddleware',
> 'django.middleware.csrf.CsrfViewMiddleware',
> 'django.contrib.auth.middleware.AuthenticationMiddleware',
> 'django.contrib.messages.middleware.MessageMiddleware',
>  )
>
> in INSTALLED_APPS = (
> 'django.contrib.auth',  #important to login and logout
> 'django.contrib.contenttypes',
> 'django.contrib.sessions',
> 'django.contrib.sites',
> 'django.contrib.messages',
> 'django.contrib.staticfiles',
> 'django.contrib.admin',
> 'YourProject.YourApp',
> )
>
> and create this
> LOGIN_URL = '/url/to/login/'
> LOGOUT_URL = '/url/to/logout/'
> LOGIN_REDIRECT_URL = '/url/to/your/view'
>
>
> in your general urls.py
>
> from django.contrib.auth.views import login, logout_then_login
> from django.conf.urls.defaults import patterns, url, include
> from django.conf import settings
>
> from django.contrib import admin
> admin.autodiscover()
>
> urlpatterns = patterns('',
> (r'^YourApp/', include('YourProject.YourApp.urls')),
> (r'^login/$', login, {'template_name': 'login.djhtml'}),
> (r'^logout/$', logout_then_login),
> # For admin
> url(r'^admin/', include(admin.site.urls)),
> )
>
> if settings.DEBUG:
> urlpatterns += patterns('',
> url(r'^media/(?P.*)$', 'django.views.static.serve', {
> 'document_root': settings.MEDIA_ROOT,
> }),
>)
>
>
>
> in YourApp/urls.py
> from django.conf.urls.defaults import patterns, url
>
> urlpatterns = patterns('YourProject.YourApp.views',
> url(r'^$', 'YourViewName'),
> )
>
>
>
> need a base.djhtml in YourTemplateFolder
> in YourTemplateFolder/login.djhtml
>
> {% extends "base.djhtml" %}
> {% block cuerpo %}
> {% if form.errors %}
>Su nombre de usuario y contraseña no coinciden. Por favor
> intente nuevamente.
> {% endif %}
> 
> {% csrf_token %}
> Nombre de Usuario type="text" name="username" maxlength="30" />
> Clave de Usuario name="password" id="id_password" />
> 
> 
> 
> {% endblock %}
>
>
>
>
> in your YourApp/views.py
>
> from django.contrib.auth.decorators import login_required
> from django.template.context import RequestContext
>
> @login_required
> def yourViewName(Request):
> #your code here
> return render_to_response('yourTemplate', {'YourDict': yourDict},
>   context_instance=RequestContext(Request))
>
>
>
>
> I think that something like that will work, its copy of a small project
> mine in django 1.3.1, its admin somewher ther but you can eliminate. (in
> www.fsorgosuardi.com.ar/dj/login its this code running... to see the site
> just go to www.fsorgosuardi.com.ar)
>
> you can, later, try with 
> allauthapp... its really cool 
> stuff
>
>
>
> 2013/9/27 Joachim Wuttke 
>
>> With user login to the user views.
>> I would like to build my application by incrementally modifying a working
>> small application
>> that is just a little more complete than the poll application from the
>> basic tutorial.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> --
> Rafael E. Ferrero
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an ema

Re: example for project with user login

2013-09-27 Thread Joachim Wuttke
Many thanks, Rafael and Jesús. I will study your suggestions carefully. - 
Joachim

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


new django template

2013-09-27 Thread Frédéric Bouin


I am trying to edit some things in django and am running into a few 
problems as I am quite new to it.

I am working off an existing django configuration with templates that 
currently work, but I don't really understand how to create new templates. 
If I create a new .html file in my templates folder in "myprojects" and 
then declare the new template under cms_templates = (...) in settings.py 
nothing happens. Am I missing a step to get the template to upload and 
appear in my cms?

I also had a problem with an existing template, when I try to go to the 
contact page I am told that the template does not exist: 
http://paul.evansoderberg.com/en/contact/
The template is declared under "cms_templates", the file exists in the 
templates folder, and the page is created in django cms, yet I get this 
error message.

Help would be greatly appreciated, thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Determine gender from first name

2013-09-27 Thread Casper Strømgren
Hey Demetrio

You can use http://genderize.io which is a free API.

A problem with determining a gender from a name is that people can call 
their children almost anything they'd like. Genderize.io tries to solve 
this by collecting data from social networks (where people can also call 
themselves whatever they'd like). Furthermore, it has the ability of 
filtering results by country or language.

It also provides a certainty factor along with the gender. So you can set a 
bar of when you want to trust it.

Den onsdag den 25. januar 2012 09.49.22 UTC+1 skrev Demetrio Girardi:
>
> This is not a django-specific question, but I couldn't find anything
> useful on the subject and have no better place to ask.
>
> Let's say I want to put "welcome {{user.first_name}}" on top of my
> template. In many languages, "welcome" has to be declined by gender. I
> have no use for the user's gender otherwise, so I don't want to ask
> for it in the registration process.
>
> How can I go about this? Is there a publicly available database of
> first names divided by language and gender? A public web-service that
> guesstimates the gender?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


CMS base to start with?

2013-09-27 Thread Anton Melser
Hi,

I'm pretty new to Django/Python and I'm starting a fairly major project 
(hopefully next 2+ years of my life :-)). If all goes well, there will be 
several developers on the project in a year or two - getting our hands 
dirty is what it's all about. Use something I know? PHP/.NET/Java - no 
thanks! It's going to be a long road and I've quickly seen the superiority 
of Python and the ease of development with Django and I'm definitely in for 
the long haul so... 

There is quite a bit of functionality that has been written 50k times 
before and I'd rather not reinvent, like advanced user management (social 
everything yadda yadda), some nice templates to start with (supporting 
bootstrap 3 within the next 2-3 months or so) and dynamic theming, blog, 
article management, easy plugging to search backends, content and user 
rating, unit tests, etc.

Beta versions are fine as long as the latest sexy version will go stable 
within 2-3 months and contributing back is a given, at least while it 
remains viable.

So I've been looking around at what to start with and there is quite a bit 
of choice. Django-CMS, Mezzanine, FeinCMS to name but a few... 

The stuff I refer to above is stuff I would REALLY like to have out of the 
box (ie, it's what we're starting with), for the rest (marketplace, 
mapping, geo-location, kitchen sink, etc.) we just need for it to be easy 
to add new modules which by then I/we should be able to write from scratch 
anyway, if needed. Other stuff we probably don't need at all like 
multi-lang.

I guess the only other particularity is that we are going to need excellent 
caching - we are expecting around 90% of the traffic on 2-3 days and 
serious peaking within that. Going PAAS is not out of the question but if 
we can get away with some advanced caching then I'd rather start with that 
and then if cashflow warrants it re-evaluate the situation later. 

So, should I start with a CMS? If so, which one? What I'm really looking 
for is a base to start with that I don't end up saying "why the #!@& did I 
start with X" in 12 months time...

Any opinions or insults are most welcome!

Thanks,
Anton

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Not able to create an simple application using DB (syncdb error)

2013-09-27 Thread Bill Freeman
Not all that useful unless you un-hide the file extensions.

I'm guessing that there are manage.py scripts in both the upper and lower
blog1 directories.  For recent Djangos, manage.py should only be in the
upper directory. The lower directory contains settings.py, urls.py, wsgo/[u
amd __init__.py.

I see that you are in the lower directory when you try to run it, which is
also wrong.  cd up a level and try again.

Are you working from a book written for an older version of Django, or are
you trying to port an project written for an older version to a modern
Django?  I can't see how you arrive at the directory contents that you have.




On Fri, Sep 27, 2013 at 1:24 PM, s. gulab  wrote:

> Hi,
>
>Please find the attachment.In that i have pasted the screen shot of my
> paths,output and everything.
>
> Thanks & Regards,
> Gulab S
>
>
> On Thursday, 26 September 2013 00:01:21 UTC+5:30, ke1g wrote:
>
>> And where is your settings.py file?  If it is in the same directory as
>> manage.py, and it is a reasonably current Django (1.4, 1.5), then it's in
>> the wrong place.  It belongs in a sub-directory named 'blog1', along with
>> your urls.py, wsgi.py and an empty __init__.py .
>>
>>
>>
>> On Wed, Sep 25, 2013 at 1:40 PM, s. gulab  wrote:
>>
>>> When i give " ./manage.py syncdb " i am getting following error.
>>>
>>> " *Traceback (most recent call last):*
>>> *  File "manage.py", line 10, in *
>>> *execute_from_command_line(sys.argv)*
>>> *  File "c:\Python27\lib\site-packages\django\core\management\__init__.py",
>>> line*
>>> *453, in execute_from_command_line*
>>> *utility.execute()*
>>> *  File "c:\Python27\lib\site-packages\django\core\management\__init__.py",
>>> line*
>>> *392, in execute*
>>> *self.fetch_command(subcommand).run_from_argv(self.argv)*
>>> *  File "c:\Python27\lib\site-packages\django\core\management\__init__.py",
>>> line*
>>> *263, in fetch_command*
>>> *app_name = get_commands()[subcommand]*
>>> *  File "c:\Python27\lib\site-packages\django\core\management\__init__.py",
>>> line*
>>> *109, in get_commands*
>>> *apps = settings.INSTALLED_APPS*
>>> *  File "c:\Python27\lib\site-packages\django\conf\__init__.py", line
>>> 53, in __ge*
>>> *tattr__*
>>> *self._setup(name)*
>>> *  File "c:\Python27\lib\site-packages\django\conf\__init__.py", line
>>> 48, in _set*
>>> *up*
>>> *self._wrapped = Settings(settings_module)*
>>> *  File "c:\Python27\lib\site-packages\django\conf\__init__.py", line
>>> 134, in __i*
>>> *nit__*
>>> *raise ImportError("Could not import settings '%s' (Is it on
>>> sys.path?): %s"*
>>> *% (self.SETTINGS_MODULE, e))*
>>> *ImportError: Could not import settings 'blog1.settings' (Is it on
>>> sys.path?): No*
>>> * module named blog1.settings* "
>>>
>>> manage.py:
>>> 
>>> #!/usr/bin/env python
>>> import os
>>> import sys
>>>
>>> if __name__ == "__main__":
>>> os.environ.setdefault("DJANGO_**SETTINGS_MODULE", "blog1.settings")
>>>
>>> from django.core.management import execute_from_command_line
>>>
>>> execute_from_command_line(sys.**argv)
>>>
>>> settings.py:
>>> 
>>>
>>> # Django settings for blog1 project.
>>>
>>> import os
>>>
>>> DEBUG = True
>>> TEMPLATE_DEBUG = DEBUG
>>>
>>> ADMINS = (
>>> # ('Your Name', 'your_...@example.com'),
>>> )
>>>
>>> MANAGERS = ADMINS
>>>
>>> *DATABASES = {*
>>> *'default': {*
>>> *'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add
>>> 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.*
>>> *'NAME': 'blog1',  # Or path to database
>>> file if using sqlite3.*
>>> *# The following settings are not used with sqlite3:*
>>> *'USER': 'blog',*
>>> *'PASSWORD': 'blog',*
>>> *'HOST': '',  # Empty for localhost through
>>> domain sockets or '127.0.0.1' for localhost through TCP.*
>>> *'PORT': '',  # Set to empty string for
>>> default.*
>>> *}*
>>> *}*
>>>
>>> # Hosts/domain names that are valid for this site; required if DEBUG is
>>> False
>>> # See https://docs.djangoproject.**com/en/1.5/ref/settings/#**
>>> allowed-hosts
>>> ALLOWED_HOSTS = []
>>>
>>> # Local time zone for this installation. Choices can be found here:
>>> # 
>>> http://en.wikipedia.org/wiki/**List_of_tz_zones_by_name
>>> # although not all choices may be available on all operating systems.
>>> # In a Windows environment this must be set to your system time zone.
>>> *TIME_ZONE = 'India/Tamilnadu'*
>>>
>>> # Language code for this installation. All choices can be found here:
>>> # 
>>> http://www.i18nguy.com/**unicode/language-identifiers.**html
>>> LANGUAGE_CODE = 'en-us'
>>>
>>> SITE_ID = 1
>>>
>>> # If you set this to False, Django will make some optimizations so as not
>>> # to load the internationaliza

Re: CMS base to start with?

2013-09-27 Thread Rafael E. Ferrero
Are you try with https://www.djangopackages.com/ ??



2013/9/27 Anton Melser 

> Hi,
>
> I'm pretty new to Django/Python and I'm starting a fairly major project
> (hopefully next 2+ years of my life :-)). If all goes well, there will be
> several developers on the project in a year or two - getting our hands
> dirty is what it's all about. Use something I know? PHP/.NET/Java - no
> thanks! It's going to be a long road and I've quickly seen the superiority
> of Python and the ease of development with Django and I'm definitely in for
> the long haul so...
>
> There is quite a bit of functionality that has been written 50k times
> before and I'd rather not reinvent, like advanced user management (social
> everything yadda yadda), some nice templates to start with (supporting
> bootstrap 3 within the next 2-3 months or so) and dynamic theming, blog,
> article management, easy plugging to search backends, content and user
> rating, unit tests, etc.
>
> Beta versions are fine as long as the latest sexy version will go stable
> within 2-3 months and contributing back is a given, at least while it
> remains viable.
>
> So I've been looking around at what to start with and there is quite a bit
> of choice. Django-CMS, Mezzanine, FeinCMS to name but a few...
>
> The stuff I refer to above is stuff I would REALLY like to have out of the
> box (ie, it's what we're starting with), for the rest (marketplace,
> mapping, geo-location, kitchen sink, etc.) we just need for it to be easy
> to add new modules which by then I/we should be able to write from scratch
> anyway, if needed. Other stuff we probably don't need at all like
> multi-lang.
>
> I guess the only other particularity is that we are going to need
> excellent caching - we are expecting around 90% of the traffic on 2-3 days
> and serious peaking within that. Going PAAS is not out of the question but
> if we can get away with some advanced caching then I'd rather start with
> that and then if cashflow warrants it re-evaluate the situation later.
>
> So, should I start with a CMS? If so, which one? What I'm really looking
> for is a base to start with that I don't end up saying "why the #!@& did I
> start with X" in 12 months time...
>
> Any opinions or insults are most welcome!
>
> Thanks,
> Anton
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Rafael E. Ferrero

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: CMS base to start with?

2013-09-27 Thread Anton Melser


> Are you try with https://www.djangopackages.com/ ??
>

The problem is the amount of choice. There seem to be many great packages 
there but I was hoping someone from the community with more intimate 
knowledge of what is there might be able to shed some light on the subject. 
>From my investigations, Django-CMS, FeinCMS and Mezzanine all have their 
strong points for what I want. I guess there is no "right" choice but there 
might be a "righter" one :-).
Cheers,
A
 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: CMS base to start with?

2013-09-27 Thread Mike Dewhirst

On 28/09/2013 7:37am, Anton Melser wrote:


Are you try with https://www.djangopackages.com/
 ??


The problem is the amount of choice. There seem to be many great
packages there but I was hoping someone from the community with more
intimate knowledge of what is there might be able to shed some light on
the subject. From my investigations, Django-CMS, FeinCMS and Mezzanine
all have their strong points for what I want. I guess there is no
"right" choice but there might be a "righter" one :-).


Might be an idea to write a one page business plan. Amazing how quickly 
it all becomes clear as soon as the business objectives are nailed down. 
After that I would guess only one of those would stand out for you.


Cheers

Mike


Cheers,
A

--
You received this message because you are subscribed to the Google
Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: CMS base to start with?

2013-09-27 Thread Mario Gudelj
Hey Anton,

>From my experience if it's a 2 year project you're building don't use a
CMS. Start with a plain Django project and then add apps you need. All
these CMSs will just lock you in and become more of a hinderance then help.

I also recommend building your own admin before you invest too much time
into customising the default admin.

Cheers,

M


On 28 September 2013 07:37, Anton Melser  wrote:

>
> Are you try with 
> https://www.djangopackages.**com/??
>>
>
> The problem is the amount of choice. There seem to be many great packages
> there but I was hoping someone from the community with more intimate
> knowledge of what is there might be able to shed some light on the subject.
> From my investigations, Django-CMS, FeinCMS and Mezzanine all have their
> strong points for what I want. I guess there is no "right" choice but there
> might be a "righter" one :-).
> Cheers,
> A
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.