Re: Can anybody answe how i can access infromation from the parent modell i my HTML template in Django?

2020-06-30 Thread The Sha
Thank you friend, it worked

Den tisdag 30 juni 2020 kl. 13:22:11 UTC+2 skrev Andréas Kühne:
>
> All you need to do is update the render call a dictionary with the 
> customuser variable in it:
>
> return render(request, 'members/member_contact_form.html', 
> {'ContactFormset':ContactFormset, 'Address Formset':AddressFormset, 
> 'customuser': 
> customuser })
>
> Regards,
>
> Andréas
>
>
> Den tis 30 juni 2020 kl 11:06 skrev The Sha  >:
>
>> Ok i understand, how du i put the CustomUser in the render method so i 
>> cant get {{ CustomUser.first_name }} in this case?
>>
>> Den tisdag 30 juni 2020 kl. 11:00:53 UTC+2 skrev Andréas Kühne:
>>>
>>> Hi,
>>>
>>> You need to pass the variables that you want to use in the template to 
>>> the template itself. You do this here:
>>>
>>> return render(request, 'members/member_contact_form.html', 
>>> {'ContactFormset':ContactFormset, 'AddressFormset':AddressFormset })
>>>
>>> The dictionary you add to the render method there contains all the 
>>> objects that you can get in the template itself. So if you want to add 
>>> something called object you need to add that to the dictionary.
>>>
>>> Med vänliga hälsningar,
>>>
>>> Andréas
>>>
>>> Den tis 30 juni 2020 kl 10:38 skrev The Sha :
>>>
>>>>
>>>>
>>>>
>>>>
>>>> <https://stackoverflow.com/posts/62653247/timeline>
>>>>
>>>> I have a two formsets rendered in a view called ContactIndex, the 
>>>> parent model for this view is the CustomUser model. I want to present the 
>>>> first_name of the user object in my html template. I've tried these tags 
>>>> without success any advise?
>>>>
>>>> This is the tags in my HTML template:
>>>>
>>>> {{ customuser.first_name }} - does not work
>>>>
>>>> {{ object.first_name }} - does not work
>>>>
>>>>
>>>> *This is my view:*
>>>>
>>>> def ContactIndex(request, CustomUser_id):
>>>> customuser = CustomUser.objects.get(pk=CustomUser_id)
>>>> if request.method == "POST":
>>>> ContactFormset = ContactInlineFormSet(request.POST, 
>>>> request.FILES, instance=customuser)
>>>> AddressFormset = AddressInlineFormSet(request.POST, 
>>>> request.FILES, instance=customuser)
>>>> if ContactFormset.is_valid() or AddressFormset.is_valid():
>>>> AddressFormset.save()
>>>> ContactFormset.save()
>>>> # Do something. Should generally end with a redirect. For 
>>>> example:
>>>> return redirect ('ContactIndex', 
>>>> CustomUser_id=customuser.id)
>>>> else:
>>>> ContactFormset = ContactInlineFormSet(instance=customuser)
>>>> AddressFormset = AddressInlineFormSet(instance=customuser)
>>>> return render(request, 'members/member_contact_form.html', 
>>>> {'ContactFormset':ContactFormset, 'Address
>>>>
>>>> Formset':AddressFormset })
>>>>
>>>> -- 
>>>> 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 view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/django-users/865ff205-9a1d-4f62-bbe4-d2d12da22374o%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/django-users/865ff205-9a1d-4f62-bbe4-d2d12da22374o%40googlegroups.com?utm_medium=email_source=footer>
>>>> .
>>>>
>>> -- 
>> 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 view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/2ab18788-3a31-4c7f-bba7-890580540153o%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/2ab18788-3a31-4c7f-bba7-890580540153o%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/036bac0e-f999-401e-afd6-7a14f940bf5fo%40googlegroups.com.


Re: Can anybody answe how i can access infromation from the parent modell i my HTML template in Django?

2020-06-30 Thread The Sha
It worked thank you my friend!

Den tisdag 30 juni 2020 kl. 11:00:53 UTC+2 skrev Andréas Kühne:
>
> Hi,
>
> You need to pass the variables that you want to use in the template to the 
> template itself. You do this here:
>
> return render(request, 'members/member_contact_form.html', 
> {'ContactFormset':ContactFormset, 'AddressFormset':AddressFormset })
>
> The dictionary you add to the render method there contains all the objects 
> that you can get in the template itself. So if you want to add something 
> called object you need to add that to the dictionary.
>
> Med vänliga hälsningar,
>
> Andréas
>
> Den tis 30 juni 2020 kl 10:38 skrev The Sha  >:
>
>>
>>
>>
>>
>> <https://stackoverflow.com/posts/62653247/timeline>
>>
>> I have a two formsets rendered in a view called ContactIndex, the parent 
>> model for this view is the CustomUser model. I want to present the 
>> first_name of the user object in my html template. I've tried these tags 
>> without success any advise?
>>
>> This is the tags in my HTML template:
>>
>> {{ customuser.first_name }} - does not work
>>
>> {{ object.first_name }} - does not work
>>
>>
>> *This is my view:*
>>
>> def ContactIndex(request, CustomUser_id):
>> customuser = CustomUser.objects.get(pk=CustomUser_id)
>> if request.method == "POST":
>> ContactFormset = ContactInlineFormSet(request.POST, 
>> request.FILES, instance=customuser)
>> AddressFormset = AddressInlineFormSet(request.POST, 
>> request.FILES, instance=customuser)
>> if ContactFormset.is_valid() or AddressFormset.is_valid():
>> AddressFormset.save()
>> ContactFormset.save()
>> # Do something. Should generally end with a redirect. For 
>> example:
>> return redirect ('ContactIndex', CustomUser_id=customuser.id)
>> else:
>> ContactFormset = ContactInlineFormSet(instance=customuser)
>> AddressFormset = AddressInlineFormSet(instance=customuser)
>> return render(request, 'members/member_contact_form.html', 
>> {'ContactFormset':ContactFormset, 'Address
>>
>> Formset':AddressFormset })
>>
>> -- 
>> 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 view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/865ff205-9a1d-4f62-bbe4-d2d12da22374o%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/865ff205-9a1d-4f62-bbe4-d2d12da22374o%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0e80aec7-2a58-41d8-8125-425db2231313o%40googlegroups.com.


Re: Can anybody answe how i can access infromation from the parent modell i my HTML template in Django?

2020-06-30 Thread The Sha
Ok i understand, how du i put the CustomUser in the render method so i cant 
get {{ CustomUser.first_name }} in this case?

Den tisdag 30 juni 2020 kl. 11:00:53 UTC+2 skrev Andréas Kühne:
>
> Hi,
>
> You need to pass the variables that you want to use in the template to the 
> template itself. You do this here:
>
> return render(request, 'members/member_contact_form.html', 
> {'ContactFormset':ContactFormset, 'AddressFormset':AddressFormset })
>
> The dictionary you add to the render method there contains all the objects 
> that you can get in the template itself. So if you want to add something 
> called object you need to add that to the dictionary.
>
> Med vänliga hälsningar,
>
> Andréas
>
> Den tis 30 juni 2020 kl 10:38 skrev The Sha  >:
>
>>
>>
>>
>>
>> <https://stackoverflow.com/posts/62653247/timeline>
>>
>> I have a two formsets rendered in a view called ContactIndex, the parent 
>> model for this view is the CustomUser model. I want to present the 
>> first_name of the user object in my html template. I've tried these tags 
>> without success any advise?
>>
>> This is the tags in my HTML template:
>>
>> {{ customuser.first_name }} - does not work
>>
>> {{ object.first_name }} - does not work
>>
>>
>> *This is my view:*
>>
>> def ContactIndex(request, CustomUser_id):
>> customuser = CustomUser.objects.get(pk=CustomUser_id)
>> if request.method == "POST":
>> ContactFormset = ContactInlineFormSet(request.POST, 
>> request.FILES, instance=customuser)
>> AddressFormset = AddressInlineFormSet(request.POST, 
>> request.FILES, instance=customuser)
>> if ContactFormset.is_valid() or AddressFormset.is_valid():
>> AddressFormset.save()
>> ContactFormset.save()
>> # Do something. Should generally end with a redirect. For 
>> example:
>> return redirect ('ContactIndex', CustomUser_id=customuser.id)
>> else:
>> ContactFormset = ContactInlineFormSet(instance=customuser)
>> AddressFormset = AddressInlineFormSet(instance=customuser)
>> return render(request, 'members/member_contact_form.html', 
>> {'ContactFormset':ContactFormset, 'Address
>>
>> Formset':AddressFormset })
>>
>> -- 
>> 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 view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/865ff205-9a1d-4f62-bbe4-d2d12da22374o%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/865ff205-9a1d-4f62-bbe4-d2d12da22374o%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2ab18788-3a31-4c7f-bba7-890580540153o%40googlegroups.com.


Re: Two models one form, or use generic CreateView

2020-06-09 Thread The Sha
Ok intressant, i cant find any good exemplen. Thank you for the reply. Im new 
to django can you maybe be more specific with som examples or point me in the 
right direktion? thank you

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c484bbef-d743-48c4-b13f-1a1e5f122976o%40googlegroups.com.


Re: Custom template tags - instance.templatetag

2020-06-09 Thread The Sha


Den tisdag 2 juni 2020 kl. 22:53:06 UTC+2 skrev Jan Gregorczyk:
>
> Hi! How to change my template tag?
> from django import template
>
> register = template.Library()
>
> @register.simple_tag
> def votes_up_exists(answer, user_id):
> pass
>
> how I use it - {% votes_up_exists answer request.user.id %}
> how I would like to use it - {% answer.votes_up_exists user_id %}
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7f9a51cf-4762-4b16-99ec-6ced288ade5fo%40googlegroups.com.


Two models one form, or use generic CreateView

2020-06-09 Thread The Sha
Hi 

I hava a problem in django, i have to models one is a CustomUser Model and 
the other is a Address model. 

The problem is that when i create a generic CreateView for the Address 
model and use a pk: url the address form wont get the instance of the users 
PK for adding a new address.

my models look like this, Even though i pass the PK in the URL the 
CreateView does not understand that i want to add a address to user with 
id: 42 in this example. How can i solve this problem?







The URL
 path('/address', views.AddressCreateView.as_view(), name
='Address-add'),


*This is my view*
class AddressCreateView(CreateView):
model = Address
template_name = 'members/address_form.html'
success_url = reverse_lazy('MemberIndex')
fields = ('CustomUser', 'address', 'zip_code', 'city', 'state','active')


*The model*
class CustomUser(AbstractBaseUser, PermissionsMixin):
email = models.EmailField(_('email address'), unique=True)
personal_Id = models.CharField(max_length=12, blank=False)
first_name = models.CharField(_('first name'), max_length=30, blank=True
)
middle_name = models.CharField('middle name', max_length=30, blank=True)
last_name = models.CharField(_('last name'), max_length=30, blank=True)
is_staff = models.BooleanField(default=False)
is_active = models.BooleanField(default=True)
date_joined = models.DateTimeField(default=timezone.now)
avatar = models.ImageField(upload_to='images', blank=True)

def __str__(self):
return self.email

def full_name(self):
return '%s %s %s' % (self.first_name, self.middle_name, self
.last_name)

USERNAME_FIELD = 'email'
REQUIRED_FIELDS = []


objects = CustomUserManager()

class Address(models.Model):
CustomUser = models.ForeignKey(CustomUser, on_delete=models.CASCADE)
address = models.CharField(max_length=60, blank=False)
zip_code = models.CharField(max_length=8, blank=False)
city = models.CharField(max_length=30, blank=False)
state = models.CharField(max_length=30, blank=False)
active = models.BooleanField(name='active', default=True, editable=True)
address_reg_date = models.DateTimeField(default=timezone.now)
class Meta:
verbose_name_plural = "Address"
 
def __str__(self):
 return self.address +', '+ str(self.zip_code) + ', ' + self.city





-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d0d3596f-6c0e-4928-8e57-7eb5476821d3o%40googlegroups.com.


How do I fetch table values in pdf using django?

2016-07-12 Thread Aslam Sha

How do I fetch table values in pdf using django?

** I AM USING REPORTLAB FOR PDP*

-- 
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/aab769ac-6d97-4424-bbe1-7f50c29417d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


search a textbox to search a data from postgresql db in django application

2015-03-18 Thread Sabeen Sha
search a textbox to search a data from postgresql db in django application 
and display it

-- 
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/2b7414a1-c820-4349-adf1-ecc104be3018%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


django Search page

2015-03-01 Thread Sabeen Sha
 

 which is the best way to implement the following::
i will be having a text box and a Add button

Along with a table below it containing headers class 
AssesmentBuildingDetails(models.Model): 


 numbuildingid1 = models.CharField(max_length=14,unique=True) 

numbuildingid2 = models.CharField(max_length=7,primary_key=True) 

previous_year = models.CharField(max_length=4, blank=True) 

previous_year_wardname = models.CharField(max_length=100,blank=True, 
null=True) 

previous_doorno1 = models.CharField(max_length=4,blank=True, null=True) 

previous_doorno2 = models.CharField(max_length=10,blank=True, null=True) 

current_year = models.CharField(max_length=4, blank=True) 

current_year_wardname = models.CharField(max_length=100,blank=True, 
null=True) 

current_doorno1 = models.CharField(max_length=10,blank=True, null=True) 

current_doorno2 = models.CharField(max_length=10,blank=True, null=True) 

buildingusage = models.CharField(max_length=500,blank=True, null=True) 

ownernameaddressmal = models.CharField(max_length=500,blank=True, 
null=True) 

ownernameaddresseng = models.CharField(max_length=500,blank=True, 
null=True) 

plintaarea = models.DecimalField(max_digits=7, decimal_places=2,blank=True, 
null=True) 

class Meta: 

db_table = 'assesment_building_details' 


 
my logic is to take the numbuildingid2 as input from the text box and when 
i press enter either on the text field or click the add button it should 
search through the database
and add the details to the table without refreshing the whole page. and the 
clear the textfield and focus on it.
 It will give proper error msg if the numbuildingid2 is not found

please help how and which is the best way to implement this... 

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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/cf179d74-ea55-428f-9dd0-e4ce2297d01b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to call perl script in my django application

2012-06-18 Thread Tanveer Ali Sha
sorry, i dint get that.Please can u give example .??


On Mon, Jun 18, 2012 at 4:36 PM, Sergiy Khohlov <skhoh...@gmail.com> wrote:
> Such as in trivial python code . Check python system and os module
>
> 2012/6/18 Tanveer Ali Sha <shaikht...@gmail.com>:
>> Hello,
>>
>> how can I call Perl script (EX:hello world) in my django application 
>> ?
>>
>> --
>> 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.
>

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



How to call perl script in my django application

2012-06-18 Thread Tanveer Ali Sha
Hello,

how can I call Perl script (EX:hello world) in my django application ?

-- 
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: Graphs for my Django Application

2012-06-13 Thread Tanveer Ali Sha
@Tim Sawyer..

If i make use of FLOT , is it necessary to need to
convert my model to numeric values, mapping the ticks and adding the
labels manually.>??

If yes!! How can i do that?

On Mon, Jun 11, 2012 at 11:38 AM, Tanveer Ali Sha <shaikht...@gmail.com> wrote:
>
> Thank you Kenneth for your rule, I am fresher and this tip may help me 
> alot...:)
>
>
> On Mon, Jun 11, 2012 at 11:14 AM, kenneth gonsalves <law...@thenilgiris.com> 
> wrote:
>>
>> On Mon, 2012-06-11 at 11:06 +0530, Tanveer Ali Sha wrote:
>> > Anyone knows about  Django-Chartit..??
>> > Is it good to make use of this for my application??
>>
>> my rule of thumb - if an app has not had a commit in the last 3 months,
>> approach with care. (caveat I have not used the app)
>> --
>> regards
>> Kenneth Gonsalves
>>
>> --
>> 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: Graphs for my Django Application

2012-06-11 Thread Tanveer Ali Sha
Thank you Kenneth for your rule, I am fresher and this tip may help me
alot...:)

On Mon, Jun 11, 2012 at 11:14 AM, kenneth gonsalves
<law...@thenilgiris.com>wrote:

> On Mon, 2012-06-11 at 11:06 +0530, Tanveer Ali Sha wrote:
> > Anyone knows about  Django-Chartit..??
> > Is it good to make use of this for my application??
>
> my rule of thumb - if an app has not had a commit in the last 3 months,
> approach with care. (caveat I have not used the app)
> --
> regards
> Kenneth Gonsalves
>
> --
> 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: Graphs for my Django Application

2012-06-10 Thread Tanveer Ali Sha
Hey...!!

Anyone knows about  Django-Chartit..??
Is it good to make use of this for my application??

Thank Yo..:)


On Sat, Jun 9, 2012 at 4:12 PM, Tanveer Ali Sha <shaikht...@gmail.com>wrote:

> Thank You one and all..:)
>
>
> On Fri, Jun 8, 2012 at 11:14 PM, bobhaugen <bob.hau...@gmail.com> wrote:
>
>> http://d3js.org/ can handle both meanings of graphs: charts like bar
>> charts, or visualizations of network structures.
>>
>>
>>  <http://d3js.org/>
>>
>>  --
>> 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/-/DS-4lTg-9gwJ.
>>
>> 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: Graphs for my Django Application

2012-06-09 Thread Tanveer Ali Sha
Thank You one and all..:)

On Fri, Jun 8, 2012 at 11:14 PM, bobhaugen  wrote:

> http://d3js.org/ can handle both meanings of graphs: charts like bar
> charts, or visualizations of network structures.
>
>
> 
>
>  --
> 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/-/DS-4lTg-9gwJ.
>
> 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.



Graphs for my Django Application

2012-06-08 Thread Tanveer Ali Sha
Hello,

How can I provide graphs in my djnago application.I wanna implement this
for my Network Analysis Application .

Can anyone give me idea how to provide graphs in Django.

Thank Yo...
Sha

-- 
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: Accessing Backend DB for UI

2012-06-07 Thread Tanveer Ali Sha
YeahI got it, Thank you brother .

Thank You

On Thu, Jun 7, 2012 at 10:44 AM, Dennis Lee Bieber <wlfr...@ix.netcom.com>wrote:

> On Thu, 7 Jun 2012 09:45:53 +0530, Tanveer Ali Sha
> <shaikht...@gmail.com> declaimed the following in
> gmane.comp.python.django.user:
>
> > sorry ,I have a Perl back-end running as an API,i want to control that in
> > my front end using Django.How can I do that.?
> >
>
> API to what? A common database system?
>
>If so, the best solution is to bypass the PERL and talk directly to
> the database engine; Django may support the database engine itself.
>
>Otherwise, Django will not be involved at all -- it will be pure
> hand-written Python calling the PERL operations -- I presume the PERL is
> command line driven, so Python can invoke it via any of: os.system(),
> subprocess.popen(), etc.
>
>Django is optimized to be an end-to-end framework... from HTTP
> request/response handling, HTML templating, through business logic, and
> directly into a database engine --although it doesn't force one to use
> all of the framework (the template system is probably the easiest thing
> to substitute). If your database is only accessible via PERL scripts,
> that means you have to replace the Django database interface with your
> own Python code (or create a DB-API 2 compatible library -- which may be
> pure Python, or a compiled C-language extension -- that will interface
> with the PERL scripts; then add some tweaks to the Django database
> modules to recognize your new library as a valid database option).
> --
>Wulfraed Dennis Lee Bieber AF6VN
>wlfr...@ix.netcom.comHTTP://wlfraed.home.netcom.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: Accessing Backend DB for UI

2012-06-06 Thread Tanveer Ali Sha
sorry ,I have a Perl back-end running as an API,i want to control that in
my front end using Django.How can I do that.?

Thank You

On Wed, Jun 6, 2012 at 11:13 PM, Kurtis Mullins wrote:

> On 05/06/2012 18:04, Ali Shaikh wrote:
>
>> Hey..
>>
>> I am working for project, in that the back-end code is return in perl
>> and am working for front-end part i.e UI using Django,
>> Can any one can tell me how to access back-end database which is
>> return in perl or any othere languages .??
>
>
> What exactly do you mean by "the back-end code is return[ed] in perl"? Is
> it just dumping the data to Perl scripts? Or some sort of a Perl object
> notation? Or do you have a Perl back-end running as an API?
>
> --
> 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: Accessing Backend DB for UI

2012-06-05 Thread Tanveer Ali Sha
Thank you for your mail benoit.

No ,it abstraction layer made in perl, i wanna access that data for my
front-end part.

On Tue, Jun 5, 2012 at 4:50 PM, Benoit Perdu  wrote:

> Is there a database (SQLite, MySQL, PostGreSQL, ...) at your backend, or
> is it an abstraction layer made in Perl?
>
> If you have a databse, why not access it directly with Django --You would
> need to build your model to fit, and set the username to one the DB
> accepts, but this looks like the cleanest way to me.
>
> If you don't, it's outside of the scope of my knowledge.
>
> Good hunt
>
>
> On 05/06/2012 18:04, Ali Shaikh wrote:
>
>> Hey..
>>
>> I am working for project, in that the back-end code is return in perl
>> and am working for front-end part i.e UI using Django,
>> Can any one can tell me how to access back-end database which is
>> return in perl or any othere languages .??
>>
>> Pls help
>>
>>
>> Thank You
>>
>>
> --
> 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+unsubscribe@**
> 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: Retrieve datas from database

2012-06-04 Thread Tanveer Ali Sha
Hey..

I am working for project, in that the back-end code is return in perl and
am working for front-end part i.e UI using Django,
Can any one can tell me how to access back-end database which is return in
perl or any othere languages .??

Pls help


Thank You

On Mon, Jun 4, 2012 at 7:21 PM, bruno desthuilliers <
bruno.desthuilli...@gmail.com> wrote:

> On Jun 4, 2:23 pm, by-neron  wrote:
>
> > however,
> >
> > in mysite/template/index.html
> >
> >  {% for post in latestPosts %}
> >  {{ post.id }}
> > {% endfor %}
> > prints nothing because it could not send data here. How can i send it ?
>
> You pass them as a Context object to the render() method of the
> template - which is what your code is doing.  IOW : the problem is
> probably elsewhere.
>
> I assume that
> 1/ you are running the builtin dev server with the DEBUG flag set to
> True in your settings,
> 2/ you do have some posts in your database,
> 3/ you already made sure your code was using the right template (like
> by editing something in your template and reloading the url to check
> if you see the edit).
>
>
> --
> 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: global name 'content' is not defined

2012-05-27 Thread Tanveer Ali Sha
thank you nikhil and nevio...:)

