Search Results

Search found 12467 results on 499 pages for 'dynamic forms'.

Page 9/499 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Removing a fields from a dynamic ModelForm

    - by Jérôme Pigeot
    In a ModelForm, i have to test user permissions to let them filling the right fields : It is defined like this: class TitleForm(ModelForm): def __init__(self, user, *args, **kwargs): super(TitleForm,self).__init__(*args, **kwargs) choices = [] # company if user.has_perm("myapp.perm_company"): self.fields['company'] = forms.ModelChoiceField(widget=forms.HiddenInput(), queryset=Company.objects.all(), required=False) choices.append('Company') # association if user.has_perm("myapp.perm_association") self.fields['association'] = forms.ModelChoiceField(widget=forms.HiddenInput(), queryset=Association.objects.all(), required=False) choices.append('Association') # choices self.fields['type_resource'] = forms.ChoiceField(choices = choices) class Meta: Model = Title This ModelForm does the work : i hide each field on the template and make them appearing thanks to javascript... The problem is this ModelForm is that each field defined in the model will be displayed on the template. I would like to remove them from the form if they are not needed: exemple : if the user has no right on the model Company, it won't be used it in the rendered form in the template. The problem of that is you have to put the list of fields in the Meta class of the form with fields or exclude attribute, but i don't know how to manage them dynamically. Any Idea?? Thanks by advance for any answer.

    Read the article

  • Getting results in a result set from dynamic SQL in Oracle

    - by msorens
    This question is similar to a couple others I have found on StackOverflow, but the differences are signficant enough to me to warrant a new question, so here it is: I want to obtain a result set from dynamic SQL in Oracle and then display it as a result set in a SqlDeveloper-like tool, just as if I had executed the dynamic SQL statement directly. This is straightforward in SQL Server, so to be concrete, here is an example from SQL Server that returns a result set in SQL Server Management Studio or Query Explorer: EXEC sp_executesql N'select * from countries' Or more properly: DECLARE @stmt nvarchar(100) SET @stmt = N'select * from countries' EXEC sp_executesql @stmt The question "How to return a resultset / cursor from a Oracle PL/SQL anonymous block that executes Dynamic SQL?" addresses the first half of the problem--executing dynamic SQL into a cursor. The question "How to make Oracle procedure return result sets" provides a similar answer. Web search has revealed many variations of the same theme, all addressing just the first half of my question. I found this post explaining how to do it in SqlDeveloper, but that uses a bit of functionality of SqlDeveloper. I am actually using a custom query tool so I need the solution to be self-contained in the SQL code. This custom query tool similarly does not have the capability to show output of print (dbms_output.put_line) statements; it only displays result sets. Here is yet one more possible avenue using 'execute immediate...bulk collect', but this example again renders the results with a loop of dbms_output.put_line statements. This link attempts to address the topic but the question never quite got answered there either. Assuming this is possible, I will add one more condition: I would like to do this without having to define a function or procedure (due to limited DB permissions). That is, I would like to execute a self-contained PL/SQL block containing dynamic SQL and return a result set in SqlDeveloper or a similar tool. So to summarize: I want to execute an arbitrary SQL statement (hence dynamic SQL). The platform is Oracle. The solution must be a PL/SQL block with no procedures or functions. The output must be generated as a canonical result set; no print statements. The output must render as a result set in SqlDeveloper without using any SqlDeveloper special functionality. Any suggestions?

    Read the article

  • Dependecy Injection with Massive ORM: dynamic trouble

    - by Sergi Papaseit
    I've started working on an MVC 3 project that needs data from an enormous existing database. My first idea was to go ahead and use EF 4.1 and create a bunch of POCO's to represent the tables I need, but I'm starting to think the mapping will get overly complicated as I only need some of the columns in some of the tables. (thanks to Steven for the clarification in the comments. So I thought I'd give Massive ORM a try. I normally use a Unit of Work implementation so I can keep everything nicely decoupled and can use Dependency Injection. This is part of what I have for Massive: public interface ISession { DynamicModel CreateTable<T>() where T : DynamicModel, new(); dynamic Single<T>(string where, params object[] args) where T : DynamicModel, new(); dynamic Single<T>(object key, string columns = "*") where T : DynamicModel, new(); // Some more methods supported by Massive here } And here's my implementation of the above interface: public class MassiveSession : ISession { public DynamicModel CreateTable<T>() where T : DynamicModel, new() { return new T(); } public dynamic Single<T>(string where, params object[] args) where T: DynamicModel, new() { var table = CreateTable<T>(); return table.Single(where, args); } public dynamic Single<T>(object key, string columns = "*") where T: DynamicModel, new() { var table = CreateTable<T>(); return table.Single(key, columns); } } The problem comes with the First(), Last() and FindBy() methods. Massive is based around a dynamic object called DynamicModel and doesn't define any of the above method; it handles them through a TryInvokeMethod() implementation overriden from DynamicObject instead: public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result) { } I'm at a loss on how to "interface" those methods in my ISession. How could my ISession provide support for First(), Last() and FindBy()? Put it another way, how can I use all of Massive's capabilities and still be able to decouple my classes from data access?

    Read the article

  • C# Dynamic Query Without A Database Model

    - by hitopp
    I have been searching the web for a solution to dynamic queries. I have found many different solutions (e.g. Linq to Sql, Dynamic Linq Expressions, Dynamic Query), but all of these solutions involve some sort of previous knowledge of the database (like a model in code). Maybe what I am asking is way off the deep end, but is there any possible way to dynamically query a database without a model? For example, a database has a Customers table with the following columns: CustomerID Name FavoriteColor I want to create a query as SELECT Name FROM Customers WHERE @0 = @1, where the two placeholders are populated dynamically. The resulting data does not tie to a model class and I would prefer to use some sort of framework to build the queries, not simple string concatenation. The System.Linq.Dynamic namespace came really close to fulfilling this request, but it uses a database model. I realize this is crazy, but I was just curious.

    Read the article

  • New article available in "SOA Suite Essentials for WLI Users" series: Dynamic Data Lookup in a Busin

    - by simone.geib
    It is my pleasure to announce the publishing of another article in our "SOA Suite Essentials for WLI Users" series: "Dynamic Data Lookup in a Business Process: Meta Data Cache Control in Oracle WebLogic Integration and Domain Value Maps in SOA Suite". This article explains how dynamic data can be retrieved in a business process using Domain Value Maps in SOA Suite and shows the similarities to the WLI XML MetaData Cache Control. Lots of customers have asked about this comparison and I hope they will find it useful. The article follows "Setting Web Service and JCA Adapter Endpoints Dynamically in Oracle SOA Suite" which describes how web services and JCA adapter endpoints in SOA Suite can be changed at run-time, and so completes the use case where a BPEL process writes to a file (via file adapter) and the output directory and the file name are set dynamically. Please let me know what you think about the series and this specific article.

    Read the article

  • How to mock a dynamic object

    - by Daniel Cazzulino
    Someone asked me how to mock a dynamic object with Moq, which might be non-obvious. Given the following interface definition: public interface IProject { string Name { get; } dynamic Data { get; } } When you try to setup the mock for the dynamic property values, you get:   What’s important to realize is that a dynamic object is just a plain object, whose properties happen to be resolved at runtime. Kinda like reflection, if you will: all public properties of whatever object happens to be the instance, will be resolved just fine at runtime. Therefore, one way to mock this dynamic is to just create an anonymous type with the properties we want, and set the dynamic property to return that:...Read full article

    Read the article

  • Spell check doesn't work in protected forms in Word 2011 for Mac

    - by Erin
    We have a form template many staff members use. We created it in Word 2004 for Mac, and I was told a shortcoming was there was no way to turn on the spell checker (a real hassle!). I hoped this would be fixed in 2011, but when I open the form and save it as a .docx, the spell check still doesn't work. Many menu choices, including Language and Spelling and Grammar are grayed. Is there any way to get spell check in a protected, fillable form?

    Read the article

  • open self generated outlook-forms (office 2003) with office 2007 from any folder

    - by oktay okur
    a outlook form "c:\meinevorlage.oft" , created with office 2003 can not be opened directly in office 2007. Error: not familiar with the outlook form template .... how can I still open this template directly on computer with office 2007-installations? important: the outlook-form have to be opened by direct selecting and not via outlook-file-new, or as an hyperlink etc. heartfelt thanks in advance.

    Read the article

  • is it possible to use iis 7 to manage users when using forms authentication

    - by yamspog
    I have a web application that is using forms authentication. Everything is configured and working correctly. However, i'm dealing with the issue of creating and maintaining users and role membership. I know that I can roll my own solution but I'm wondering if there is an alternative solution? Does iis7 provide screens for managing forms authentication users? Is there a reliable, free solution that someone would recommend? Thanks!

    Read the article

  • Using a Windows 7 style menustrip in Windows Forms

    - by Nilbert
    I am using windows forms and when I use a MenuStrip item, I get something that looks like this: http://imgkk.com/i/ggn1.png Is it possible to use menu strips like the ones the system uses, like in Windows Explorer, or Firefox, for example: http://imgkk.com/i/cxyg.png with Windows Forms, or C# in general?

    Read the article

  • Using ViewModels in ASP.NET MVC 2 - multiple forms

    - by Rob Ellis
    I couldn't find any documentation around using multiple forms in an ASP.NET MVC 2 ViewModel approach. i.e. In the built in application when you select New MVC2 web app, the register page uses a ViewPage which inherits like this:- Inherits="System.Web.Mvc.ViewPage" I wanted to use that approach on a page with multiple forms, but that RegisterModel only supported one form.

    Read the article

  • is it possible to use iis 7 to manage forms authentication

    - by yamspog
    I have a web application that is using forms authentication. Everything is configured and working correctly. However, i'm dealing with the issue of creating and maintaining users and role membership. I know that I can roll my own solution but I'm wondering if there is an alternative solution? Does iis7 provide screens for managing forms authentication users? Is there a reliable, free solution that someone would recommend? Thanks!

    Read the article

  • Storing dynamic fields in Django forms

    - by hekevintran
    Django's form library has a feature of form sets that allow you to process dynamically added forms. For example you would use form sets if your application has a list of bookmarks you could use form sets to process multiple forms that each represent a bookmark. What about if you want to dynamically add a field to a form? An example would be a survey creation page where you can dynamically add an unlimited number of questions. How do you handle this in Django?

    Read the article

  • Django Show M2M field in both model forms

    - by John
    Hi I am using the forms.ModelForm to create my form. I want to be able to show the manytomany field in both model forms, how do I do this? If the manytomany relationship is defined in the model it is fine and just appears but if it is not in the model (but is still linked via the other model) it does not appear. Hope this makes sense. How can I make it show up? Thanks

    Read the article

  • Installing Oracle Forms 11g - how do you do it correctly?

    - by Grant Ronald
    Every now and then on the OTN lists we see customers having a few issues installing Oracle Forms 11g.  To try and address this, we've put together a couple of support notes to help people.  If you have access to MyOracleSupport, you should access note:854117.1 which shows the steps with nice clear screenshots.If you want to see a video of the install steps then check out note:1088873.1To configure SSO with 11g you should go to note:852352.1 and for maintenance information go to note:1073776.1

    Read the article

  • EC2 hosted service multi-tenant dynamic DNS solution

    - by accidental admin
    I want to change the model of my EC2 hosted service to have a separate sub domain for each tenant (ie. .example.com). My primary DNS is now with dnsmadeeasy.com, but their dynamic DNS offering seem pretty weak: it requires the API to use my full dnsmadeeasy.com account credentials, I rather have the API use a limited privilege credential that can only add/remove/modify subdomain records from what I gather it only allows to modify existing records, does not allow me to dynamically add/remove records for new tenant subdomains My question what are my alternatives? Is there something in the dnsmadeeasy API offering I misunderstood and I should just use them? Is there some other similar DNS service that has a DDNS offering that satisfies my requirements? Or should I just bite the bullet and host my own DNS (my fear is not configuration/learning/know how, my fear is reliability). If you recommend the latter, can you detail the necessary steps or a link to a good tutorial how to?

    Read the article

  • dynamic routing between openvpn tunnels

    - by pQd
    i'm thinking about using dynamic routing [ OSPF or RIP ] via OpenVPN tunnels. right now i have few offices connected in full mesh, but this is not scalable solution as we add more locations. i would like to avoid situation when plenty of internal traffic is affected if one of two vpn termination points that i plan to use is down. do you have similar configuration working in production? if so - what routing daemon did you use - quagga? something else? did you encounter any problems? thanks!

    Read the article

  • Godaddy hosting with dynamic ip?

    - by Razor Storm
    I bought a domain name on godaddy.com let's call it www.website.com, but my server has a dynamic ip, how do I resolve this issue? What I've tried: get a dns account at dyndns.com let's call it dns.dyndns.com, so I set up godaddy to forward the domain to dns.dyndns.com. problem: When the user goes to www.website.com, they see dns.dyndns.com in the url bar. Bad So then I set up the forwarding on godaddy to forward with domain masking, but then the problem is now that users can't even see url paths/get queries/ or hash marks anymore! `www.website.com/folder/search?id=4#ajax=4` becomes just www.website.com in the url bar. bad! What do I do?

    Read the article

  • Dual boot Windows 7 with Windows 8- Dynamic Disk

    - by MeetM
    Its a long explanation. I have a HP Pavilion dm4 notebook. It has pre installed Windows 7 Home Pre. Recently, I tried to install Windows 8 developer preview on my notebook, but while installing, it only allowed me to insatll it on my primary Windows 7 drive I.e. drive C. I had kept 1 empty partition for Windows 8 but when I selectced that option, the next button at the bottom of the window just grey with some error saying Windows cannot boot from this drive....blah blah blah So I googled and found another way of doing it by VHD(virtual hard disk). This seemed to work but on restarting gave me "VHD_BOOT_INITIALIZATION_FAILED" error. After trying all possible ways for around 10 times, I gave up. I noticed that d only thing difference in d tutorials and my notebook is the Disk type. They all had Basic and I have Dynamic. Is that the reason m not able to boot Windows 8? Any suggestions?

    Read the article

  • Change location of RSS Dynamic Desktops

    - by Andy
    I'm currently using CCleaner to take care of my computer, but I also have a dynamic desktop background provided by Bing (I'm running Windows 7 HP) - and unfortunately the two conflict. Whenever I 'clean' my computer using CCleaner it messes up my destop backgrounds as they are stored in the temporary internet files directory, and for some reason I don't appear to be able to get as far as the 'Enclosures' sub directory in order to tell CCleaner to exclude the directory (I can see it in Windows Explorer but not in CCleaner's directory browser). Therefore, I am looking for an alternative solution to this problem and wondered if I could change the directory to which the images were downloaded on the RSS feed. If anybody knows how to do this, I would be grateful if you could share or indeed, I would be equally as greatful if anyone knows any other ways of getting around CCleaner. Please note that I don't want to stop cleaning the whole of my temporary internet files though - I just don't want the wallpapers that have been downloaded to be deleted... Thanks in advance!

    Read the article

  • Running a home mail server using dynamic dns [closed]

    - by Anand
    Hi, Is it possible to run an email server on my home box using dynamic dns? The scenario is, I want to auto cc all incoming and outgoing emails from my one account to another, from some server side config instead of configuring email clients for rules. I have tried Google Apps Mail but it doesn't allow auto cc of outgoing emails. After having read tons of blogs, forum messages etc (hope I have been reading the correct info :) ) the only option to achieve what I am needing is to setup my own mail server, but the cost of getting a static IP doesn't fit my budget. Please can someone point me in the correct direction. Platform doesn't matter, I can setup a Windows or Linux server. Many Thanks

    Read the article

  • Dynamic Subdomains

    - by crash
    On my new site I want to have dynamic subdomains. I'm trying to make it so that the subdomains use the same web root as the main domain, all under a single CodeIgniter installation. For example, subdomain.example.com would lead to example.com/subdomain, which is actually example.com/index.php/subdomain. I've already the DNS, virtual hosts set up but I"m getting caught up on the .htaccess. The effect of the linked htaccess is that when navigating to any subdomain, it gets caught up in an infinite loop. (Error log after one request.) It's the same effect for www., which should just resolve to the main domain.

    Read the article

  • Running a home mail server using dynamic dns

    - by user4009
    Hi, Is it possible to run an email server on my home box using dynamic dns? The scenario is, I want to auto cc all incoming and outgoing emails from my one account to another, from some server side config instead of configuring email clients for rules. I have tried Google Apps Mail but it doesn't allow auto cc of outgoing emails. After having read tons of blogs, forum messages etc (hope I have been reading the correct info :) ) the only option to achieve what I am needing is to setup my own mail server, but the cost of getting a static IP doesn't fit my budget. Please can someone point me in the correct direction. Platform doesn't matter, I can setup a Windows or Linux server. Many Thanks

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >