Posts
 
Reputation
Joined
Last Seen
Ranked #2K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
0 Endorsements

32 Posted Topics

Member Avatar for felix001

I have a model that looks like ... class Person(models.Model): name = models.CharField(max_length=50) birthday = models.DateField() def __unicode__(self): return u'%s %s' % (self.name, self.birthday) class Address(models.Model): person = models.ForeignKey(Person) address = models.CharField(max_length=150) def __unicode__(self): return u'%s %s' % (self.person, self.address) class Anniversy(models.Model): person = models.ForeignKey(Person) anniversy = models.DateField() def __unicode__(self): …

Member Avatar for chriswelborn
0
198
Member Avatar for felix001

What is the best way to use a dictionary within a class. Do I have to assign the dict within the class ? Thanks

Member Avatar for vegaseat
0
123
Member Avatar for felix001

Hi, Im looking for an easy method to validate the input of a form. Ideally I want to remove all spaces from the inputed text and also ensure that there are no speical characters within it other then a forward slash. The input will look like this 192.168.1.1/24. Thanks,

Member Avatar for Troy III
0
325
Member Avatar for felix001

When trying to install django tagging Im getting the following error : [root@Fileserver django-tagging]# pwd /opt/django/djangoblog/django-tagging [root@Fileserver django-tagging]# python setup.py install Traceback (most recent call last): File "setup.py", line 49, in ? version_tuple = __import__('tagging').VERSION File "/opt/django/djangoblog/django-tagging/tagging/__init__.py", line 3, in ? from tagging.managers import ModelTaggedItemManager, TagDescriptor File "/opt/django/djangoblog/django-tagging/tagging/managers.py", line 5, …

Member Avatar for TrustyTony
0
187
Member Avatar for felix001

I need to create a simple input form without the use of a DB. Can anyone please assist? Thnaks,

Member Avatar for felix001
0
95
Member Avatar for felix001

Hi, Can anyone please tell me how to log all activity of my mysql database. Also do you know if there any tripwire services/products that are available ? Thanks,

Member Avatar for felix001
0
94
Member Avatar for felix001

Ive been developing a new website for the last few months. Initalling I configured all my databases to use the root account. Now I need to change all the passwords along with changing the web UI login. Ive tried changing the password for root within the gui but it doesnt …

0
74
Member Avatar for felix001

Does anyone know the SQL statement for replacing a string in the whole of a database. My database is called DB1 and I want to remove any instance of "Table/". Many Thanks,

Member Avatar for smantscheff
0
149
Member Avatar for felix001

I need to write a small bit of code that will print an error if I cannot resolve the name to IP. I see that you can use the "socket.gethostbyaddr" methods but I cant seem to find a simple method/exception for when it does not find an IP address. Also …

Member Avatar for Gribouillis
0
223
Member Avatar for felix001

What is the best way to print columns within python. Each of the values that I will be printing will be anything from 1 to 8 characters long. I had found this but wondered if there was any other methods... [url]http://www.daniweb.com/software-development/python/threads/202023[/url] Thanks,

Member Avatar for felix001
0
326
Member Avatar for felix001

Does anyone know how I can base my re condition based on it not finding a match. I have the following at the moment ..... [CODE]if re.search(r'123', os.uname()[1]):[/CODE]

Member Avatar for felix001
0
89
Member Avatar for felix001

I have a number of lists such as ['BLAH', 19, '11111', 'Fa0/19', '100000000'] I either need to make a list of lists or a dictionary containing lists. What would be the recommended one to do and will make the process of further sorting and text manipulation the easiest. Thanks,

Member Avatar for woooee
0
168
Member Avatar for felix001

What is the best way to invoke the os.system command and assign it to a variable without printing the output ? Example : [CODE]ifName = os.system('snmpwalk -v 1 -c <community> %s ifName.%s' % (switch,port))[/CODE] Also with the output of the snmpwalk I will be wanting to only assign the last …

Member Avatar for felix001
0
390
Member Avatar for felix001

Ive been looking at the sys.path.append('/../') command in order to import a python module to a given folder. The thing is doesnt python modules have to be installed from wither source or by the given package manager i.e rpm ?? Many Thanks,

Member Avatar for hughesadam_87
0
90
Member Avatar for felix001

Im using pexpect to output some terminal commands, but im facing the following issue. The code is [CODE]porttype = "Gi" print expectSw.sendline ("sh int counters errors | i %.*/1 ") % porttype expectSw.expect ('.*#') print expectSw.after[/CODE] But when I run the code i get ... [CODE]Traceback (most recent call last): …

Member Avatar for felix001
0
571
Member Avatar for felix001

Does anyone know how to use the subprocess.call to assign the ouput of a command to a string. At the moment it only assigns the return code ?? [CODE]>>> hostname = call(["hostname", "-d"]) lon3.corp.rackspace.com >>> print hostname 0[/CODE] Thanks,

Member Avatar for TrustyTony
0
118
Member Avatar for felix001

Im currently working on a HTML page to add additional input boxes. I have the following code. Does anyone know how I would go about adding the required vlaues to each of the input boxes, for use later on within php ?? [CODE]<html> <head> <title></title> <script language="javascript"> fields = 0; …

Member Avatar for felix001
0
165
Member Avatar for felix001

