Web Developers

Room to discuss javascript and jquery, php and mysql issues. b...
Aug 26, 2016 07:50
I tired to resolve this issue
Aug 26, 2016 07:50
can somebody have a look and suggest
http://stackoverflow.com/questions/39160008/basic-http-authentication-and-remove-the-prepend-text-usernamepassword-from-th
Aug 26, 2016 07:50
Hi All,
 

Python

Room rules: sopython.com/chatroom Code formatting guide: tinyu...
Nov 5, 2013 15:00
thank you @IntrepidBrit, @Joe I will implement this keeping your suggestion in mind (valuable one)
Nov 5, 2013 14:55
Sorry I could not get this :( @IntrepidBrit
would you mind to sharing some example(link) if you have chance to.
Nov 5, 2013 14:52
yeah It can be set default to the field of that model. but cant we access it like I mentioned in stackoverflow @IntrepidBrit
Nov 5, 2013 14:47
I need to save the label_text against its (html tag field id) name (column name in model) where a single template can have multiple edited text label. is this answered to you question @IntrepidBrit :)

Actually I have created a model having user_id, text_label and we defined this text_label in constants.py files with default text
Nov 5, 2013 14:37
I have list of label text of each template where user can able to edit it. And we are saving it in our DB corresponding to that user and displaying that text only to the user otherwise fetching the default value.
Nov 5, 2013 14:32
yeah @joe that was my next question thanks :)
Nov 5, 2013 14:31
than we can access it easily :)
Nov 5, 2013 14:30
If i understand you correctly that means i have to define a dict in settings having key as defined constant and its corresponding value :)
Nov 5, 2013 14:27
how this context_dict = {'categories': category_list} would help in this case @joe.
Nov 5, 2013 14:26
now i have edited this replacing django-templates to django-views :)
Nov 5, 2013 14:24
then I can access it in anywhere
Nov 5, 2013 14:23
I want to have it in template but if i could know how it would be accessed in view
Nov 5, 2013 14:21
yeah its right :)
Nov 5, 2013 14:21
;)
Nov 5, 2013 14:20
you are right @IntrepidBrit I already had this in a separate file and included this in custom template tags file where i can able to access it by defined constant name but not its equivalent string :(
Nov 5, 2013 14:17
np @poke
Nov 5, 2013 14:16
here too :( @poke
Nov 5, 2013 14:15
is that right? @IntrepidBrit. Please help me how i can get it
Nov 5, 2013 14:12
Thanks @Joe
Nov 5, 2013 14:11
please do let me know if it does not make any sense :)
Nov 5, 2013 14:11
can anybody has chance to look into the problem
http://stackoverflow.com/questions/19790795/django-python-to-access-defined-constant-by-equivelent-string
Nov 5, 2013 14:10
Hi folks,
Jun 19, 2013 11:19
Please can you help to convert time_stamp
2013-06-17 08:26:29.130761 to 17th Jun 2013 08:26
Jun 19, 2013 09:56
I wanted to override the template but unable to find its location
Jun 19, 2013 09:55
i tried but unable to find the template location.
Jun 19, 2013 09:54
yes you are right.... overriding template and wanted to know that template location
Jun 19, 2013 09:52
would be great to know in the admin class itself
Jun 19, 2013 09:44
i am a kind of noob for django and wanted to know the html file associated to an admin in the admin module itself
Jun 19, 2013 09:44
Please let me know if it does make sense
Jun 19, 2013 09:43
will it be possible to know the template associated for admin module
Jun 19, 2013 09:42
ok sure..
but just wanted to knwo
Jun 19, 2013 09:41
this the admin module for the order that need to be displayed inline

class OrderPerUserInline(admin.TabularInline):
model = DiscountUsageRecord.order.through
exclude = ('order', )
can_delete = False
extra = -1
def ID(self, instance):
if instance.order_id:
order_id = instance.order_id
return mark_safe(u'<a href="/admin/shop/order/%s/" target="_blank">%s</a>' % (order_id, order_id))
else:
return mark_safe(u'<a href="#">View</a>')
def Name(self, instance):
if instance.order_id:
name = instance.order.contact
Jun 19, 2013 09:40
i have spend an hour but did found the correct format
Jun 19, 2013 09:39
this order need to displayed in tabular format inline
Jun 19, 2013 09:39
you can see the "order" as m2m relation
Jun 19, 2013 09:39
Thanks @limelight:
Here is the model

class DiscountUsagePerUser(models.Model):
discount = models.OneToOneField(Discount, primary_key=True)
userAllowedUses = models.IntegerField(max_length=3, default=0, verbose_name='Allowed uses for user')

class DiscountUsageRecord(models.Model):
email = models.EmailField(max_length=255, verbose_name='User Email')
discount = models.ForeignKey(Discount)
additionalUses = models.IntegerField(max_length=3, default=0, verbose_name='Additional usage')
order = models.ManyToManyField(Order)
Jun 19, 2013 09:33
Hi Folks
sorry for interruption......... is there any one have experienced in djangg framework.
i really need help. please if any
Jun 18, 2013 17:13
thanks @Jon
Jun 7, 2013 14:52
but answer surprised me more.
Jun 7, 2013 14:51
i found this link
https://groups.google.com/forum/#!topic/satchmo-users/KjyChlT3j6s
Jun 7, 2013 14:51
Am i making myself clear or i have elaborate a more
Jun 7, 2013 14:51
@Shannon
its a e-commerce site, and came for maintenance.
After set up i found this error
Jun 7, 2013 14:48
During checkout process i found this error
i ran ./manage.py loaddata l10n_data
Jun 7, 2013 14:46
Hi Everyone, sorry for interrupting

is anyone have experienced on Django. I am having issues this
'NullConfig' object has no attribute 'countries'
I am new to Django and this project using packages like, satchmo, node.js etc.
Its really urgent, any help really appreciated.
 

PHP

Support group for those afflicted with PHP. Don't ask to ask, ...
Apr 23, 2013 10:31
How things going on
Apr 23, 2013 10:31
Hello Folks
Apr 18, 2013 09:49
location: /app/Plugin/Support/model/SupportAppModel.php and Post.php


class SupportAppModel extends AppModel{
}
class Post extends SupportAppModel {
  	function getNameBYID($name) {
		return $this->find('first', array('id', 'conditions' => array('name' => $name, 'is_active' => 1)));
	}
}

Now i want to extend Post model in the application level model which dont have any table to associate
location: /app/model/Comment.php

App::uses('Post', 'Support.Model');
App::uses('SupportAppModel', 'Support.Model');