How to create screen capture of website

2013-06-16 Thread codingdaddy
Hi,

I am sorry if this is the wrong place to ask this question.
But basically, I would like to create social bookmarking site in Django.

That is why I have this question "How do I create a png image of a website 
given url".

Would anyone give me a pointer as to how I can do this?
Thanks for your time in advance.

codingdaddy

-- 
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.




Django 1.4 tutorial part 1 seems broken at the superuser creation stage.

2013-06-16 Thread Ed
Hello Dear Django Group.

My first day with Django, I just got it installed on my computer, and am 
trying to follow along with the first 
tutorial: https://docs.djangoproject.com/en/1.4/intro/tutorial01/

I have Django's development server up, and I'm able to see the "It worked!" 
Django welcome page. Where I ran into the dead end is at the following 
section:

"The 
syncdb
 command looks at the 
INSTALLED_APPS
 setting and creates any necessary database tables according to the 
database settings in your settings.py file. You’ll see a message for each 
database table it creates, and you’ll get a prompt asking you if you’d like 
to create a superuser account for the authentication system. Go ahead and 
do that."

Up to this point, I've followed the tutorial line by line. However, after I 
ran the command "python manage.py syncdb", I got the error message below, 
and it seems to be an internal error to Django. Has anyone else encountered 
this issue, and how did you resolve it? Any feedback or insight is 
appreciated. Thank you!


$ python manage.py syncdb   
   
Creating tables ...
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_user_permissions
Creating table auth_user_groups
Creating table auth_user
Creating table django_content_type
Creating table django_session
Creating table django_site

You just installed Django's auth system, which means you don't have any 
superusers defined.
Would you like to create one now? (yes/no): yes
Traceback (most recent call last):
  File "manage.py", line 10, in 
execute_from_command_line(sys.argv)
  File 
"/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", 
line 443, in execute_from_command_line
utility.execute()
  File 
"/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", 
line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File 
"/usr/local/lib/python2.7/site-packages/django/core/management/base.py", 
line 196, in run_from_argv
self.execute(*args, **options.__dict__)
  File 
"/usr/local/lib/python2.7/site-packages/django/core/management/base.py", 
line 232, in execute
output = self.handle(*args, **options)
  File 
"/usr/local/lib/python2.7/site-packages/django/core/management/base.py", 
line 371, in handle
return self.handle_noargs(**options)
  File 
"/usr/local/lib/python2.7/site-packages/django/core/management/commands/syncdb.py",
 
line 110, in handle_noargs
emit_post_sync_signal(created_models, verbosity, interactive, db)
  File 
"/usr/local/lib/python2.7/site-packages/django/core/management/sql.py", 
line 189, in emit_post_sync_signal
interactive=interactive, db=db)
  File 
"/usr/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py", 
line 172, in send
response = receiver(signal=self, sender=sender, **named)
  File 
"/usr/local/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py",
 
line 73, in create_superuser
call_command("createsuperuser", interactive=True, database=db)
  File 
"/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", 
line 150, in call_command
return klass.execute(*args, **defaults)
  File 
"/usr/local/lib/python2.7/site-packages/django/core/management/base.py", 
line 232, in execute
output = self.handle(*args, **options)
  File 
"/usr/local/lib/python2.7/site-packages/django/contrib/auth/management/commands/createsuperuser.py",
 
line 70, in handle
default_username = get_default_username()
  File 
"/usr/local/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py",
 
line 105, in get_default_username
default_username = get_system_username()
  File 
"/usr/local/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py",
 
line 85, in get_system_username
return getpass.getuser().decode(locale.getdefaultlocale()[1])
TypeError: decode() argument 1 must be string, not None
$ 



-- 
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.




Simple Static Content Site on Heroku?

2013-06-16 Thread Vincent Fulco
Fairly new to the framework and have been reading a ton of material.  

While I have found a couple of great git repos using Bootstrap with Django, 
I haven't found too many examples of dead simple sites other than some 
single page blogs.  I am working on an informational site with at most 5 
pages and potentially a blog down the road for a customer (thinking S3, 
compressor, boto, etc. usage within).  

