Re: where I can find good django video tutorial?

2010-04-20 Thread Adnan Sadzak
Hi Hussain,

You can find some django videos here:
http://showmedo.com/videotutorials/django



Adnan



On Tue, Apr 20, 2010 at 9:29 AM, Hussain Deikna  wrote:

> Hi , relay I am very happy to enjoy  this group , I need some help, I am
> new in using django and I am glad to use it, but relay I want to understand
> django from a-z and from A-Z , I need if some one know where I can find good
> django video tutorial , thank you for your attention ,bye
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this 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-us...@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: how to develop cms on django

2010-06-29 Thread Adnan Sadzak
You can learn from http://www.django-cms.org/ project.
It have all You need to start Your own project and to learn.


On Tue, Jun 29, 2010 at 12:41 PM, samie  wrote:

> 1 more query..
>
> what are important that i shld. learn in python and in django to
> develop my cms..
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this 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-us...@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: Beginner nead help

2010-06-29 Thread Adnan Sadzak
Can You describe your folders structure and show us settings.py file?
If You followed tutorial correctly everything should work fine.



On Tue, Jun 29, 2010 at 2:00 PM, Eduan  wrote:

> Okay thanks that you all are so helpful.
> I went through the whole tutorial allot of times and can't even
> complete part 1.
> I thought that it was my setup that i was using.
> I am using Windows 7 and Eclipse SDK Version: 3.5.2 for my programming
> environment. I am using a MySQL 5.5 database.
>
> It all goes fluently till I get to the part where you add
> 'mysite.polls' under installed apps.
> After adding that in there I can't run any command(like
> syncdb,runserver) without getting back an error stating:
> Error: No module named mysite.polls.
> I tried renaming it and I still get that error.
>
> I have downloaded an full Django app called friends here :
> http://github.com/jtauber/django-friends/
> If I syncdb or runserver I get the similar error:
> Error: No module named friends
>
> Now please any help. This could be a simple beginners mistake that I
> am making. Thanks allot
> Eduan
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this 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-us...@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: images in admin/change_list.html

2010-02-09 Thread Adnan Sadzak
Shoul'd be here two variables to pass as You defined two %s and pass only
one ?
I'm newbie, maybe I'm wrong :)

def image_img(self):
   if self.image:
   return u'' %
self.image.url_125x125
   else:


On Tue, Feb 9, 2010 at 5:37 AM, django_jedi  wrote:

> I feel like I'm missing something obvious.  Another set of eyes would
> be greatly appreciated.
>
> I'm trying to add an image to the change_list form in the admin.
> Doesn't seem to work.
>
> Here's a snippet I found that gets me most of the way there:
>
>  (from models.py) 
>
>def image_img(self):
>if self.image:
>return u'' %
> self.image.url_125x125
>else:
>return '(test)'
>image_img.short_description = 'Image'
>image_img.allow_tags = True
>
>
> --- (from admin.py) 
>
> class LibraryAdmin(admin.ModelAdmin):
>list_display = ['image_img', 'image', 'name', 'pub_date']
>form = LibraryForm
>position_field = 'position'
>order_with_respect_to = 'category'
>
> Here is my full models.py:
> http://dpaste.com/156429/
>
>
> TIA.
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this 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-us...@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: Problem while creating database tables through the models.

2010-02-12 Thread Adnan Sadzak
Did You start python shell from project directory ??

python manage.py shell


On Fri, Feb 12, 2010 at 1:42 PM, Newbie  wrote:

