profiles

Django registration and multiple profiles

被刻印的时光 ゝ 提交于 2019-11-27 10:24:08
问题 I'm using django-registration in my application. I want to create different kinds of users with different profiles. For example, one user is a teacher and another user is a student. How can I modify registration to set the user_type and create the right profile? 回答1: Long answer :p I've found The Missing Manual post invaluable for this kind of problem as it explains many of features of the django-profiles and django-registration systems. I'd suggest using multi table inheritance on the single

Maven Build multiple profiles in one go

怎甘沉沦 提交于 2019-11-27 04:49:19
问题 It is our policy to only build 1 deployable jar. all environment-specific configurations are kept separate, and we build them all together at once. so under our current Ant process, we have a properties file for each environment, loop over them, and create a set of config files for each environment. In my current POM XML, I'm able to build only one profile supplied at the Command-line. Is it possible to achieve through Maven? Here are some of the relevant part of POM.xml <!-- Define profiles

Get the EXPIRATION date of a Provisioning Profile at Run-time?

亡梦爱人 提交于 2019-11-27 03:27:08
问题 I have an app that I routinely pass out to testers via the ad-hoc distribution method. Some of these testers are 'on the ball' and know enough about provisioning profiles and the quarterly expirations and can (if I forget) give me a nudge to rebuild a new version for them to test. However some of the users always seem to get to the point where it stops running and then bitch and moan about it - despite them probably dismissing the iOS level reminder. My question is can I programatically get

Maven Change a value in a file based on profile

淺唱寂寞╮ 提交于 2019-11-27 01:11:04
问题 I have a properties file called ApplicationResources.properties in my application with a property that changes depending on the environment. Let us say the property is: resources.location=/home/username/resources and this value is different when the application is executed during development and when the application goes into production. I know that I can use different profiles in Maven to perform different build tasks in different environments. What I want to do is somehow replace the value

Default profile in Spring 3.1

一个人想着一个人 提交于 2019-11-26 23:45:15
In my application I have beans annotated with @Profile("prod") and @Profile("demo") . The first one, as you can guess :), is used on beans that connect to production DB and second one annotates beans that use some fake DB ( HashMap or whatever)- to make development faster. What I would like to have is default profile ( "prod" ) that will be used always if it is not overridden by " something-else ". Perfect would be to have in my web.xml : <context-param> <param-name>spring.profiles.active</param-name> <param-value>prod</param-value> </context-param> and then override this with -Dspring

Skinning Android app with Maven build profiles

主宰稳场 提交于 2019-11-26 16:56:04
问题 I've got mavenized Android application and customer wants support for the skinning at build time. For example: mvn clean install -P Developer, mvn clean install -P Customer1, mvn clean install -P Customer2 In other words, different customer needs little bit different set of images, different strings (appName, copyright, etc) and also, some of the elements in layouts should be hidden or shown (Developer profile), so different layouts too. My first thought was to have folders like res-customer1

Default profile in Spring 3.1

那年仲夏 提交于 2019-11-26 08:47:05
问题 In my application I have beans annotated with @Profile(\"prod\") and @Profile(\"demo\") . The first one, as you can guess :), is used on beans that connect to production DB and second one annotates beans that use some fake DB ( HashMap or whatever)- to make development faster. What I would like to have is default profile ( \"prod\" ) that will be used always if it is not overridden by \" something-else \". Perfect would be to have in my web.xml : <context-param> <param-name>spring.profiles

Create folder and file on Current user profile, from Admin Profile

北城以北 提交于 2019-11-26 05:31:32
Our client only allows applications to be installed when logged in as Admin. The application that needs to be installed has to be installed for the current user of the machine. The application installs fine, my problem comes in when i need to drop a config file in the appdata/user profile folder of the user. As this is where they want it, currently the config is being dropped on the admin profile on installation. How do i get past this, is there a way for me to check on installation if there are other profiles and maybe write to them, but this feels dirty. Don't create the config file on

How to set active spring 3.1 environment profile via a properites file and not via an env variable or system property

泄露秘密 提交于 2019-11-26 04:38:12
问题 We use the new environment profiles feature of spring 3.1. We currently set the active profile by setting the environment variable spring.profiles.active=xxxxx on the server to which we deploy the application. We think this is a suboptimal solution as the war file we want to deploy should just have an additional properties file which sets the environment in which the spring app context should load so the deployment is not dependent on some env var set on the server. I tried to figure out how

Create folder and file on Current user profile, from Admin Profile

感情迁移 提交于 2019-11-26 01:02:24
问题 Our client only allows applications to be installed when logged in as Admin. The application that needs to be installed has to be installed for the current user of the machine. The application installs fine, my problem comes in when i need to drop a config file in the appdata/user profile folder of the user. As this is where they want it, currently the config is being dropped on the admin profile on installation. How do i get past this, is there a way for me to check on installation if there