Do I even need to incorporate the PostgreSQL RDBMS at this juncture or 
should I set it up for future proofing purposes?  Django is most likely too 
feature packed for such a rudimentary project, yet using it is fulfilling a 
secondary role of giving me a learning stepping stone to a few more 
projects with greater complexity.  So I am not looking for other tools to 
use, just some mention of what I can safely do at this point (elimination 
wise) and still have a robust, well designed, responsive offering.

TIA, V.   

-- 
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: Django 1.4 tutorial part 1 seems broken at the superuser creation stage.

2013-06-16 Thread gilberto dos santos alves
please see your locale environment var. what is your os (linux, windows, 
mac) please post your files. how you installed your django?

Em domingo, 16 de junho de 2013 04h06min32s UTC-3, Ed escreveu:
>
> Hello Dear Django Group.
>
> My first day with Django, I just got it installed on my computer, and am 
> trying to follow along with the first tutorial: 
> https://docs.djangoproject.com/en/1.4/intro/tutorial01/
>
> I have Django's development server up, and I'm able to see the "It 
> worked!" Django welcome page. Where I ran into the dead end is at the 
> following section:
>
> "The 
> syncdb
>  command looks at the 
> INSTALLED_APPS
>  setting and creates any necessary database tables according to the 
> database settings in your settings.py file. You’ll see a message for each 
> database table it creates, and you’ll get a prompt asking you if you’d like 
> to create a superuser account for the authentication system. Go ahead and 
> do that."
>
> Up to this point, I've followed the tutorial line by line. However, after 
> I ran the command "python manage.py syncdb", I got the error message below, 
> and it seems to be an internal error to Django. Has anyone else encountered 
> this issue, and how did you resolve it? Any feedback or insight is 
> appreciated. Thank you!
>
>
> $ python manage.py syncdb 
>  
> Creating tables ...
> Creating table auth_permission
> Creating table auth_group_permissions
> Creating table auth_group
> Creating table auth_user_user_permissions
> Creating table auth_user_groups
> Creating table auth_user
> Creating table django_content_type
> Creating table django_session
> Creating table django_site
>
> You just installed Django's auth system, which means you don't have any 
> superusers defined.
> Would you like to create one now? (yes/no): yes
> Traceback (most recent call last):
>   File "manage.py", line 10, in 
> execute_from_command_line(sys.argv)
>   File 
> "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", 
> line 443, in execute_from_command_line
> utility.execute()
>   File 
> "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", 
> line 382, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File 
> "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", 
> line 196, in run_from_argv
> self.execute(*args, **options.__dict__)
>   File 
> "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", 
> line 232, in execute
> output = self.handle(*args, **options)
>   File 
> "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", 
> line 371, in handle
> return self.handle_noargs(**options)
>   File 
> "/usr/local/lib/python2.7/site-packages/django/core/management/commands/syncdb.py",
>  
> line 110, in handle_noargs
> emit_post_sync_signal(created_models, verbosity, interactive, db)
>   File 
> "/usr/local/lib/python2.7/site-packages/django/core/management/sql.py", 
> line 189, in emit_post_sync_signal
> interactive=interactive, db=db)
>   File 
> "/usr/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py", 
> line 172, in send
> response = receiver(signal=self, sender=sender, **named)
>   File 
> "/usr/local/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py",
>  
> line 73, in create_superuser
> call_command("createsuperuser", interactive=True, database=db)
>   File 
> "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", 
> line 150, in call_command
> return klass.execute(*args, **defaults)
>   File 
> "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", 
> line 232, in execute
> output = self.handle(*args, **options)
>   File 
> "/usr/local/lib/python2.7/site-packages/django/contrib/auth/management/commands/createsuperuser.py",
>  
> line 70, in handle
> default_username = get_default_username()
>   File 
> "/usr/local/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py",
>  
> line 105, in get_default_username
> default_username = get_system_username()
>   File 
> "/usr/local/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py",
>  
> line 85, in get_system_username
> return getpass.getuser().decode(locale.getdefaultlocale()[1])
> TypeError: decode() argument 1 must be string, not None
> $ 
>
>
>
>

-- 
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

Application Migration form Django 1.3 to Django 1.5

2013-06-16 Thread Sandeep kaur
I have this Web application made in Django 1.3. And now when I use it
on Django 1.5, it does not work. It give error as no module simple.
So, Is there any migration tool
to make my application work easily on 1.5 version without manually
making lot of changes?
You help will be appreciated.

-- 
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com

-- 
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: Application Migration form Django 1.3 to Django 1.5

2013-06-16 Thread Andreas Kuhne
2013/6/16 Sandeep kaur 

> I have this Web application made in Django 1.3. And now when I use it
> on Django 1.5, it does not work. It give error as no module simple.
> So, Is there any migration tool
> to make my application work easily on 1.5 version without manually
> making lot of changes?
> You help will be appreciated.
>
> --
> Sandeep Kaur
> E-Mail: mkaurkha...@gmail.com
> Blog: sandymadaan.wordpress.com
>
> --
> 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.
>
>
> Hi,

I did exactly the same thing a while back. Unfortunately there isn't any
easy way to do what you want. What I would recommend is to first migrate
the settings so that they represent the new way of setting up a django
project. The way I did that, was I created a new django project with 1.5
and just made sure that the settings where in the same place in the old
project.

Apart from that there are a couple of small things that didn't work. We had
procedure based views, they had to be migrated to class based instead.

You will have to migrate everything slowly and test, test, test

Regards,

Andréas

-- 
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: Application Migration form Django 1.3 to Django 1.5

2013-06-16 Thread Russell Keith-Magee
On Mon, Jun 17, 2013 at 4:13 AM, Sandeep kaur  wrote:

> I have this Web application made in Django 1.3. And now when I use it
> on Django 1.5, it does not work. It give error as no module simple.
> So, Is there any migration tool
> to make my application work easily on 1.5 version without manually
> making lot of changes?
>

Upgrading from Django 1.3 to Django 1.5 shouldn't be a major problem, and
certainly shouldn't require a migration tool. There may be some minor
changes required in your templates (around the {% url %} tag), but
otherwise the code should run pretty much exactly the same. The error
you're describing is a problem with imports, and that *isn't* something
that has changed between Django versions.

In particular, your error message is talking about a module called
"simple". There's only one Django module with that name --
django.test.simple. To the best of my knowledge, that module didn't change
significantly between Django 1.3 and 1.5 -- certainly not in any way that
would result in an import error.

This suggests that the problem lies in either your own code, or in your
development environment. The fact that imports are now failing suggests
that it is the development environment that is the problem. Check all the
changes you've made that may affect import paths. If you're getting import
errors, open a Python shell and try to perform the import. If it doesn't
work at the shell, it won't work in a Django web server either.

Without any more details, it's near impossible to provide more help.
However, suffice to say that Django takes it's backwards compatibility very
seriously, and as long as you're using Django as documented, upgrading
between versions should not be a major problem.

Yours,
Russ Magee %-)

-- 
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: Application Migration form Django 1.3 to Django 1.5

2013-06-16 Thread Some Developer

On 16/06/2013 21:13, Sandeep kaur wrote:

I have this Web application made in Django 1.3. And now when I use it
on Django 1.5, it does not work. It give error as no module simple.
So, Is there any migration tool
to make my application work easily on 1.5 version without manually
making lot of changes?
You help will be appreciated.



The most annoying changes you are going to have to make are likely URL 
tags in templates. You'll need to change all {% url url_name %} to {% 
url "url_name" %}. Depending on how many templates you have this might 
take awhile :).


--
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: Application Migration form Django 1.3 to Django 1.5

2013-06-16 Thread Some Developer

On 16/06/2013 21:24, Andreas Kuhne wrote:

Apart from that there are a couple of small things that didn't work. We
had procedure based views, they had to be migrated to class based instead.