> thanks for your reply..
> When I updated the postgresql version , the tables are created
> successfully.
>
> Now I faced another problem.
> When I start to store a data in the model through the methods of the
> class ,  the following error is get.
> >> from mysite.polls.models import Poll,Choice
> >>> Poll.objects
> 
> >>> Poll.objects.all()
> Traceback (most recent call last):
>  File "", line 1, in ?
>  File "/usr/lib/python2.4/site-packages/django/db/models/query.py",
> line 68, in __repr__
>data = list(self[:REPR_OUTPUT_SIZE + 1])
>  File "/usr/lib/python2.4/site-packages/django/db/models/query.py",
> line 83, in __len__
>self._result_cache.extend(list(self._iter))
>  File "/usr/lib/python2.4/site-packages/django/db/models/query.py",
> line 238, in iterator
>for row in self.query.results_iter():
>  File "/usr/lib/python2.4/site-packages/django/db/models/sql/
> query.py", line 287, in results_iter
>for rows in self.execute_sql(MULTI):
>  File "/usr/lib/python2.4/site-packages/django/db/models/sql/
> query.py", line 2360, in execute_sql
>sql, params = self.as_sql()
>  File "/usr/lib/python2.4/site-packages/django/db/models/sql/
> query.py", line 396, in as_sql
>out_cols = self.get_columns(with_col_aliases)
>  File "/usr/lib/python2.4/site-packages/django/db/models/sql/
> query.py", line 740, in get_columns
>col_aliases)
>  File "/usr/lib/python2.4/site-packages/django/db/models/sql/
> query.py", line 823, in get_default_columns
>r = '%s.%s' % (qn(alias), qn2(field.column))
>  File "/usr/lib/python2.4/site-packages/django/db/models/sql/
> query.py", line 175, in quote_name_unless_alias
>r = self.connection.ops.quote_name(name)
>  File "/usr/lib/python2.4/site-packages/django/db/backends/dummy/
> base.py", line 15, in complain
>raise ImproperlyConfigured, "You haven't set the DATABASE_ENGINE
> setting yet."
> django.core.exceptions.ImproperlyConfigured: You haven't set the
> DATABASE_ENGINE setting yet.
>
> But I have configured the DATABASE_ENGINE name as postgresql in
> settings.py
>
> Please help me.
>
>
>
>
>
> On Feb 12, 10:06 am, Christophe Pettus  wrote:
> > On Feb 11, 2010, at 8:38 PM, Newbie wrote:
> >
> > > NOTE : Django version is 1.1.1 and PostgreSQL version is 7.4.16
> >
> > Is there is a reason you are using such an old version of PostgreSQL?
> >
> > --
> > -- Christophe Pettus
> > x...@thebuild.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-us...@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-us...@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: Serving https with runserver

2010-02-28 Thread Adnan Sadzak
If it's on your local machine there is no big sense to use ssl unles you are
paranoid. If someone can sniff local traffic, then ssl is useless.
Anyway, as Janusz said http://www.stunnel.org/

On Mon, Mar 1, 2010 at 1:06 AM, Janusz Harkot wrote:

> So you can use stunnel: http://www.stunnel.org/
>
> J.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this 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-us...@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: Serving https with runserver

2010-03-01 Thread Adnan Sadzak
Then maybe web server is the best option. In all cases you have to configure
something until someday 'runserver' come with ssl support.


On Mon, Mar 1, 2010 at 11:56 AM, Ian Lewis  wrote:

> I can think of a number of reasons why you would want to test SSL
> behavior on your local machine before running it on a production
> server. Setup can be pretty annoying for one.
>
> I wrote a blog post on how to do this very thing a while back. I used
> stunnel, as Janusz mentioned, to test SSL redirect behavior on the
> development server. You need to run two dev servers one for http and
> one for https. You also need to make sure that you set HTTPS=on as an
> environment variable so that request.is_secure() returns true
> properly.
>
> http://www.ianlewis.org/en/testing-https-djangos-development-server
>
> Ian
>
> On Mon, Mar 1, 2010 at 7:43 PM, Gonzalo Delgado 
> wrote:
> > El 01/03/10 07:07, cool-RR escribió:
> >> Adnan, I'm really baffled by your response. No, my reasons for using
> >> SSL here is not because I'm afraid someone will sniff my data, We are
> >> talking here about `runserver`, which is the development server which
> >> is never used for production. The goal of `runserver` is to be able to
> >> easily test how your Django project behaves before you upload it to
> >> the real server.
> >
> > While it may sound so, the development server isn't really intended to
> > test *exactly* how a Django project behaves before uploading it to a
> > production server. There are a couple of cases where it will always fall
> > short, like serving static media or using SSL. It also can't help you
> > much to test how a site behaves with a big number of requests per second.
> > For those cases a staging[0] server is used, which is a copy of the
> > production server but for testing how the site behaves under certain
> > conditions or with new features, etc.
> >
> > [0] http://en.wikipedia.org/wiki/Staging_site
> >
> > --
> > Gonzalo Delgado 
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> "Django users" group.
> > To post to this group, send email to django-us...@googlegroups.com.
> > To unsubscribe from this 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.
> >
> >
>
>
>
> --
> ===
> 株式会社ビープラウド  イアン・ルイス
> 〒150-0012
> 東京都渋谷区広尾1-11-2アイオス広尾ビル604
> email: ianmle...@beproud.jp
> TEL:03-5795-2707
> FAX:03-5795-2708
> http://www.beproud.jp/
> ===
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this 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-us...@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: Import a custom py file into views.py

2012-02-09 Thread Adnan Sadzak
How python treat some folder as module? You need to add __init__.py into it.


On Thu, Feb 9, 2012 at 11:33 AM, Daniel Roseman wrote:

>
> On Thursday, 9 February 2012 10:21:29 UTC, Alessandro Candini wrote:
>>
>> Hi list.
>> In my project named STO I have the 'jsonopenlayers' app with the
>> following structure:
>>
>> STO
>> ├── __init__.py
>> ├── jsonopenlayers
>> │ ├── ingestion
>> │ │ └── ingestShp.py
>> │ ├── __init__.py
>> │ ├── models.py
>> │ └── views.py
>> ├── manage.py
>> └── settings.py
>>
>> What I would like to do is to import the functions written inside
>> ingestShp.py into my views.py.
>>
>> I've tried in several ways, for example with
>>
>> from jsonopenlayers.ingestion.**ingestShp import *
>>
>> inside the views.py file, but I get the error
>>
>> Could not import jsonopenlayers.views. Error was: No module named
>> ingestion.ingestShp
>>
>> How can I import this file?
>>
>> Thanks in advance
>>
>
>

-- 
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: Learn DJango first, then learn Pinax; or just learn Pinax straight-off?

2011-09-18 Thread Adnan Sadzak
You have some tutorials on http://showmedo.com/videotutorials/django
Also there is Python videos if You starting up.

Cheers,
Adnan

On Sun, Sep 18, 2011 at 7:48 AM, Alec Taylor  wrote:

> Also, quick tutorial question; are there a good set of video tutorials
> (i.e. on YouTube or metacafe) for DJango?
>
> /me finds the most resources he has at his disposal the quicker he
> learns
>
> On Sep 18, 3:43 pm, Alec Taylor  wrote:
> > Thanks Russ, I'll use that method.
> >
> > :]
> >
> > 2011/9/18 Aesha Umelmumenen :
> >
> >
> >
> >
> >
> > > On Sun, Sep 18, 2011 at 2:24 AM, Russell Keith-Magee
> > >  wrote:
> >
> > >> On Sat, Sep 17, 2011 at 3:17 PM, Alec Taylor 
> > >> wrote:
> > >> > Good afternoon,
> >
> > >> > I plan on using Pinax for a project I'm doing (releasing project
> under
> > >> > New BSD or similar).
> >
> > >> > My Learning Plan is as follows:
> > >> > 1.https://docs.djangoproject.com/en/dev//intro/tutorial01/
> > >> >https://docs.djangoproject.com/en/dev//intro/tutorial02/
> > >> >https://docs.djangoproject.com/en/dev//intro/tutorial03/
> > >> > 2.http://pinaxproject.com/docs/dev/contributing/#getting-started
> >
> > >> > My current Python skills are limited to PythonCGI only.
> >
> > >> > Would you recommend I follow the aforementioned Learning Plan, or
> > >> > would you recommend a different method?
> >
> > >> This sounds like a reasonable approach -- although I would:
> > >>  * Make sure you do Django's Tutorial 4 after Tutorial 3.
> > >>  * Use something other than the "how to contribute" guide to Pinax as
> > >> your introduction to Pinax.
> >
> > >> The thing to keep in mind through all of this is that Python, Django
> > >> and Pinax are all just layers built on top of each other. Python is a
> > >> language. Django is a library that uses that language. Pinax is a set
> > >> of specific Django apps and configuration guidelines that help in
> > >> using Django. Jumping straight in and learning Pinax from the start is
> > >> probably possible, but you'll miss a whole lot of valuable groundwork
> > >> along the way.
> >
> > >> Best of luck with your project!
> >
> > >> Yours,
> > >> Russ Magee %-)
> >
> > >> --
> > >> 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.
> >
> > > --
> > > Ããßã ÚÇÆÔÉ
> > > ÑÖí Çááå Úäí
> > > æÚä ÕÝæÇä ÇÈä ÇáãÚØá
> > > ÑÇÓáæäí Úáí ÈÑíÏ ãÌãæÚÉ ÑÖÇÚ ÇáßÈíÑ
> > > æáÅÑÓÇá ãÞÇáÇÊ Ãæ ÕæÑ Ãæ ÝíÏíæ Çáí åÐå ÇáãÌãæÚÉ¡ Þã ÈÅÑÓÇá ÈÑíÏ
> ÅáßÊÑæäí
> > > Åáì
> > > reda3_alkab...@googlegroups.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.
>
>

-- 
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: Learn DJango first, then learn Pinax; or just learn Pinax straight-off?

2011-09-19 Thread Adnan Sadzak
Yes it has changed, but not so much that you can't follow tutorials.


On Mon, Sep 19, 2011 at 12:48 PM, Alec Taylor wrote:

> Adnan: Those tutorials seems 2-3 years old, has DJango changed
> significantly in those years?
>
> Deng: Thanks, I will do so :]
>
> --
> 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/-/r7iIeiHuqrYJ.
>
> 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: Pinax or Straight Django

2012-01-16 Thread Adnan Sadzak
Maybe this can help You:
http://groups.google.com/group/django-users/browse_thread/thread/420e428525b41659/570dd1ffc19458ff?pli=1
http://groups.google.com/group/django-users/browse_thread/thread/420e428525b41659/570dd1ffc19458ff?pli=1

Cheers


On Tue, Jan 17, 2012 at 8:12 AM, Kevin Miller wrote:

> Dear all,
>
> I have been struggling between using Pinax or Straight django to
> develop my apps. I have never used Pinax,  but was reading on it.
> I have already only developed one website in django although it is not
> yet launched.
>
> I would really like to hear the experiences of those who have used both.
>
> Are there really any benefits in using Pinax?
>
> NB: On a quick browse on google I realize that it was difficult to
> find good and up to date tutorials on Pinax.
>
>
> Thanks in advance for the replies.
>
>
> Kevin
>
> --
> 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: Advice on creating an SFTP frontend in Django

2013-07-03 Thread Adnan Sadzak
Hi Paul,

does all users have/need their own SFTP account on server?
If not, You can mount remote SFTP folder on web server and control access
to folders via django.

Cheers,
Adnan


On Wed, Jul 3, 2013 at 9:43 PM, Paul Hudson  wrote:

> Hi,
>
> I have successfully used django-storages (
> http://django-storages.readthedocs.org/en/latest/index.html)  and
> paramiko directly to log into an SFTP server and list a directory.  My end
> goal is to make a simple Client Area that allows the downloading of files
> hosted on SFTP.  I am open to any advice.  But here are a few specific
> questions:
>
>
>1. How should I handle authentication?  Use django's built in
>authentication and pass the usr/pwd onto the SFTP? (is that possible in a
>secure way?)  Authenticate directly against SFTP server in a secure way?
>2. Are files going to be transferred twice?  Once from SFTP to temp
>area on Django server.  And then downloaded via client's web browser...  Am
>I just better off hosting the files on the web server to begin with?  (The
>files need to be available on SFTP and via web browser.  Maybe instead of
>direct access to SFTP via Django, I should focus on a simple way to post
>the original files to both places???)
>3. Are they any Django Projects/Plugins/Components for File
>Explorer/FTP Client type GUIs that you would recommend using or 
> referencing?
>
>
>
> Thanks for any and all input!
> -Paul
>
> --
> 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: pyodbc & FreeTDS: Can I work with NVARCHAR column on MSSQL2008

2011-01-31 Thread Adnan Sadzak
Hi,

I have expirience with pymssql and mssql server, and that works fine
(utf-8).

FreeTDS docs says:

"FreeTDS is not fully compatible with multi-byte character sets such as
UCS-2. You must use an ASCII-extension charset (e.g., UTF-8,
ISO-8859-*)[2]
.
Great care should be taken testing applications using these encodings.
Specifically, many applications do not expect the number of characters
returned to exceed the column size (in bytes). "

Did You try utf-8?

Cheers


On Mon, Jan 31, 2011 at 1:39 PM, Orgil  wrote:

> Hello.
> I have FreeTDS, pyodbc-2.1.8, python-2.6, ubuntu-10.4.
> I also have MSSQL2008 database server on Windows7.
>
> My question is: Can I get unicode data from nvarchar column on
> Mssql2008 database using pyodbc?
> To do this, what does other library or configuration need me?
>
> I use FreeTDS driver to connect with mssql by pyodbc. But I don't know
> version of FreeTDS.
> How to know the version of FreeTDS?
>
> My current state is, I can connect with mssql. But I can not get
> unicode data!
> My code is:
> ---
>import pyodbc
>conn =
>
> pyodbc.connect(r'DRIVER={FreeTDS};SERVER=10.0.0.61\mssql2008;DATABASE=eoffice_clone;UID=erp;PWD=123;CHARSET=UCS-2;')
>crms = conn.cursor()
>crms.execute("SELECT cc_Name FROM tblHR_CodeClass")
>for line in crms:
>print 'cc_Name:', str(line.cc_Name)
>conn.close()
> ---
> Expected result is 'cc_Name: Аймаг, хот', but instead
> 'cc_Name: ?, ???' comes.
>
> Please, share your experience!
>
> regards,
> Orgil
>
> --
> 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: pyodbc & FreeTDS: Can I work with NVARCHAR column on MSSQL2008

2011-01-31 Thread Adnan Sadzak
This is how Your FreeTDS config should look like:
;--
[mssql2008]
host = 10.0.0.61
port = 1433
tds version = 7.0
;--


Here is the code with pymssql:
#--
import pymssql
conn = pymssql.connect(host='mssql2008', user='erp', password='123',
database='eoffice_clone', charset = "utf8")
cur = conn.cursor()
cur.execute('SELECT cc_Name FROM tblHR_CodeClass')
for row in cur:
print 'cc_Name: %s' % (row[0])
conn.close()
#--

Also if You print this to linux console check terminal character encoding
(sould be UTF-8 too)!

Cheers,
Adnan

On Tue, Feb 1, 2011 at 6:52 AM, Orgil  wrote:

> > Hi,
> > I have expirience with pymssql and mssql server, and that works fine
> > (utf-8).
> > Did You try utf-8?
>
> I think that I have tried pymssql using charsets including utf-8,
> utf-16, iso-.
> But I have no luck there. I can not get unicode datas. Also, I have
> read that pymssql does not support unicode. This news made me find
> other libraries and I found pyodbc. But still I have no luck. Unicode
> turns ? sign always.
> Now I am at a corner, I'm stuck
>
> If you succeeded with pymssql and unicode data, please suggest me how
> to do so!
> Please help me to get out from this terrible corner!
>
> My code which uses pymssql is here:
>import _mssql
>conn = _mssql.connect(server='10.0.0.61\mssql2008',
> user='erp', password='123', database='eoffice_clone',
> charset='utf-16')
>conn.execute_query('SELECT cc_Name FROM tblHR_CodeClass')
>for line in conn:
>print 'cc_Name: %s' % (line['cc_Name'])
>break
>conn.close()
>
> regards,
> Orgil
>
> --
> 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: pymssql: Problem with Unicode string

2011-02-16 Thread Adnan Sadzak
You did not install static libs and headers

Try this:
aptitude install freetds-bin freetds-common freetds-dev

or just freetds-dev.

Cheers



On Wed, Feb 16, 2011 at 9:46 AM, Orgil  wrote:
> Hello.
> I can not get unicode string from MSSQL.
> I have pymssql-1.0.2, freetds-0.82, ubuntu-10.10.
> I have two computers.
> First is well configured and good working (i did not configured). From
> that computer, I can read the unicode.
> Now i am trying to set up connection to mssql and reading unicode
> string on second computer. I am trying to install and configure
> freetds like first computer. But I can not do this.
>
> When I run "$ locate freetds" from terminal on first computer (which
> is good working one), the result is:
> 
> /etc/freetds
> /etc/freetds/freetds.conf
> /usr/local/freetds
> /usr/local/etc/freetds.conf
> /usr/local/freetds/bin
> /usr/local/freetds/etc
> /usr/local/freetds/include
> /usr/local/freetds/lib
> /usr/local/freetds/man
> /usr/local/freetds/share
> /usr/local/freetds/bin/bsqldb
> /usr/local/freetds/bin/bsqlodbc
> /usr/local/freetds/bin/datacopy
> /usr/local/freetds/bin/defncopy
> /usr/local/freetds/bin/fisql
> /usr/local/freetds/bin/freebcp
> /usr/local/freetds/bin/osql
> /usr/local/freetds/bin/tdspool
> /usr/local/freetds/bin/tsql
> /usr/local/freetds/etc/freetds.conf
> /usr/local/freetds/etc/locales.conf
> /usr/local/freetds/etc/pool.conf
> /usr/local/freetds/include/bkpublic.h
> /usr/local/freetds/include/cspublic.h
> /usr/local/freetds/include/cstypes.h
> /usr/local/freetds/include/ctpublic.h
> /usr/local/freetds/include/sqldb.h
> /usr/local/freetds/include/sqlfront.h
> /usr/local/freetds/include/sybdb.h
> /usr/local/freetds/include/syberror.h
> /usr/local/freetds/include/sybfront.h
> /usr/local/freetds/include/tds_sysdep_public.h
> /usr/local/freetds/lib/libct.a
> /usr/local/freetds/lib/libct.la
> /usr/local/freetds/lib/libct.so
> /usr/local/freetds/lib/libct.so.4
> /usr/local/freetds/lib/libct.so.4.0.0
> /usr/local/freetds/lib/libsybdb.a
> /usr/local/freetds/lib/libsybdb.la
> /usr/local/freetds/lib/libsybdb.so
> /usr/local/freetds/lib/libsybdb.so.5
> /usr/local/freetds/lib/libsybdb.so.5.0.0
> /usr/local/freetds/lib/libtdsodbc.a
> /usr/local/freetds/lib/libtdsodbc.la
> /usr/local/freetds/lib/libtdsodbc.so
> /usr/local/freetds/lib/libtdsodbc.so.0
> /usr/local/freetds/lib/libtdsodbc.so.0.0.0
> /usr/local/freetds/man/man1
> /usr/local/freetds/man/man5
> /usr/local/freetds/man/man1/bsqldb.1
> /usr/local/freetds/man/man1/bsqlodbc.1
> /usr/local/freetds/man/man1/datacopy.1
> /usr/local/freetds/man/man1/defncopy.1
> /usr/local/freetds/man/man1/fisql.1
> /usr/local/freetds/man/man1/freebcp.1
> /usr/local/freetds/man/man1/osql.1
> /usr/local/freetds/man/man1/tsql.1
> /usr/local/freetds/man/man5/freetds.conf.5
> /usr/local/share/man/man5/freetds.conf.5
> /var/cache/apt/archives/freetds-common_0.82-6build1_all.deb
> /var/cache/apt/archives/freetds-dev_0.82-6build1_i386.deb
> /var/lib/dpkg/info/freetds-common.list
> /var/lib/dpkg/info/freetds-common.postrm
> /var/tmp/freetds.conf.swp
> --
>
> And when I do the same run second computer, result is:
> --
> /etc/freetds
> /etc/freetds.conf
> /etc/freetds/freetds.conf
> /home/usi/Downloads/freetds-stable.tgz
> /usr/local/etc/freetds.conf
> /usr/local/etc/freetds.conf.save
> /usr/local/share/man/man5/freetds.conf.5
> /usr/man/man5/freetds.conf.5
> /usr/share/freetds
> /usr/share/doc/freetds-common
> /usr/share/doc/freetds-dev
> /usr/share/doc/freetds-common/NEWS.gz
> /usr/share/doc/freetds-common/README
> /usr/share/doc/freetds-common/README.Debian
> /usr/share/doc/freetds-common/TODO.Debian
> /usr/share/doc/freetds-common/TODO.gz
> /usr/share/doc/freetds-common/changelog.Debian.gz
> /usr/share/doc/freetds-common/changelog.gz
> /usr/share/doc/freetds-common/copyright
> /usr/share/doc/freetds-common/examples
> /usr/share/doc/freetds-common/examples/freetds.conf
> /usr/share/doc/freetds-common/examples/freetds.conf.pl
> /usr/share/doc/freetds-common/examples/locales.conf
> /usr/share/doc/freetds-common/examples/odbcinst.ini
> /usr/share/doc/freetds-dev/changelog.Debian.gz
> /usr/share/doc/freetds-dev/changelog.gz
> /usr/share/doc/freetds-dev/copyright
> /usr/share/freetds/freetds.conf
> /usr/share/man/man5/freetds.conf.5.gz
> /var/cache/apt/archives/freetds-bin_0.82-7_i386.deb
> /var/cache/apt/archives/freetds-common_0.82-7_all.deb
> /var/cache/apt/archives/freetds-dev_0.82-7_i386.deb
> /var/lib/dpkg/info/freetds-common.list
> /var/lib/dpkg/info/freetds-common.md5sums
> /var/lib/dpkg/info/freetds-common.postinst
> /var/lib/dpkg/info/freetds-common.postrm
> /var/lib/dpkg/info/freetds-dev.list
> /var/lib/dpkg/info/freetds-dev.md5sums
> /var/lib/dpkg/info/freetds-dev.preinst
> -
>
> As the results, there is so huge difference between two computers.
> I can not install freetds as installed as on first computer!
>
> How to instal

Re: Connecting to a MS SQL server from django

2014-01-15 Thread Adnan Sadzak
Maybe Your  MSSQL server is listening only on loopback interface. Telnet
from linux box to windows server on port 1433 and check if port is open.
You can see also this few pages, just depends on Your server version.:
http://blogs.msdn.com/b/sqlblog/archive/2009/07/17/how-to-configure-sql-server-to-listen-on-different-ports-on-different-ip-addresses.aspx
http://blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx

Check also FreeTDS project: http://www.freetds.org/

Cheers,
Adnan


On Wed, Jan 15, 2014 at 5:19 PM, Larry Martell wrote:

> On Wed, Jan 15, 2014 at 12:09 AM, Avraham Serour 
> wrote:
> > I would try using some kind of DB explorer first, to make sure I have the
> > ip, port and auth right, once you are able using some other tool you can
> > just use the same settings in your code
>
> Do you know of any such beast for Linux?
>
> > On Wed, Jan 15, 2014 at 6:46 AM, Larry Martell 
> > wrote:
> >>
> >> On Tuesday, January 14, 2014, Mark Moss wrote:
> >>>
> >>> The default port for MySQL is 3306. Have you tried that one?
> >>
> >>
> >>
> >> I'm not trying to connect to MySQL - I'm trying to connect to Microsoft
> >> SQL server.
> >>
> >> --
> >> 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.
> >> To view this discussion on the web visit
> >>
> https://groups.google.com/d/msgid/django-users/CACwCsY5qidVz3PcCxnCfSpJx134hL68cicMaZUCmRKRpLJ6%3DWQ%40mail.gmail.com
> .
> >>
> >> 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.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/django-users/CAFWa6tKSNGb6PLenqH3h9FHxMpp%3De%2Bv_W686Aq71HnjsGL-%2B%2Bw%40mail.gmail.com
> .
> >
> > 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CACwCsY4dstOYsGYZ8coq9CX2883w%2BW35YZrzduz3URieAN%3DELw%40mail.gmail.com
> .
> 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAG6E59UXfaBWyk9TgJaFSgFcQ_qsxTL94Sd9yQTySeD-amjcKw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Connecting to SQL Server

2019-07-04 Thread Adnan Sadzak
Hi John,

You are probably passing datefirst as string while in your database 
datefirst column is int.
Can you please confirm you are not passing different data types?

Cheers,
Adnan

On Thursday, July 4, 2019 at 6:48:21 PM UTC+2, John Burke wrote:
>
> I don't actually supply the hour.  This is code in base.py.  
>
> The prior code sets up formatting:
>
> datefirst = options.get('datefirst', 7)
> cursor.execute('SET DATEFORMAT ymd; SET DATEFIRST %s' % datefirst)
>
> I wonder if it is not getting executed successfully.
>
>
> On Thu, Jul 4, 2019 at 11:10 AM Charlotte Wood <
> charlo...@epiccharterschools.org > wrote:
>
>> It looks as if you have an odd value in there for the hour.  Do you?
>>
>>
>> Charlotte Wood, MEd
>>
>> Educator
>>
>> (405) 578-5701
>>
>> Zoom Meeting ID#: 4055785701
>>
>> *Zoom URL:* https://epiccharterschools.zoom.us/j/2970513912
>>
>> Classroom Google Site: 
>> https://sites.google.com/epiccharterschools.org/charlottewoodclassroom/home
>>
>> Epic Technical Support: (405) 652-0935
>>
>>
>>
>> Jordan McKesson Principal
>>
>> 405-749-4550 ext. 309
>>
>> jordan@epiccharterschools.org 
>>
>>  
>>  
>>  
>> 
>>
>>
>>
>>
>> On Wed, Jul 3, 2019 at 6:52 PM John Burke > 
>> wrote:
>>
>>> Trying to connect to SQL Server from Django
>>>
>>> DATABASES = {
>>> 'default': {
>>> 'ENGINE': 'sql_server.pyodbc',
>>> 'NAME': 'dbname',
>>> 'HOST': 'hostname',
>>> 'PORT': '',
>>> 'USER': 'user',
>>> 'PASSWORD': 'password',
>>> 'OPTIONS': {
>>> 'driver': 'ODBC Driver 13 for SQL Server',
>>> },
>>> }
>>> }
>>>
>>>
>>> I get the following error:
>>> File "...\venv\lib\site-packages\sql_server\pyodbc\base.py", line 362, 
>>> in init_connection_state
>>> val = cursor.execute('SELECT SYSDATETIME()').fetchone()[0]
>>> ValueError: hour must be in 0..23
>>>
>>>
>>> -- 
>>> 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...@googlegroups.com .
>>> To post to this group, send email to django...@googlegroups.com 
>>> .
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/58c14df7-0b4e-49dd-a19e-11c1101ff947%40googlegroups.com
>>>  
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> -- 
>> 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...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/CAPZR0N6yPmqDRwfbSXNwUHOCR3%3DDcgTM_Ez_DcM7FbxjAsSFGA%40mail.gmail.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> -- 
> Regards,
> John B
>

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c532c7ff-2635-4e7d-a393-206d6d01634b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.