Is there an easy way to post a form to the same page. I currently have an HTML (/javascript) page with a number of selection forms. I want to then display certin HTML below below based upon the users selection. Many Thanks,

Member Avatar for broj1
0
76
Member Avatar for felix001

Can anyone help. Im trying to create 2 drop down lists (using the select tag). Based on the choice of the first drop down list the second list is populated. Thanks,

Member Avatar for felix001
0
141
Member Avatar for felix001

Ive written a small program to convert celcuis o Fahrenheit and vice versa. The script as it stands works : [CODE]#!/usr/bin/python import sys def convert(t,fc): if t == "c": print (fc * 9) / 5 + 32,"Degress Fahrenheit" elif t == "f": print (fc - 32) / 9 * 5,"Degress …

Member Avatar for Gribouillis
0
193
Member Avatar for felix001

I currently have the following php : <?php system('/usr/bin/whois 4.2.2.2'); ?> What is the easiest way to replace the newlines with <BR>\n. Thanks,

Member Avatar for diafol
0
2K
Member Avatar for felix001

Im trying to run a small python CGI script but when i run it i get the error : [B]malformed header from script. Bad header=[Querying whois.internic.net]: hello_get.py[/B] The CGI scripts im trying to run are : [CODE]#!/usr/bin/python # Import modules for CGI handling import cgi, cgitb import os # Create …

0
78
Member Avatar for felix001

Hi, Im trying to add code tags to my CSS. Ive added the following to my CSS : [CODE]code { background-color: #F9F9F9; border: 1px dashed #444444; color: black; font-family: momspace,"courier new"; line-height: 1.1em; padding: 1em; }[/CODE] But when running my site in firefox the browser doesnt even seen the new …

Member Avatar for GreenDay2001
0
96
Member Avatar for felix001

On random pages of my site im getting the following error: [CODE]Permission denied for <http://googleads.g.doubleclick.net> to call method Location.toString on <http://fir3net.com>.[/CODE] I have no clue on how to debug this or what could be causing this. I have searched the web but no one seems to know what this is …

0
64
Member Avatar for felix001

Can anyone help ? Im looking to find a MySQL query using regular expressions to allow me to remove any paragraph html tags within block quote tags. An example is : [CODE]<blockquote> <p>TEXT</p> </blockquote>[/CODE] Should be : [CODE]<blockquote> TEXT </blockquote> [/CODE] Thanks,

Member Avatar for smantscheff
0
126
Member Avatar for felix001

Im pretty new to python so im still finding my feet.. Ive written a small ftp program that downloads a file but its quite basic in that it gets the last element from the list and then downloads it. What is the easiest way to add some logic so it …

Member Avatar for felix001
0
162
Member Avatar for felix001

Im running a site with Intense Debate. For the life of me I cannot get the page to auto adjust itself to the site of the Intense Debate Comments. You can get an idea of the issue here ;[URL="http://fir3net.com/Firewalls/Checkpoint/checkpoint-commands.html"] http://fir3net.com/Firewalls/Checkpoint/checkpoint-commands.html[/URL]

Member Avatar for felix001
0
93
Member Avatar for felix001

I currently have a table within my page at : [url]http://www.fir3net.com/Firewalls/Juniper-Netscreen/juniper-commands.html[/url] The first 2 tables have been assigned a class of X1. My aim is to do the following : [LIST=1] [*]Set the table to a width of 85% [*]Set the first column to a set width [*]Set a black …

Member Avatar for shaya4207
0
125
Member Avatar for felix001

I currently have an XML (pasted below) that I want to place into a dictonary. With each dictonary key being the content of the XML`s <TITLE> markup and the values containing the content of the XML`s <ARTISTS*> markup. [CODE]<EXAMPLE> <CD> <TITLE>TITLE1</TITLE> <ARTIST1>ARTIST-ABC</ARTIST1> <ARTIST2>ARTIST-DEF</ARTIST2> </CD> <CD> <TITLE>TITLE2</TITLE> <ARTIST1>ARTIST-XYZ</ARTIST1> </CD> <CD> <TITLE>TITLE3</TITLE> …

Member Avatar for griswolf
0
138
Member Avatar for Rk_Raj

Prob be easier to see if you could set this up on your firewall or border router.... If you only have the option for using a Linux box this may help ... [URL="http://lartc.org/howto/lartc.rpdb.multiple-links.html"] http://lartc.org/howto/lartc.rpdb.multiple-links.html[/URL]

Member Avatar for felix001
0
275
Member Avatar for felix001

Im pretty new to Python, so i apologise in advance. My main goal is to parse a csv file (as per below) and to create a list named based on column 5 which includes values from column 7 as the elements. 01/11/2010,DEB,12345,12345,CREDIT CARD,,44 01/11/2010,DEB,12345,12345,TAKE AWAY,,20 01/11/2010,DEB,12345,12345,TAKE AWAY,,22 01/11/2010,DEB,12345,12345,TAKE AWAY,,24 The …

Member Avatar for TrustyTony
0
114
Member Avatar for felix001

Im pretty new to python and am trying to right a small script.... [CODE]#!/usr/bin/python import csv import string itemlist = [] reader = csv.reader(open("statement.csv", "rb")) for row in reader: item = row[4] itemlist.append(item) itemlist = list(set(itemlist))[/CODE] Every time I run it though I get the error : [CODE]Traceback (most recent …

Member Avatar for shibby
0
2K

The End.