You can still use function based views in Django 1.5. There is no need 
to migrate unless you really want to. If you have an already existing 
app that uses function based views you might find that migrating is just 
an unnecessary waste of time.


--
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: data format value changes in database

2013-06-16 Thread Sergiy Khohlov
looks like you have a problem with a form : datafield   support 2 formats,
but datainput only one

Many thanks,

Serge


+380 636150445
skype: skhohlov


On Sat, Jun 15, 2013 at 2:29 PM,  wrote:

> view.py
>
> def when(request):
> 
> if not report.manual_date:
> report.manual_date = datetime.datetime.now()
> if not report.manual_time:
> report.manual_time = datetime.datetime.now()
> if int(dateformat):
> date = report.manual_date.strftime('%m/%d/%Y')
> else:
> date = report.manual_date.strftime('%d/%m/%Y')
> reportform = ReportForm(instance=report,initial={'manual_date':date, 
> 'manual_time':time})
> if request.method == 'POST':
> reportform = ReportForm(request.POST,instance=report)
> if reportform.is_valid():
> report = reportform.save(commit=False)
> report.user = request.user
> report.save()
> reportform = 
> ReportForm(instance=report,initial={'manual_date':date, 'manual_time':time})
> return render_to_response('incident/when.html', {
>   'date':date,
>   'reportform': reportform,
>   },
> context_instance=RequestContext(request))
>
> forms.py
>
> DATE_INPUT_FORMAT = (
> ('%d/%m/%Y','%m/%d/%Y'))
> class ReportForm(forms.ModelForm):
> manual_date = forms.DateField(input_formats = DATE_INPUT_FORMAT,
>   widget=forms.DateInput(format = 
> '%d/%m/%Y',attrs={'size':'15','id':'datepicker','readonly':'readonly'}))
>
>
> jQuery :
>
> $(function () {
> $( "#datepicker" ).datepicker({
> showOn: "button",
> buttonImage: "{{ STATIC_URL 
> }}images/incident-reporter-icon-when.png",
> dateFormat: ('dd/mm/yy'),
> buttonImageOnly: true,
> changeYear: true,
> changeMonth: true
> });
> });
>
> 1.Date format should change depend upon the value in database,if value is
> in db,it shows the 1st format and for none ,else part is executing.
>
> 2.Formats are changing depends upon the condition.
>
> 3.I am facing problem here,if the input format is of this (%m/%d/%Y),on
> form post the value of date gets interchange and saved in database.If the
> given date is 07/06/2013 -->7th june 2013,after form post it is viewed in
> the field as 06/07/2013 -->6th july 2013.It is not working properly.
>
> 4.Since i am not sure where the problem is,that's the reason i updated
> views,forms and datepicker code.
>
> Need help to solve this issue.
>
> Thanks
>
>
>
>  --
> 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: Simple Static Content Site on Heroku?

2013-06-16 Thread Vibhu Rishi
In this case - do you even need django ? A html site with just bootstrap
for the response ux will be enough.

Vibhu

On Sun, Jun 16, 2013 at 7:32 PM, Vincent Fulco  wrote:

> Fairly new to the framework and have been reading a ton of material.
>
> While I have found a couple of great git repos using Bootstrap with
> Django, I haven't found too many examples of dead simple sites other than
> some single page blogs.  I am working on an informational site with at most
> 5 pages and potentially a blog down the road for a customer (thinking S3,
> compressor, boto, etc. usage within).
>
> Do I even need to incorporate the PostgreSQL RDBMS at this juncture or
> should I set it up for future proofing purposes?  Django is most likely too
> feature packed for such a rudimentary project, yet using it is fulfilling a
> secondary role of giving me a learning stepping stone to a few more
> projects with greater complexity.  So I am not looking for other tools to
> use, just some mention of what I can safely do at this point (elimination
> wise) and still have a robust, well designed, responsive offering.
>
> TIA, V.
>
> --
> 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.
>
>
>



-- 
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 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.