If you are comfortable with sql syntax, just pull the data you want with
sql joins.
You already have the keys set up
On Thursday, July 19, 2012 5:16:42 AM UTC-4, Julio Galvez wrote:
>
> Hi, I'm new with Django and in this Groups; I have the next models and
> question
>
> class Empresa(models.Mo
When one creates a project with django-admin.py why is a second my site
folder created?
Mysite
Mysite
polls
Thanks in advance.
What is its function/value in this new version
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view thi
I hope my answer points you in the right direction.
I would create 2 (generic) tables one that is called something like
test_definition, since you have a wide variety of tests.
And then create a table called test results.
The forms that the user fills in would be created dynamically through th
I am creating tables in sql server for the first time. I usually use mysql.
The tables are created with a domain prefix rather than dbo.table
(domain\myname.table instead of dbo.table)
How do I get django to creatte the tables the way I want them to be created
--
You received this message becau
I am not an expert on the csrf module, but the error is pointing towards
this module.
I am using 'django.middleware.csrf.CsrfViewMiddleware', with django 1.3 and
app is working just fine.
If I were you I would research this module in the django web page and focus
on this module
On Tuesday, May
Syncdb utility is a (very) convenient tool for converting the database model
from models.py to the physical structure creation in the actual database.
You can create the physical model without using Syncdb at all if u are
comfortable with SQL.
That said, when the admi site tries to read and wri
Capture the value from the form submitted into a variable.
Use straight sql to query the table and the field that you are interested
in and translate the field based on sql.
It is not necessary to only use the ORM.
This is an abstraction layer, and sometimes the restrictions based upon
using
I assume that your problem is that when the data is posted , the ORM when
submitting it to the database throws the eror.
You need to place the posted value into a variable and use a python
replace statement to replace the , with a period.
Not sure what type of validation that you are using.
P
I use it for several applicartions. Not sure that there is any difference
with the various versions of sql server, except for minor syntax issues.
What did you want to know?
The performance is very good.
I have one application in which I use the admin interface which uses the
ORM and I have a
It does not appear that anyone truly answered your question.
The accounts are maintained in a database.
Figure out which table and which columns the account that you want to
remove are maintained. You can accomplish this by viewing a development
server that you may have in house and spinning u
I believe he means using the Object Relational Model ORM, which is an API
abstraction for several frameworks.
Whether you use sql or the ORM (you can learn more about the ORM on the
django project tutorial) only clouds the issue that you are trying to answer
SQL is SQL whether you make an abst
Interesting question.
I would have to think about your larger question, but the smaller issue, is
that you need to close the crsr and you need to commit,
I would think that you would not want to make commit automatic, so that
your code has a chance to do some error checking and perhaps roll ba
I see from your link that there are 2 possible downloads to enable you to
install the software that you want.
If you are having issues with the windows 2.7 exe, just use the zip file.
Then you can install the software by executing the following command after
unzipping the file in windows.
c>
You can retrieve the url variable that you are interested in with
evaluating this variable
request.path
Use this link for more details
http://www.djangobook.com/en/2.0/chapter07/
This is an example from the above source
def current_url_view_good(request):
return HttpResponse("Welcome to t
Did you use the windows exe to install or did you use the zip file.
The zip file should work with any python installation
after unzipping the files, cd into the directory that included the setup.py
file.
then use the following command line
explicitly use python27
cd into the unzipped director
Use straight sql.
There are always potentially limitations with an abstraction such as the
ORM.
Why try to fit a square peg into a round whole.
On Wednesday, March 21, 2012 4:41:32 AM UTC-4, diafygi wrote:
>
> There is an old thread that didn't end in a resolution about
> preventing joins in a
That is a very interesting question.
I presume that you will not be doing this dynamically as a user logs on.
If that is the case, why don't you let django answer the question for you.
Create a database with the several different schemas and follow the
instructions to let django create your mo
On Wednesday, February 29, 2012 2:46:11 PM UTC-5, Django_for_SB wrote:
>
> Hello All,
>
> I'm going through the tutorial on djangoproject.com, and can't seem to
> hurdle over this section that reads "Write views that actually do
> something"
>
> Here's the code I have so far, which is directl
Just to get you past the error and display your data, I suggest hard coding
the directory path in your view.
The work your way backwards to the settings file
try
t =
loader.get_template('C:\\Python27\\my_Djando_projects\\mysite\\My_Templates\\polls\\index.html'')
You could also add a litt
assuming that your set up the
settings.py file has been set up correctly to connect to the database
of your choice.
python manage.py syncdb
Let me know if this works for you
On Feb 13, 3:56 pm, Saadat wrote:
> Thank you Python_junkie
> I've created the poll app and I'm
Feb 10, 4:33 pm, Python_Junkie
wrote:
> I think you have it with the syntax you just wrote down.
>
> I will be available by phone until 4:45 if you want to call.
>
> 781-248-6557
>
> On Feb 10, 4:19 pm, Patrick Wellever wrote:
>
>
>
>
>
>
>
> > S
find a solution that would list the
> contents of my specified directory in either of these locations.
>
> I need something like:
>
> template_files = []
> for dir in EVERY_DIRECTORY_DJANGO_LOOKS_FOR_TEMPLATES_IN:
> template_files.extend(os.listdir(dir))
>
>
The internet is a wonderful invention, but sometimes the interchange
of the spoken word is more efficient.
Let's see if I have this straight.
You know which directory the templates are in.
'templates/flatpages/page_templates/ for example.
Is that correct?
Then when you pass from the url.py to
em
> automatically show up as available choices for a "template" field on my model.
>
>
>
>
>
>
>
> On Friday, February 10, 2012 at 1:33 PM, Python_Junkie wrote:
>
> >https://docs.djangoproject.com/en/dev/ref/templates/api/
>
> > Search on template
ccount if possible.
>
> Is there any way to iterate over whatever list of source directories Django
> builds when it wants to go looking for a template?
>
> Thanks,
> Patrick
>
>
>
>
>
>
>
> On Friday, February 10, 2012 at 1:03 PM, Python_Junkie wrote:
> > The
The setttings file is a python module.
See page
https://docs.djangoproject.com/en/dev/topics/settings/
Since the path is set for the templates.
***
frrom the example
TEMPLATE_DIRS = ('/home/templates/mike')
in the view
templates=os.listdir(TEMPLATE_DIRS)
###template_count=len(t
Is the project referenced in this link written in Django.
Was your goal for your class project to write a Django app?
On Feb 10, 8:27 am, Richard House wrote:
> Hi Saadat,
> Rather than creating something new, have you looked at contributing to
> software from such lists like
> this?http://e
yellow stickies, as some of
these web sites suggest as an alternative.
Then convert the yellow stickies into web pages and link them to the
backend database.
Good luck
On Feb 10, 8:18 am, Python_Junkie
wrote:
> Not sure from your post, which piece you are stuck on.
>
> 1. Have you us
Not sure from your post, which piece you are stuck on.
1. Have you used Django before?
If not start with the tutorial
https://www.djangoproject.com/
2. If you have a basic understanding of Django, have you been able to
set up a basic project /app and connect run syncdb.
One can always connect to
The name field is the database name.
You always need to create an empty database for any new
implementation.
Have you created a database and can you attach to it with the
credentials that are supplied in the settings.py file
On Feb 10, 6:35 am, Stanwin Siow wrote:
> can you show the actual erro
forge.net/andhttp://code.google.com/p/django-pyodbc/
>
> Renne Rocha
> http://rennerocha.com/
>
> On Fri, Feb 10, 2012 at 1:29 AM, Python_Junkie <
>
>
>
>
>
>
>
> software.buy.des...@gmail.com> wrote:
> > I wanted to know if the settings.py will su
I wanted to know if the settings.py will support a generic ODBC
connection and if it could what the syntax would be in the database
section of the , settings.py file
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send ema
Not sure if this will help, but I have diverted from the standard
method of database updates taught in the tutorial.
I take a more traditional sql methodology
for example in any view that I am using.
I collect the data elements via a request
and then build a sql statement
for example
(The exac
On Mon, Jan 16, 2012 at 4:32 PM, Python_Junkie
>
> wrote:
> > Thanks for the procedure.
>
> > But when I look at the list of packages for pyodbc displayed, they are
> > tailored to a specific version of python /chipset.
>
> >http://code.google.com/p/pyodbc/downl
>yes, this is wrong. most development is done in non-windows OS.
>what you're seeing is that since OSS is about sharing source,
On Jan 16, 11:31 am, Javier Guerra Giraldez
wrote:
> On Mon, Jan 16, 2012 at 11:22 AM, Python_Junkie
>
I guess I am digging in a lot deeper into this
;
> Then do something like:
>
> > sudo easy_install pip
> > sudo pip install virtualenv
> > virtualenv /path/to/project/env
> > /path/to/project/env/bin/activate
> > pip install pyodbc mysqldb psycopg2
>
> And possibly:
>
> > brew install mysql po
I appreciate your response.
I still would like to move my development over to linux based OS, as
you said many of the deployments are on linux web servers.
You helped me clarify what I would require in order to make any
project successful.
I would need the capability of porting any existing open s
I have been developing python/django programs on a windows machine at
work for several years
and have been very satisfied with the functionality available from the
available modules in windows.
I thought I would expand my universe and set up the development
environment on a mac this weekend at hom
I believe you are mixing methods.
Django has built in generic views and generic forms for example.
But, you have used a template with standard (html) from syntax.
Since you are doing a post, request.
In your view just assign a variable to each variable in the form that
you are pulling back and
For those who do not want to use another abstraction module, just use
sql on the database to add the column.
Look up the alter table command for the database that you are using.
On Jan 11, 5:26 am, callum wrote:
> I created an "Article" model with a few simple properties. I ran
> syncdb, and set
using the terminal window execute the following command for each and
every version of python that you might want to use.
cd into the folder that contains the setup.py file in django and run
the following command >>/usr/local/bin/pythonw setup.py install
and all of the components will be moved i
Don't want to confuse you on the database topic, but thought I would
add my 2 cents.
You asked how to go about learning how to design / utilize the
database within the context of django.
I just wanted to point out that the django tutorial will point you
down the road of implementing a database a
I have not read all 18 responses, so if I am off base I apologize.
I believe that you want to avg the votes (by gender) of each unique
combination of thing and context.
(First take gender out of the equation)
In order to be able to get the avg votes for the combination of
potatoes and flavor as c
I assume that you are performing these functions in a view.
I would test the value
grn=submit['grnvalue'])
by rendering this to a template and see what 'gm' spits out.
This way you will find out what is sitting in the variable
On Dec 26, 4:33 am, Mohammad Shahid Siddiqui
wrote:
> Hi,
>
> I have
You can use the full functionality of sql and python by executing sql
queries using the pyodbc module.
The module is documented at this url
http://code.google.com/p/pyodbc/
You can combine sql and python logic and not have to be constrained by
the abstraction of raw sql or the ORM.
in your django
I am not exactly sure how extensive your question is about deployment.
You can just copy the files associated with your local django project/
app to the server in the same exact directory structure, install the
same modules that you had on your local computer and run
the shell script, /manage.py
I think that building the python code that performs your logic is a
great way to start, and not getting bogged down with django is a great
way to get started.
There are several (relatively straight forward) pieces of django that
you will need to tie together.
I will simply disucss the view.py com
I presume that the stored procedure has been created.
I use the python module pyodbc. Google has good documentation how to
set this up.
then after creating the connection you can execute the stored
procedure
4 lines of code will then create the crsr followed by the execution
crsr.execute('stor
IKE isnt working because this query works.
>
> item_search_results = itemSearch.objects.raw(
> '''SELECT * FROM invTypes LIMIT 0, 10'''
> ).using(
> 'DataDump'
> )
>
> for name in item_search_results:
> results.
I think you are limiting yourself by excluding sql.
I use the ORM for the admin side of the house and I use sql for all of
my web based presentations.
SQL will do everything that you want to achieve.
ORM has limitations as you have seen.
On Dec 22, 7:27 am, kr0na wrote:
> Im trying to compare
You should confirm that the tables that you added to the database, do
in fact exist, by querying the database, before wondering why they did
not show up in the admin page
On Dec 20, 9:08 pm, Karen Tracey wrote:
> No, it doesn't happen automatically. (Unless prior to this change you were
> using p
des the extra carriage
return
{% for event, interests in report.items %}
{{event}}
On Aug 14, 7:28 am, Sam Lai wrote:
> On 14 August 2011 14:00, Python_Junkie wrote:
>
> > I think that if you performed the logic to determine if there actually
> > is something in the
One of the reasons that I migrated to django is because of the
underlying functionality.. With that said I would use a separate table
or file, whichever you are comfortable with , to store the changing
time delta variable.
You could dynamically retrieve this variable in the view or, the
example th
gt;
> To access you can use: http://:
>
> This should do. Hope it helps.
>
> Thanks,
> Subhranath Chunder.www.subhranath.com
>
> On Sun, Aug 14, 2011 at 9:12 AM, Python_Junkie <
>
>
>
>
>
>
>
>
>
> software.buy.des...@gmail.com> wrote:
>
You are a true genius!
Thank you
The runserver command with the ip address with the IP worked
perfectly.
Thank you again
On Aug 14, 12:33 am, Landy Chapman wrote:
> >The application runs when I remote into the server and run
> > the web pages with localhost on the 8000 port.
> > How do I
I think that if you performed the logic to determine if there actually
is something in the interest for that row in the view and
then only pass those components from the view, and not in the template
then your problem goes away.
On Aug 13, 8:53 pm, CrabbyPete wrote:
> I'm using the django templ
I have placed my django application on the virtual server from go
daddy. The application runs when I remote into the server and run
the web pages with localhost on the 8000 port.
How do I connect to this web page for demonstration purposes when I am
not remoting into the virtual server.
I tried
rsonally have used django-pyodbc in conjunction with pyodbc.
>
> On Thu, Jul 14, 2011 at 5:03 PM, bruno desthuilliers <
>
>
>
>
>
>
>
> bruno.desthuilli...@gmail.com> wrote:
>
> > On 14 juil, 23:15, Python_Junkie
> > wrote:
> > > I have search
I have MYSQL up and running, just trying to use a different database
Thanks for any assistance that you can provide
On Jul 14, 9:07 pm, Russell Keith-Magee
wrote:
> On Fri, Jul 15, 2011 at 6:03 AM, bruno desthuilliers
>
> wrote:
>
> > On 14 juil, 23:15, Pyt
I have searched for the drivers to use the syncdb utility with MS SQL
Server but have been unsuccessful.
Has anyone implemented SQL server.
If you have could you point me to the links for driver downloads and
the settings.py parameters.
Thanks
--
You received this message because you are subsc
On Jun 25, 5:54 pm, Python_Junkie
wrote:
> I am just getting started with django. Have been a python developer
> for a number of years
>
> I am following the examples in the book The Definitive Guide to Django
> and the same error keeps popping up.
>
> "need more tha
I am just getting started with django. Have been a python developer
for a number of years
I am following the examples in the book The Definitive Guide to Django
and the same error keeps popping up.
"need more than 1 value to unpack"
I understand what it is trying to say, but I do not see where
62 matches
Mail list logo