Can anyone let me know that how can i remove ( * ) sign in Joomla 2.5 user registration form. ( * ) sign is automatically enabling with require field. I want the field to become require without ( * ) sign. Any help in this regard.
Not the best solution but you could add to your CSS file:
.star{display:none;}
Add :
.star{display:none !important;}
in template.css
Related
I'm rather surprised that this hasn't been asked before, but I need to limit my Users in Django to only belong to one single Group. How would I do this?
One option can be that in your view or form, before you add more groups to the user you make a validation:
if user.groups.exists():
for g in user.groups.all():
user.groups.remove(g)
user.groups.add(group_to_add)
You need to override the Groups field widget :
groups = forms.ModelMultipleChoiceField(
queryset=Group.objects.all(),
widget=forms.SelectMultiple
)
and then remove the 'multiple' attribute using Javascript :
$(document).ready(function(){
$("#id_groups").removeAttr("multiple");
});
I'm creating a web application where I've used the active admin gem. Suppose, i've a model named Category with fields names. Now, in my names field i want to insert multiple values by comma separated. And it will look like this. That's why i've used the tagsinput gem. But its not working.
Anyone have any idea how do I do this?
I would do next.
Add to active_admin.js
//= require jquery.tagsinput
$(selector).tagsInput({
'autocomplete_url': url_to_autocomplete_api,
'autocomplete': { option: value, option: value},
'height':'100px',
'width':'300px',
'interactive':true,
'defaultText':'add a tag',
'onAddTag':callback_function,
'onRemoveTag':callback_function,
'onChange' : callback_function,
'removeWithBackspace' : true,
'minChars' : 0,
'maxChars' : 0 //if not provided there is no limit,
'placeholderColor' : '#666666'
});
Add to active_admin.css.scss
*= require jquery.tagsinput
Make sure that you have an action in controller that would create new category. Check if you have it in your routes.rb and that will be your
'autocomplete_url': url_to_autocomplete_api
I didn't try to do all these step. But I think I should give you some ideas.
If that wouldn't work I would add js and css files to my assets directly from tagsinput
If you choose go this way you may need add your js and css to initializer/assets.rb
Rails.application.config.assets.precompile += %w()
I hope it helps.
I have a django 1.7 and for clean experiment i tried to implement filters exactly as in documentation, but when open my page {{ booksfilter }} renders nothing. I tried anything, but nothing helps, these module worked on django 1.5, but now it is not working.
I already tried to to make code exactly as in documentation
Here is github issue
https://github.com/ionelmc/django-easyfilters/issues/10
SOLVED!!!!
When deleted all objects from my db - filter appears!
Then i tested and found something interesting:
I have a model ZayavkaDogovor, which has field
forma_oplati=models.CharField(max_length=50, choices=FORMA_OPLATI,verbose_name='Форма оплаты'), so choices for it is:
FORMA_OPLATI = (
('not_selected','Не выбрано'),
('beznal','Безналичный расчет'),
('nal','Наличный расчет'),
)
When there is russian symbols - it fails and not renders filters (just empty)
but when i changed it to (only english letters):
FORMA_OPLATI = (
('not_selected','amigrupp'),
('beznal','amigrupp'),
('nal','amigrupp'),
)
IT WORKED!
appending u' - WORKED to fix this!
here how it works:
FORMA_OPLATI = (
('not_selected',u'Не выбрано'),
('beznal',u'Безналичный расчет'),
('nal',u'Наличный расчет'),
)
THANK YOU for this module!!!!!
I am using web2py and builing a REST api and have one of my URLs set up like this:
routes_in (
('/myapp/something/{?P<id>.*)/myfunction', /myapp/default/myfunction/\g<id>')
)
routes_out = (
('/myapp/default/myfunction/\g<id>', '/myapp/something/{?P<id>.*)/myfunction')
)
If my app is setup this way my function is not even entered into and I get an invalid request if I remove the id argument from the url that my url is being mapped to i.e. remove g<id> from above, I enter my function but the argument is not being captured.
I cannot change the structure of the URL as per my requirements and I am not sure how to go about this.
I would appreciate any pointers.
Thanks,
nav
The above does work in web2py I found that some other area of my code was breaking.
I am trying to integrate the following blog APP https://github.com/nathanborror/django-basic-apps ,so in my main urls.py i have included the blog urls as (r'^blog/',include('basic.blog.urls')), Now my question is that now when i point my browser to the blog APP http://127.0.0.1/blog/ i get a message as "Post archive",How to proceed from here i.e, how to post blog and retrieve the same.What is the url to be used..The following is the blog urls
from django.conf.urls.defaults import *
urlpatterns = patterns('basic.blog.views',
url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{1,2})/(?P<slug>[-\w]+)/$',
view='post_detail',
name='blog_detail'
),
url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{1,2})/$',
view='post_archive_day',
name='blog_archive_day'
),
url(r'^(?P<year>\d{4})/(?P<month>\w{3})/$',
view='post_archive_month',
name='blog_archive_month'
),
url(r'^(?P<year>\d{4})/$',
view='post_archive_year',
name='blog_archive_year'
),
url(r'^categories/(?P<slug>[-\w]+)/$',
view='category_detail',
name='blog_category_detail'
),
url (r'^categories/$',
view='category_list',
name='blog_category_list'
),
url(r'^tags/(?P<slug>[-\w]+)/$',
view='tag_detail',
name='blog_tag_detail'
),
url (r'^search/$',
view='search',
name='blog_search'
),
url(r'^page/(?P<page>\d+)/$',
view='post_list',
name='blog_index_paginated'
),
url(r'^$',
view='post_list',
name='blog_index'
),
)
I have never used this blogging app, but im guessing because it suggests its "basic" it will just provide the bare bones. So my starting point would be to add a post and see what happens.
If going to /blog/ doesnt provide a way to add a post, then register the models with your admin site and add through that way. Im guessing that you may have to build your own adding sections...
If you dont want to do this, djang-blog-zinnia is a blogging app i have used, and really like it
There are no URLs specific to post creation, so you need to do it via the Admin interface. I looked at the code and there is a specific template for creating/modifying post objects.
I've used and customized the basic blog application
The creation can be done through the Admin interface, the models are already registered with the admin interface
You just need to provide a good layout and some cool stylesheets for your front end to get started