On Sun, May 27, 2012 at 2:48 PM, Nevio Vesic  wrote:

> You're missing a `content` at def view_page. I've marked possible solution
> *(as red)* that could fix it.
>
> def view_page(request, page_name):
>try:
>page = Page.objects.get(pk=page_name)
>*content = page.content*
>
>except Page.DoesNotExist:
>return render_to_response("create.**
> html",{"page_name":page_name})
>return render_to_response("view.html"**, {"page_name":page_name,
> "content":content},context_**instance=RequestContext(**request))
>
>
> On Sunday, May 27, 2012 10:58:13 AM UTC+2, Ali Shaikh wrote:
>>
>> 'model.py`
>>from django.db import models
>>
>>class Page(models.Model):
>> name = models.CharField(max_length=**20, primary_key=True)
>> content = models.TextField(blank=True)
>>
>># Create your models here.
>>
>> `view.py`
>> from wiki.models import Page
>> from django.shortcuts import render_to_response
>> from django.http import HttpResponseRedirect, HttpResponse
>> from django.shortcuts import get_object_or_404, render_to_response
>> from django.core.urlresolvers import reverse
>> from django.template import RequestContext
>> from django.shortcuts import render_to_response
>> from django.core.context_processors import csrf
>>
>>
>> def view_page(request, page_name):
>> try:
>> page = Page.objects.get(pk=page_name)
>> except Page.DoesNotExist:
>> return 
>> render_to_response("create.**html",{"page_name":page_name})
>>
>> return render_to_response("view.html"**, {"page_name":page_name,
>> "content":content},context_**instance=RequestContext(**request))
>>
>> def edit_page(request, page_name):
>> try:
>> page = Page.objects.get(pk=page_name)
>> content= page.contents
>> except Page.DoesNotExist:
>> content= ""
>> return render_to_response("edit.html"**, {"page_name":page_name,
>> "content":content},context_**instance=RequestContext(**request))
>>
>> def save_page(request, page_name):
>> content= request.POST["content"]
>> try:
>> page = Page.objects.get(pk=page_name)
>> page.content= content
>> except Page.DoesNotExist:
>> page = Page(name=page_name,content=**content)
>> page.save()
>> return HttpResponseRedirect("/**wikicamp/" + page_name + "/")
>>
>> Traceback
>>
>>
>> Environment:
>> Request Method: GET
>> Request URL:
>>
>> Django Version: 1.4
>> Python Version: 2.6.6
>> Installed Applications:
>> ('django.contrib.auth',
>>  'django.contrib.contenttypes'**,
>>  'django.contrib.sessions',
>>  'django.contrib.sites',
>>  'django.contrib.messages',
>>  'django.contrib.staticfiles',
>>  'wiki')
>> Installed Middleware:
>> ('django.middleware.common.**CommonMiddleware',
>>  'django.contrib.sessions.**middleware.SessionMiddleware',
>>  'django.middleware.csrf.**CsrfViewMiddleware',
>>  'django.contrib.auth.**middleware.**AuthenticationMiddleware',
>>  'django.contrib.messages.**middleware.MessageMiddleware')
>>
>>
>> Traceback:
>>
>> enter code here
>>
>> File "/usr/local/lib/python2.6/**dist-packages/django/core/**handlers/
>> base.py" in get_response
>>   111. response = callback(request,
>> *callback_args, **callback_kwargs)
>> File "/home/tanveer/djcode/**wikicamp/wiki/views.py" in view_page
>>   16. return render_to_response("view.html"**,
>> {"page_name":page_name,
>> "content":content},context_**instance=RequestContext(**request))
>>
>> Exception Type: NameError at /wikicamp/start/
>> Exception Value: global name 'content' is not defined
>>
>>
>> PLs help..:(
>
>  --
> 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/-/nojisJrWsyQJ.
>
> 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: import error: no model named .....

2012-05-17 Thread Tanveer Ali Sha
Hi  Apokalyptica Painkiller ,

Here is my urls.py and views.py


*URLS.PY*

from django.conf.urls.defaults import*
from wikicamp.views import hello

urlpattern = patterns(' ',
('^hello/$,hello),
)

*VIEWS.py*
*
*
*from django.http import HttpResponse*
*
*
*def hello(request):*
* return HttpResponse("hello world")*


On Fri, May 18, 2012 at 12:44 AM, Tanveer Ali Sha <shaikht...@gmail.com>wrote:

> even am getting *page not found* error
>
> 1.^notes/
> the current URL,didnt match any of these
>
>
>
> for that wikicamp example which is available in showmedo.com..
>
> I donno why I getting these error ...??:(
>
>
> On Fri, May 18, 2012 at 12:32 AM, Halit Alptekin <diqit...@gmail.com>wrote:
>
>> You should import models into views.py.
>>
>> For Example;
>>
>> from hdyazi.models import *
>> from hdmakale.models import *
>> from hdsayfalar.models import *
>>
>> My models' names are hdyazi,mdmakale,hdsayfalar ...
>>
>> --
>> *www.halitalptekin.com | Halit Alptekin*
>>
>>  --
>> 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: import error: no model named .....

2012-05-17 Thread Tanveer Ali Sha
even am getting *page not found* error

1.^notes/
the current URL,didnt match any of these



for that wikicamp example which is available in showmedo.com..

I donno why I getting these error ...??:(


On Fri, May 18, 2012 at 12:32 AM, Halit Alptekin  wrote:

> You should import models into views.py.
>
> For Example;
>
> from hdyazi.models import *
> from hdmakale.models import *
> from hdsayfalar.models import *
>
> My models' names are hdyazi,mdmakale,hdsayfalar ...
>
> --
> *www.halitalptekin.com | Halit Alptekin*
>
>  --
> 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: GUI for network interface

2012-05-16 Thread Tanveer Ali Sha
EXAMPLE COMPONENT DESIGN:

---

COMPONENT --> PHYSCIAL NETWORK INTERFACE

COMPONENT_KEY --> INTERFACE NUMBER

START_COMPONENT_SCRIPT --> Bringup_interface 

SYNC_COMPONENT_SCRIPT --> Setup_interface 



On Wed, May 16, 2012 at 10:46 PM, Tanveer Ali Sha <shaikht...@gmail.com>wrote:

> Thank you for your mail's
>
> actually am fresher ,just now only I started working ,from last two months
> I worked on python and linux.now TL told me to implement this GUISo
> am in bit confuse ...:(
>
>
> On Wed, May 16, 2012 at 10:41 PM, Dennis Lee Bieber <wlfr...@ix.netcom.com
> > wrote:
>
>> On Wed, 16 May 2012 07:59:50 -0700 (PDT), Ali Shaikh
>> <shaikht...@gmail.com> declaimed the following in
>> gmane.comp.python.django.user:
>>
>> > hi Django...!!
>> >
>> > I want to implement GUI for ma projectusing Django.
>> >
>> > Like in network different host are connected ,for that need to proved
>> > components like connect,disconnect ,status n all related staff
>> >
>> > Please help me to develop this GUI using Django..
>> >
>> >
>> > Thank You
>>
>> You have basically asked this question four times this week.
>>
>>In none of those have you shown any example of what you are having
>> trouble creating, or where you are getting stuck.
>>
>>If you don't know how to obtain network status you'll have to ask
>> in
>> a group related to your operating system -- those are not Django
>> functions.
>>
>>If you don't know how to start a Django project, you should study
>> the documentation for Django. If you need graphical placement of data
>> (lines connecting boxes) that is probably not Django either -- and
>> probably not even HTML, more likely you'll have to use a graphics
>> package to create GIF/PNG files that can be displayed by a web-page.
>>
>>So far, your posts come across as:
>>
>> I want something that does XYZ
>> I don't know how to do anything that makes XYZ
>> Please write XYZ for me
>> --
>>Wulfraed Dennis Lee Bieber AF6VN
>>wlfr...@ix.netcom.comHTTP://wlfraed.home.netcom.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: GUI for network interface

2012-05-16 Thread Tanveer Ali Sha
Thank you for your mail's

actually am fresher ,just now only I started working ,from last two months
I worked on python and linux.now TL told me to implement this GUISo
am in bit confuse ...:(

On Wed, May 16, 2012 at 10:41 PM, Dennis Lee Bieber
wrote:

> On Wed, 16 May 2012 07:59:50 -0700 (PDT), Ali Shaikh
>  declaimed the following in
> gmane.comp.python.django.user:
>
> > hi Django...!!
> >
> > I want to implement GUI for ma projectusing Django.
> >
> > Like in network different host are connected ,for that need to proved
> > components like connect,disconnect ,status n all related staff
> >
> > Please help me to develop this GUI using Django..
> >
> >
> > Thank You
>
> You have basically asked this question four times this week.
>
>In none of those have you shown any example of what you are having
> trouble creating, or where you are getting stuck.
>
>If you don't know how to obtain network status you'll have to ask in
> a group related to your operating system -- those are not Django
> functions.
>
>If you don't know how to start a Django project, you should study
> the documentation for Django. If you need graphical placement of data
> (lines connecting boxes) that is probably not Django either -- and
> probably not even HTML, more likely you'll have to use a graphics
> package to create GIF/PNG files that can be displayed by a web-page.
>
>So far, your posts come across as:
>
> I want something that does XYZ
> I don't know how to do anything that makes XYZ
> Please write XYZ for me
> --
>Wulfraed Dennis Lee Bieber AF6VN
>wlfr...@ix.netcom.comHTTP://wlfraed.home.netcom.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: Help.......!!

2012-05-15 Thread Tanveer Ali Sha
Actually i wanna deploy front end user interface with django for network
interface projectpls help me to get this

On Tue, May 15, 2012 at 1:41 AM, Dennis Lee Bieber <wlfr...@ix.netcom.com>wrote:

> On Mon, 14 May 2012 20:30:33 +0530, Tanveer Ali Sha
> <shaikht...@gmail.com> declaimed the following in
> gmane.comp.python.django.user:
>
> >
> > Am working on project which is based on Django n Sqlite3..Am new to
> > Django but am strong in Python concept ...pls help me to build code
> for
> > those which I have mentioned in last mailPlease
>
> Nothing you asked for is specific to Django... You are asking
> operating system utility questions...
>
>Let me put it this way.
>
>Without using Python/Django/SQLite/whatever -- how would you obtain
> network interface information on whatever computer you need it for? When
> you can answer that -- look in the Python standard library for some
> package that supports that operation. (In the case of Windows, you may
> need the Win32 extension package).
> --
>Wulfraed Dennis Lee Bieber AF6VN
>wlfr...@ix.netcom.comHTTP://wlfraed.home.netcom.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.